SHARE
TWEET

Untitled

a guest Aug 18th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * ドキュメント外で描画する
  3.  * @param component Vueコンポーネント
  4.  * @param id 該当ID
  5.  * @constructor
  6.  */
  7. export const appendVueComponent = (component: VueConstructor, id: string) => {
  8.     const ComponentClass = Vue.extend(component)
  9.     const ComponentInstance = new ComponentClass().$mount()
  10.     if (document.getElementById(id) != null) {
  11.         document.getElementById(id).appendChild(ComponentInstance.$el)
  12.     }
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top