P
P
pegas2018-01-30 21:10:52
Vue.js
pegas, 2018-01-30 21:10:52

What does the model option in a component do?

model: {
    prop: 'checked',
    event: 'change'
  },
  props: {
    checked: Boolean,
    value: String
  }

I didn’t find a description about model, and such a props entry is not at all clear what it does.
Sidebar from:
https://ru.vuejs.org/v2/guide/components.html#%D0%...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Polos, 2018-01-30
@dimovich85

This props entry allows you to determine in advance which props the component will accept, and what data types are expected in those props.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question