From e4b3689f5e57313d3a6f6a23ae3605805bcdaf12 Mon Sep 17 00:00:00 2001
From: Teng <461587751@qq.com>
Date: Mon, 8 Dec 2025 09:28:13 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
component/public/errorshow.vue | 148 ++++++++++++----------------
component/public/toastPlugin.js | 127 ------------------------
main.js | 4 +-
pages/Warehouse/warehome.vue | 1 +
pages/procurement/purchaseorder.vue | 2 +-
pages/watch/index.vue | 8 +-
static/error.png | Bin 0 -> 9529 bytes
7 files changed, 67 insertions(+), 223 deletions(-)
delete mode 100644 component/public/toastPlugin.js
create mode 100644 static/error.png
diff --git a/component/public/errorshow.vue b/component/public/errorshow.vue
index 40390d8..ceec013 100644
--- a/component/public/errorshow.vue
+++ b/component/public/errorshow.vue
@@ -1,112 +1,86 @@
+
+
- 温馨提示1111
-
-
-
- {{ font }}
-
- 取消
- 确定
-
+
+ {{ font }}
+ 确定
-
+
+
-
\ No newline at end of file
diff --git a/component/public/toastPlugin.js b/component/public/toastPlugin.js
deleted file mode 100644
index 5068518..0000000
--- a/component/public/toastPlugin.js
+++ /dev/null
@@ -1,127 +0,0 @@
-// // src/plugins/toastPlugin.js
-// import { createApp, reactive, h } from 'vue'
-// import ToastHost from './errorshow.vue' // 路径按项目调整
-
-// const defaultOpt = {
-// title: '',
-// duration: 1500,
-// type: 'text', // 'text' | 'dialog'
-// mask: true,
-// maskClosable: true,
-// success: null,
-// complete: null
-// }
-
-// function createToastService() {
-// const state = reactive({
-// show: false,
-// title: '',
-// duration: defaultOpt.duration,
-// type: defaultOpt.type,
-// mask: defaultOpt.mask,
-// maskClosable: defaultOpt.maskClosable,
-// success: null,
-// complete: null,
-// _timer: null,
-// // dialog 专用(可扩展)
-// confirmText: '确定',
-// cancelText: '取消'
-// })
-
-// function clearTimer() {
-// if (state._timer) {
-// clearTimeout(state._timer)
-// state._timer = null
-// }
-// }
-
-// function showToast(options = {}) {
-// const opt = Object.assign({}, defaultOpt, options)
-// clearTimer()
-// state.title = opt.title == null ? '' : String(opt.title)
-// state.duration = Number(opt.duration) || defaultOpt.duration
-// state.type = opt.type
-// state.mask = !!opt.mask
-// state.maskClosable = opt.maskClosable !== undefined ? !!opt.maskClosable : true
-// state.success = typeof opt.success === 'function' ? opt.success : null
-// state.complete = typeof opt.complete === 'function' ? opt.complete : null
-// state.confirmText = opt.confirmText || '确定'
-// state.cancelText = opt.cancelText || '取消'
-// state.show = true
-
-// return new Promise((resolve) => {
-// if (state.type === 'text') {
-// state._timer = setTimeout(() => {
-// hideToast()
-// if (state.complete) try { state.complete() } catch(e){/*ignore*/}
-// resolve()
-// }, state.duration)
-// } else {
-// // dialog 不自动关闭,等待按键或 maskClosable
-// // 但为了安全可以选择不自动超时
-// // resolve 将在按钮或 mask 关闭时调用
-// }
-// })
-// }
-
-// function hideToast(by = 'complete') {
-// clearTimer()
-// state.show = false
-// // 执行回调
-// if (by === 'success' && state.success) {
-// try { state.success() } catch(e) {}
-// }
-// if (state.complete) {
-// try { state.complete() } catch(e) {}
-// }
-// // 清理
-// state.success = null
-// state.complete = null
-// state.title = ''
-// state.type = defaultOpt.type
-// }
-
-// // dialog 按钮触发
-// function onConfirm() {
-// hideToast('success')
-// }
-// function onCancel() {
-// hideToast('complete')
-// }
-
-// return {
-// state,
-// showToast,
-// hideToast,
-// onConfirm,
-// onCancel
-// }
-// }
-
-// // 插件安装函数
-// export default {
-// install: (app, options = {}) => {
-// const service = createToastService()
-
-// // programmatically mount the host component once
-// const container = document.createElement('div')
-// document.body.appendChild(container)
-// const toastApp = createApp({
-// render() {
-// return h(ToastHost, { service })
-// }
-// })
-// toastApp.mount(container)
-
-// // 全局方法
-// app.config.globalProperties.$errorshow = service.showToast
-// // 兼容直接使用 window.uni.showToast
-// if (typeof window !== 'undefined') {
-// window.uni = window.uni || {}
-// window.uni.$errorshow = service.showToast
-// }
-
-// // 可选:返回 service 以便调试
-// app.provide('toastService', service)
-// }
-// }
diff --git a/main.js b/main.js
index 89207aa..60486b4 100644
--- a/main.js
+++ b/main.js
@@ -19,7 +19,7 @@ import {
createSSRApp
} from 'vue'
import donghua from '@/component/public/donghua.vue'
-// import errorshow from '@/component/public/toastPlugin.js'
+import errorshow from '@/component/public/errorshow.vue'
import tanchuang from '@/pages/procurement/components/tanchuang.vue';
// import arrowkeys from '@/component/public/newgame/arrowkeys.vue'
export function createApp() {
@@ -29,6 +29,8 @@ export function createApp() {
app.use(uView)
app.component('donghua', donghua)
app.component('tanchuang', tanchuang)
+ app.component('errorshow', errorshow)
+
// app.component('arrowkeys', arrowkeys)
return {
diff --git a/pages/Warehouse/warehome.vue b/pages/Warehouse/warehome.vue
index f51cad4..151418b 100644
--- a/pages/Warehouse/warehome.vue
+++ b/pages/Warehouse/warehome.vue
@@ -96,6 +96,7 @@
+
diff --git a/pages/procurement/purchaseorder.vue b/pages/procurement/purchaseorder.vue
index 1606c3c..a3efa04 100644
--- a/pages/procurement/purchaseorder.vue
+++ b/pages/procurement/purchaseorder.vue
@@ -23,7 +23,7 @@
分享
-
+
作废
diff --git a/pages/watch/index.vue b/pages/watch/index.vue
index ab4bbe5..cade83c 100644
--- a/pages/watch/index.vue
+++ b/pages/watch/index.vue
@@ -225,6 +225,7 @@
-->
+
@@ -232,19 +233,12 @@