From 7501138e313d4c913ed691e45b95e0f8cb26931a Mon Sep 17 00:00:00 2001 From: nsnail Date: Wed, 27 Nov 2024 17:58:38 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A8=20=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20(#226)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: tk --- .../src/components/naColOperation/index.vue | 4 +- .../admin/src/config/naColOperation.js | 2 + .../admin/src/views/guest/view-doc.vue | 16 ++++--- .../admin/src/views/sys/doc/list/index.vue | 43 ++++++++++++------- 4 files changed, 42 insertions(+), 23 deletions(-) diff --git a/src/frontend/admin/src/components/naColOperation/index.vue b/src/frontend/admin/src/components/naColOperation/index.vue index 6bfb9e71..15fb0acd 100644 --- a/src/frontend/admin/src/components/naColOperation/index.vue +++ b/src/frontend/admin/src/components/naColOperation/index.vue @@ -12,7 +12,7 @@ @@ -22,7 +22,7 @@ v-else v-loading="loading" :icon="item.icon" - :title="item.title" + :title="$t(item.title)" :type="item.type" @click="click(item, row, vue)" size="small"> diff --git a/src/frontend/admin/src/config/naColOperation.js b/src/frontend/admin/src/config/naColOperation.js index b556c9e1..45e0ceb5 100644 --- a/src/frontend/admin/src/config/naColOperation.js +++ b/src/frontend/admin/src/config/naColOperation.js @@ -2,12 +2,14 @@ export default { buttons: [ { icon: 'el-icon-view', + title: '查看', click: async (row, vue) => { vue.dialog.save = { row, mode: 'view' } }, }, { icon: 'el-icon-edit', + title: '编辑', click: async (row, vue) => { vue.dialog.save = { row, mode: 'edit' } }, diff --git a/src/frontend/admin/src/views/guest/view-doc.vue b/src/frontend/admin/src/views/guest/view-doc.vue index 33108a08..852dc114 100644 --- a/src/frontend/admin/src/views/guest/view-doc.vue +++ b/src/frontend/admin/src/views/guest/view-doc.vue @@ -1,6 +1,5 @@ { + vue.dialog.save = { row, mode: 'edit' } }, - { - icon: 'el-icon-delete', - confirm: true, - title: '删除文档', - click: rowDel, - type: 'danger', - }, - ]) - " + }, + { + icon: 'el-icon-share', + click: share, + title: '分享文档', + }, + { + icon: 'el-icon-delete', + confirm: true, + title: '删除文档', + click: rowDel, + type: 'danger', + }, + ]" :vue="this" width="180" /> @@ -171,6 +181,9 @@ export default { }, inject: ['reload'], methods: { + viewClick(row) { + window.open(window.location.origin + `/guest/view-doc/${row.id}`) + }, filterChange(data) { Object.entries(data).forEach(([key, value]) => { this.$refs.search.form.dy[key] = value === 'true' ? true : value === 'false' ? false : value