首页 > vue在组建中加v-show报错怎么解决?

vue在组建中加v-show报错怎么解决?

我定义了一个组件,在组建上加v-show抛出错误
Attribute "v-show" is ignored on component <parent> because the component is a fragment instance:
然后按到提示去了http://vuejs.org/guide/compon...结果纯英文,英文太差没看懂。。。
代码如下:
html

<div id="app">
        
        <div>
            <parent  :display="display" v-show="display"></parent>
        </div>
    </div>

js

new Vue({
        el:"#app",
        data:{
            "display":false
        },
        
        components:{
            "parent":{
        template:"#tem",
        props:['display'],
        data:function(){
            return{
                "myName":"jason",
                "myAge":28,
                "height":178,
                }
        },
        components:{
            "child":{
                template:"#tem1",
                props:['name','age','height','display'],
                data:function(){
                    return{
                        "displayd":false
                    }
                }
            }
        }
    }
        }
    })

片段实例

【热门文章】
【热门文章】