From cc371fad855838b44e53e165e8d902a7b683d14b Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 1 Aug 2025 00:55:10 +0800 Subject: [PATCH] fix: enable tips --- open-isle-cli/src/utils/vditor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/open-isle-cli/src/utils/vditor.js b/open-isle-cli/src/utils/vditor.js index c70306faa..667dc316f 100644 --- a/open-isle-cli/src/utils/vditor.js +++ b/open-isle-cli/src/utils/vditor.js @@ -81,7 +81,7 @@ export function createVditor(editorId, options = {}) { multiple: false, handler: async (files) => { const file = files[0] - vditor.tip.show('图片上传中', 0) + vditor.tip('图片上传中', 0) vditor.disabled() const res = await fetch( `${API_BASE_URL}/api/upload/presign?filename=${encodeURIComponent(file.name)}`, @@ -89,14 +89,14 @@ export function createVditor(editorId, options = {}) { ) if (!res.ok) { vditor.enable() - vditor.tip.hide() + vditor.tip('获取上传地址失败') return '获取上传地址失败' } const info = await res.json() const put = await fetch(info.uploadUrl, { method: 'PUT', body: file }) if (!put.ok) { vditor.enable() - vditor.tip.hide() + vditor.tip('上传失败') return '上传失败' } @@ -127,7 +127,7 @@ export function createVditor(editorId, options = {}) { } vditor.insertValue(md + '\n') vditor.enable() - vditor.tip.hide() + vditor.tip('上传成功') return null } },