Vue dynamic components tread pit

problem description

A dynamic component written in an official document is done with just one component: is feature.
then open the source code, and all the components write is the template template: "

. < / div >".
I replaced the template template with a complete component, and then vue warned that there was an error and couldn"t find template or render,. What kind of dynamic component is this? Complete chicken ribs, no solution.

related codes

< template >


< component: is= "show" > < / component >
< / div >
< / template >
< script >
import a from"@ / views/system/a"
import b from"@ / views/system/b"

export default {

components: {
aaa: {a},
bbb: {b}
},

data () {
show: aaa
}

}
.
< / script >

The core difference between

this code and the official code is

aaa:{ template:"<div>......</div>" },
bbb:{ template:"<div>......</div>"}
Jun.18,2021

clipboard.png

Menu