在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/嵌入式  網(wǎng)絡(luò)安全  HTML/ Vue extend問題

Vue extend問題

看一段代碼
如下:

import AlertComponent from './alert.vue';
import Vue from 'vue'

const AlertConstructor = Vue.extend(AlertComponent);
instance = new AlertConstructor({
        data: {
            message: message
            // show: true
        }
    });
    instance.vm = instance.$mount();
    instance.dom = instance.vm.$el;
    document.getElementsByTagName('body')[0].appendChild(instance.dom);

如何理解,誰能講解一下

官網(wǎng)的extend形式不是這樣的嗎? https://cn.vuejs.org/v2/api/#...

回答
編輯回答
菊外人

小樣,穿了件馬甲你就不認(rèn)識了

AlertComponent 不就是一個Vue組件嗎,寫在變量就你不認(rèn)識了

這個

a=1
console.log(a)
和
console.log(1)

有什么區(qū)別嗎

2017年11月24日 03:34