1:绑定函数
v-bind; v-on; v-model
2:main.js作用
3:export default 和 new Vue的区别
4: <router-view/>在App.vue的含义,单页面应用5
5:遇到的报错:
错误
[Vue warn]: Duplicate keys detected: '[object Object]'. This may cause an update error.
[Vue warn]: Avoid using non-primitive value as key, use string/number value instead.
这两个的原因是,我在v-for中的v-bind:key没有使用唯一的标识,用的是对象
错误代码:
<tr v-bind:key="student" v-for="student in students">
正确代码:
<tr v-bind:key="student.yanID" v-for="student in students">
错误
[vue/require-v-for-key]
Elements in iteration expect to have 'v-bind:key' directives.eslint
原因,没有bind-key
错误代码:
<tr v-bind:key="student" v-for="student in students">
正确代码:
<tr v-bind:key="student.yanID" v-for="student in students">