diff --git a/src/main/resources/static/js/homePage.js b/src/main/resources/static/js/homePage.js index 9227617..a7ccf3e 100644 --- a/src/main/resources/static/js/homePage.js +++ b/src/main/resources/static/js/homePage.js @@ -2,10 +2,61 @@ var Main = { data() { return { activeIndex: '1', - activeIndex2: '1' + activeIndex2: '1', + fileList: [{ + name: 'food.jpeg', + url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' + }, { + name: 'food2.jpeg', + url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' + }], + tableData3: [{ + date: '2016-05-03', + name: '王小虎', + address: '上海市普陀区金沙江路 1518 弄' + }, { + date: '2016-05-02', + name: '王小虎', + address: '上海市普陀区金沙江路 1518 弄' + }, { + date: '2016-05-04', + name: '王小虎', + address: '上海市普陀区金沙江路 1518 弄' + }, { + date: '2016-05-01', + name: '王小虎', + address: '上海市普陀区金沙江路 1518 弄' + }, { + date: '2016-05-08', + name: '王小虎', + address: '上海市普陀区金沙江路 1518 弄' + }, { + date: '2016-05-06', + name: '王小虎', + address: '上海市普陀区金沙江路 1518 弄' + }, { + date: '2016-05-07', + name: '王小虎', + address: '上海市普陀区金沙江路 1518 弄' + }] }; }, methods: { + submitUpload() { + this.$refs.upload.submit(); + }, + handleRemove(file, fileList) { + console.log(file, fileList); + }, + handlePreview(file) { + console.log(file); + }, + handleExceed(files, fileList) { + this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); + }, + beforeRemove(file, fileList) { + return this.$confirm(`确定移除 ${ file.name }?`); + }, handleSelect(key, keyPath) { console.log(key, keyPath); }, diff --git a/src/main/resources/templates/home/home.html b/src/main/resources/templates/home/home.html index 15f640c..69b4d75 100644 --- a/src/main/resources/templates/home/home.html +++ b/src/main/resources/templates/home/home.html @@ -7,11 +7,46 @@