v-bind:is
должно быть:
the name of a registered component, or
a component’s options object
docs
-----
Vue.component("parent", {
template:`
<div>
<menu-avtr @change-tab="onChangeTab"></menu-avtr>
<component :is="componentName"></component>
</div>
`,
data: () => ({
componentName: "form-inp",
}),
methods: {
onChangeTab(name) {
this.componentName = name;
},
},
});
Vue.component("menu-avtr", {
data: function() {
return {
punktsMenuAvtr: [ {text: 'Вход', tabs: "inp"}, {text: 'Регистрация', tabs: "reg"} ],
currentTab: "inp"
}
},
template: '<menu><li v-for="punkt in punktsMenuAvtr" @click="setTab(punkt.tabs)" v-bind:data-active=" currentTab === punkt.tabs ? true : false ">{{ punkt.text }}</li></menu>',
methods: {
setTab(tab) {
this.currentTab = tab;
this.$emit("change-tab", `form-${tab}`)
},
},
});