Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * ドキュメント外で描画する
- * @param component Vueコンポーネント
- * @param id 該当ID
- * @constructor
- */
- export const appendVueComponent = (component: VueConstructor, id: string) => {
- const ComponentClass = Vue.extend(component)
- const ComponentInstance = new ComponentClass().$mount()
- if (document.getElementById(id) != null) {
- document.getElementById(id).appendChild(ComponentInstance.$el)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement