具体报错:
Runtime directive used on component with non-element root node. The directives will not function as intended.
原因:
v-show、v-if等指令不可以用在了自定义组件上,需要在自定义组件外面包一个div,用在div上。
props传值,emit事件:
建议小写开头的参数名,方法名,否则会有警告,即便调用和定义的时候是一致的
具体报错:
Runtime directive used on component with non-element root node. The directives will not function as intended.
原因:
v-show、v-if等指令不可以用在了自定义组件上,需要在自定义组件外面包一个div,用在div上。
props传值,emit事件:
建议小写开头的参数名,方法名,否则会有警告,即便调用和定义的时候是一致的