From d9dbfba67e5d24eef899fe254424940173f4cfa9 Mon Sep 17 00:00:00 2001 From: ZiuChen <457353192@qq.com> Date: Mon, 19 Sep 2022 18:45:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=BB=E7=95=8C=E9=9D=A2=E6=9C=80?= =?UTF-8?q?=E5=A4=9A=E5=B1=95=E7=A4=BA=E6=95=B0=E9=87=8F=E6=94=B9=E4=B8=BA?= =?UTF-8?q?5=20=E4=BF=AE=E6=94=B9=E8=B7=AF=E5=BE=84=E5=90=8E=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/setting.json | 2 +- src/views/Setting.vue | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/data/setting.json b/src/data/setting.json index d35dc6c..c009875 100644 --- a/src/data/setting.json +++ b/src/data/setting.json @@ -2,7 +2,7 @@ "database.path": "", "database.maxsize": 800, "database.maxage": 14, - "operation.shown": ["copy", "view", "collect", "remove"], + "operation.shown": ["copy", "view", "collect", "un-collect", "remove"], "operation.custom": [ { "id": "custom.1663583455000", diff --git a/src/views/Setting.vue b/src/views/Setting.vue index cc90d61..54e49b8 100644 --- a/src/views/Setting.vue +++ b/src/views/Setting.vue @@ -36,7 +36,7 @@ class="operation-select" v-model="shown" multiple - :multiple-limit="4" + :multiple-limit="5" placeholder="请选择" :teleported="false" > @@ -93,22 +93,6 @@ const handleLinkClick = (index) => { utools.shellOpenExternal(links[index]) } -const handlePathBtnClick = (param) => { - if (param === 'modify') { - const file = document.getElementById('database-path') - file.click() - file.onchange = (e) => { - const { files } = e.target - if (files.length > 0) { - path.value = files[0].path - } - ElMessage.info('修改成功 不要忘记点击保存按钮') - } - } else if (param === 'open') { - utools.shellShowItemInFolder(path.value) - } -} - const handleSaveBtnClick = () => { // 校验格式 if (path.value === '') { @@ -154,6 +138,22 @@ const handleSaveBtnClick = () => { ElMessage.success('保存成功 重启插件生效') } +const handlePathBtnClick = (param) => { + if (param === 'modify') { + const file = document.getElementById('database-path') + file.click() + file.onchange = (e) => { + const { files } = e.target + if (files.length > 0) { + path.value = files[0].path + } + handleSaveBtnClick() + } + } else if (param === 'open') { + utools.shellShowItemInFolder(path.value) + } +} + const handleRestoreBtnClick = () => { ElMessageBox.confirm('确定要重置设置吗', '警告', { confirmButtonText: '确定',