vue how to access v-model from child component

前端 未结 1 1006
我寻月下人不归
我寻月下人不归 2021-01-21 02:15

my child component is like this


and then I access the component from inside like thi

1条回答
  •  轮回少年
    2021-01-21 02:40

    To use v-model on custom components, the component needs to:

    • have a prop (not a data property) named value:

      
      
      
      
    • and emit an input event with new values:

      
      

    demo

    0 讨论(0)
提交回复
热议问题