Cristiano Magro
2024-12-28 fb09dca31f9a64ca4287579006014157a3d8156c
specifica dettagliata dei parametri e validatore custom

better for teams work
2 files modified
36 ■■■■ changed files
07 - development setup/vue-cli-01-a-new-vue-project/src/App.vue 1 ●●●● patch | view | raw | blame | history
07 - development setup/vue-cli-01-a-new-vue-project/src/components/FriendContact.vue 35 ●●●● patch | view | raw | blame | history
07 - development setup/vue-cli-01-a-new-vue-project/src/App.vue
@@ -8,6 +8,7 @@
      name="Manuel Lorenz" 
      phone-number="123" 
      email-address="cicio@ciccio.it"
      is-favorite="1"
      ></friend-contact>
      <friend-contact
      name="Jeany Torpedo" 
07 - development setup/vue-cli-01-a-new-vue-project/src/components/FriendContact.vue
@@ -17,12 +17,35 @@
<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,