Hello, everyone. I have just come into contact with vue and feel that using export in a vue component does not seem to be able to declare multiple name. I can"t describe it clearly. Just look at the code
export default {
name: "HelloWorld",
data () {
return {
msg: "Welcome to Your Vue.js App"
}
},
name: "showTest",
data () {
return {
msg2: "this is only a test",
state: "is it success ?"
}
},
methods: {
details: function () {
return this.state + " you are right "
}
}
}
at this time, the console mistakenly reported that there could not be two "name"" data"
.