javascript - vue parent-child component has problems passing data through attributes
阿神
阿神 2017-05-16 13:38:22
0
3
607

Write an app component that contains a v-header component

Pass the seller to v-header through the following situation

Receive in the v-header component in the following form

But it keeps reporting errors

I don’t know if there is something wrong with the format

阿神
阿神

闭关修行中......

reply all(3)
Ty80

The seller in the parent component is empty.
Whether the seller has been defined in the data of the parent component

左手右手慢动作

There is no seller defined in the app component

export default {
    data: function() {
        return {
            seller: {
                avatar: ''
            }
        };
    }
}

And when initializing the seller, it is best to write down the key value of the seller

漂亮男人

You’d better take a look at the difference between prop and data. The error message is clearly written and seller is not defined

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template