computed和watch

  watch: {
    tableData(newval,oldval){//}
  },
    computed: {
        /**
         * 文件url
         */
        urlList() {
            return this.fileList?.map(item => item.url) || [];
        },
        /**
         * 上传达到上限样式
         */
        fileExceed() {
            return (this.limit > 0 && this.fileList?.length == this.limit) ? 'file-exceed' : '';
        }
    },

 

posted on 2021-11-08 14:45  危险*  阅读(19)  评论(0编辑  收藏  举报