import Vue from "vue";
const rootVeComp = Vue.extend(VueGlobalCart);
this.vueMiniCart = new rootVueComp({
el: this.selector,
Data: {
jsonUrl: this.props.json,
cartAriaText: this.props.cartAriaText
}
});
我尝试过createApp和defineComponent,但它不起作用。
您可以简单地使用扩展:
const comp = {
extends: ParentComponent,
data() {
return {
...
}
},
mounted() {
},
};