From fed8eb76f604afd1ba253106181e999630f23acf Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期五, 14 四月 2023 22:29:42 +0800 Subject: [PATCH] fix 修复 取消oss预览状态修改 图标变化不正常问题 --- src/views/system/oss/index.vue | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/views/system/oss/index.vue b/src/views/system/oss/index.vue index 8bd94ee..4dddd37 100644 --- a/src/views/system/oss/index.vue +++ b/src/views/system/oss/index.vue @@ -316,16 +316,10 @@ /** 鐢ㄦ埛鐘舵�佷慨鏀� */ const handlePreviewListResource = async (preview: boolean) => { let text = preview ? "鍚敤" : "鍋滅敤"; - try { - await proxy?.$modal.confirm('纭瑕�"' + text + '""棰勮鍒楄〃鍥剧墖"閰嶇疆鍚�?'); - await proxy?.updateConfigByKey("sys.oss.previewListResource", preview); - getList() - proxy?.$modal.msgSuccess(text + "鎴愬姛"); - } catch { - previewListResource.value = previewListResource.value !== true; - } - - + await proxy?.$modal.confirm('纭瑕�"' + text + '""棰勮鍒楄〃鍥剧墖"閰嶇疆鍚�?'); + await proxy?.updateConfigByKey("sys.oss.previewListResource", preview); + getList() + proxy?.$modal.msgSuccess(text + "鎴愬姛"); } /** 鍒犻櫎鎸夐挳鎿嶄綔 */ const handleDelete = async (row?: OssVO) => { @@ -336,6 +330,7 @@ getList(); proxy?.$modal.msgSuccess("鍒犻櫎鎴愬姛"); } + onMounted(() => { getList(); }) -- Gitblit v1.9.3