소스 검색

fix 修复 oss 配置 预览开关点×关闭控制台报错问题

疯狂的狮子li 1 년 전
부모
커밋
21ab064cf7
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      src/views/system/oss/index.vue

+ 6 - 4
src/views/system/oss/index.vue

@@ -316,10 +316,12 @@ const handleDownload = (row: OssVO) => {
 /** 用户状态修改  */
 const handlePreviewListResource = async (preview: boolean) => {
     let text = preview ? "启用" : "停用";
-    await proxy?.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?');
-    await proxy?.updateConfigByKey("sys.oss.previewListResource", preview);
-    getList()
-    proxy?.$modal.msgSuccess(text + "成功");
+    try {
+      await proxy?.$modal.confirm('确认要"' + text + '""预览列表图片"配置吗?');
+      await proxy?.updateConfigByKey("sys.oss.previewListResource", preview);
+      getList()
+      proxy?.$modal.msgSuccess(text + "成功");
+    } catch { return }
 }
 /** 删除按钮操作 */
 const handleDelete = async (row?: OssVO) => {