From 2122e30c435e4287a035162aee4469a8e558f408 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 22 四月 2026 13:43:56 +0800
Subject: [PATCH] 新增采购详情和产品明细展示功能
---
src/plugins/modal.ts | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/plugins/modal.ts b/src/plugins/modal.ts
index 4a97dd3..46d622c 100644
--- a/src/plugins/modal.ts
+++ b/src/plugins/modal.ts
@@ -14,9 +14,22 @@
* @param content 娑堟伅鍐呭
*/
msgError(content: string): void {
+ const text = (content ?? '').toString()
+ // showToast 鍦ㄥ绔粡甯镐細瀵� title 鍋氬崟琛�/闀垮害鎴柇锛涢暱鏂囨鐢� showModal 淇濊瘉瀹屾暣灞曠ず
+ const shouldUseModal = text.length > 16 || text.includes('\n')
+ if (shouldUseModal) {
+ uni.showModal({
+ title: '閿欒',
+ content: text,
+ showCancel: false,
+ confirmText: '鐭ラ亾浜�',
+ })
+ return
+ }
uni.showToast({
- title: content,
- icon: 'error'
+ title: text,
+ icon: 'none',
+ duration: 2500,
})
},
/**
--
Gitblit v1.9.3