specifica dettagliata dei parametri e validatore custom
better for teams work
| | |
| | | name="Manuel Lorenz" |
| | | phone-number="123" |
| | | email-address="cicio@ciccio.it" |
| | | is-favorite="1" |
| | | ></friend-contact> |
| | | <friend-contact |
| | | name="Jeany Torpedo" |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | props: [ |
| | | 'name', |
| | | 'phoneNumber', |
| | | 'emailAddress', |
| | | 'isFavorite' |
| | | ], |
| | | // props: [ |
| | | // 'name', |
| | | // 'phoneNumber', |
| | | // 'emailAddress', |
| | | // 'isFavorite' |
| | | // ], |
| | | props: { |
| | | name: { |
| | | title: String, |
| | | required: true |
| | | }, |
| | | phoneNumber: { |
| | | title: String, |
| | | required: true |
| | | }, |
| | | emailAddress: { |
| | | title: String, |
| | | required: true |
| | | }, |
| | | isFavorite: { |
| | | title: String, |
| | | required: false, |
| | | default: '0', |
| | | validator: function (value) { |
| | | return value === '1' || value === '0'; |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | detailsAreVisible: false, |