From f5366810a788245733b2cf19088decad527eede3 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Mon, 24 Jun 2024 17:37:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.staging | 2 +- src/components/XyTable/index.vue | 8 +- src/views/assets/fileList.vue | 221 +++++++++++++++++++++++++++++++ src/views/component/detail.vue | 21 +-- 4 files changed, 241 insertions(+), 11 deletions(-) create mode 100644 src/views/assets/fileList.vue diff --git a/.env.staging b/.env.staging index f018ffa..9361378 100644 --- a/.env.staging +++ b/.env.staging @@ -6,7 +6,7 @@ ENV = 'staging' # base api VUE_APP_BASE_API=http://wuxiwuye.ali251.langye.net/ VUE_APP_UPLOAD_API=http://wuxiwuye.ali251.langye.net/api/admin/upload-file -VUE_APP_PREVIEW=http://view.ali251.langye.net:8012/onlinePreview +VUE_APP_PREVIEW=//view.langye.net:8012/onlinePreview # base api #VUE_APP_BASE_API=http://192.168.221.31:9001/ #VUE_APP_UPLOAD_API=http://192.168.221.31:9001/api/admin/upload-file diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue index 99ed9de..61c4dba 100644 --- a/src/components/XyTable/index.vue +++ b/src/components/XyTable/index.vue @@ -20,6 +20,10 @@ export default { type: String, default: "data", }, //请求后需要获取表格数据键名 + totalProp: { + type: String, + default: "total" + }, //操作权限 auths: { @@ -245,7 +249,7 @@ export default { }) .then((res) => { this.listData = this.getByStrkey(res.data, this.resProp); - this.totalData = res.data.total; + this.totalData = this.getByStrkey(res.data, this.totalProp); this.$emit('loaded') setTimeout(() => { this.loading = false; @@ -265,7 +269,7 @@ export default { },false) .then((res) => { this.listData = this.getByStrkey(res, this.resProp); - this.totalData = res.total; + this.totalData = this.getByStrkey(res, this.totalProp); this.$emit('loaded') setTimeout(() => { this.loading = false; diff --git a/src/views/assets/fileList.vue b/src/views/assets/fileList.vue new file mode 100644 index 0000000..ec3c473 --- /dev/null +++ b/src/views/assets/fileList.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/src/views/component/detail.vue b/src/views/component/detail.vue index c65df37..cff4f74 100644 --- a/src/views/component/detail.vue +++ b/src/views/component/detail.vue @@ -295,10 +295,10 @@