From cd5b0f676567323c9671f32146e1df0cd4bcb887 Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Sat, 7 Feb 2026 23:24:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8A=9F=E8=83=BDbug=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=EF=BC=8C=E5=AE=8C=E5=96=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/system/config/addEdit.vue | 12 +- src/pages_mine/pages/system/dept/addEdit.vue | 20 +-- src/pages_mine/pages/system/dict/addEdit.vue | 53 ++---- .../pages/system/dictData/addEdit.vue | 6 +- src/pages_mine/pages/system/menu/addEdit.vue | 72 +++----- .../pages/system/notice/addEdit.vue | 159 +++++++++--------- src/pages_mine/pages/system/post/addEdit.vue | 52 ++---- src/pages_mine/pages/system/role/addEdit.vue | 40 ++--- src/pages_mine/pages/system/user/addEdit.vue | 153 +++++++++-------- src/static/scss/global.scss | 40 ++++- 10 files changed, 278 insertions(+), 329 deletions(-) diff --git a/src/pages_mine/pages/system/config/addEdit.vue b/src/pages_mine/pages/system/config/addEdit.vue index 0a1da6b..9fac622 100644 --- a/src/pages_mine/pages/system/config/addEdit.vue +++ b/src/pages_mine/pages/system/config/addEdit.vue @@ -26,12 +26,10 @@ inputAlign="left" :customStyle="getInputStyle('configValue')"> - - + - - + @@ -180,11 +178,7 @@ function submit() { if (errors && Array.isArray(errors)) { errorFields.value = errors.map(err => err.field || err.prop) } - console.log('验证失败') - proxy.$refs['uToast'].show({ - type: 'error', - message: '请填写完整信息' - }) + proxy.$modal.msgError('请填写完整信息') }) } diff --git a/src/pages_mine/pages/system/dept/addEdit.vue b/src/pages_mine/pages/system/dept/addEdit.vue index a63e99a..dfc8bed 100644 --- a/src/pages_mine/pages/system/dept/addEdit.vue +++ b/src/pages_mine/pages/system/dept/addEdit.vue @@ -11,12 +11,12 @@ - - + + - - + + @@ -43,12 +43,11 @@ inputAlign="left" :customStyle="getInputStyle('email')"> - - + + - - + @@ -274,10 +273,7 @@ function submit() { if (errors && Array.isArray(errors)) { errorFields.value = errors.map(err => err.field || err.prop) } - proxy.$refs['uToast'].show({ - type: 'error', - message: '请填写完整信息' - }) + proxy.$modal.msgError('请填写完整信息') }) } diff --git a/src/pages_mine/pages/system/dict/addEdit.vue b/src/pages_mine/pages/system/dict/addEdit.vue index a7df104..7446a2a 100644 --- a/src/pages_mine/pages/system/dict/addEdit.vue +++ b/src/pages_mine/pages/system/dict/addEdit.vue @@ -31,7 +31,6 @@ - @@ -60,7 +59,9 @@ const inputBaseStyle = { border: '2rpx solid #dcdfe6', borderRadius: '8rpx', padding: '0 24rpx', - height: '68rpx' + height: '68rpx', + width: '100%', + boxSizing: 'border-box' } // 输入框错误样式 @@ -69,7 +70,9 @@ const inputErrorStyle = { border: '2rpx solid #f56c6c', borderRadius: '8rpx', padding: '0 24rpx', - height: '68rpx' + height: '68rpx', + width: '100%', + boxSizing: 'border-box' } // 根据字段名获取输入框样式 @@ -103,28 +106,20 @@ function getDetail(id) { // 提交 function submit() { errorFields.value = [] // 清空错误字段 - console.log('submit 被调用') proxy.$refs['uForm'].validate().then(() => { - console.log('验证通过', form.dictId) if (form.dictId) { updateType(form).then(() => { - console.log('修改成功,将跳转') - proxy.$refs['uToast'].show({ - message: '修改成功', complete() { - console.log('complete 被调用,执行跳转') - uni.navigateTo({ url: `/pages_mine/pages/system/dict/list` }) - } - }) + proxy.$modal.msgSuccess('修改成功') + setTimeout(() => { + uni.navigateTo({ url: `/pages_mine/pages/system/dict/list` }) + }, 1500) }) } else { addType(form).then(() => { - console.log('新增成功,将跳转') - proxy.$refs['uToast'].show({ - message: '新增成功', complete() { - console.log('complete 被调用,执行跳转') - uni.navigateTo({ url: `/pages_mine/pages/system/dict/list` }) - } - }) + proxy.$modal.msgSuccess('新增成功') + setTimeout(() => { + uni.navigateTo({ url: `/pages_mine/pages/system/dict/list` }) + }, 1500) }) } }).catch((errors) => { @@ -132,11 +127,7 @@ function submit() { if (errors && Array.isArray(errors)) { errorFields.value = errors.map(err => err.field || err.prop) } - console.log('验证失败') - proxy.$refs['uToast'].show({ - type: 'error', - message: '请填写完整信息' - }) + proxy.$modal.msgError('请填写完整信息') }) } @@ -182,20 +173,6 @@ function submit() { } } } - -.select-input-wrapper { - position: relative; - - .select-arrow { - position: absolute; - right: 24rpx; - top: 50%; - transform: translateY(-50%); - color: #c0c4cc; - font-size: 28rpx; - pointer-events: none; - } -}