Cristiano Magro
2024-12-28 fb09dca31f9a64ca4287579006014157a3d8156c
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,