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' : '';
        }
    },
原文地址:https://www.cnblogs.com/yadi001/p/15524220.html