vue sub-assembly component obtained in real time value of the parent came

By the sub-assembly, use can watch

props:{
        taskRelationFileList:{
            type: Array,
            default:() => {
                return []
            }
        }
    },

watch:{
        taskRelationFileList(val){ 
            this.taskRelationFileList_  = getArrSpecificValues(val, 'fileId');
        }
    },

Guess you like

Origin www.cnblogs.com/-roc/p/12143793.html