Vue.js unknown custom element

前端 未结 9 2029
我在风中等你
我在风中等你 2020-12-02 11:01

I\'m a beginner with Vue.js and I\'m trying to create an app that caters my daily tasks and I ran into Vue Components. So below is what I\'ve tried but unfortunately, it giv

9条回答
  •  不知归路
    2020-12-02 11:37

    This is a good way to create a component in vue.

    let template = `
    • Your data here
    `; Vue.component('my-task', { template: template, data() { }, props: { task: { type: String } }, methods: { }, computed: { }, ready() { } }); new Vue({ el : '#app' });

提交回复
热议问题