From b10361be2d79ee184bd630ebaa951580258e742c Mon Sep 17 00:00:00 2001 From: tianyongbao Date: Sun, 28 Jun 2026 13:11:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=8B=E6=8B=89=E6=A1=86=E8=B6=85?= =?UTF-8?q?=E9=95=BF=E6=97=B6=E5=80=99=EF=BC=8C=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8=EF=BC=8C=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +- scripts/patch-u-input.js | 129 ++++++++++++++++++ .../accounts/accountDealRecord/addEdit.vue | 21 +-- .../accounts/creditTransferRecord/addEdit.vue | 11 +- .../accounts/debitTransferRecord/addEdit.vue | 8 +- .../accounts/investAccountDeal/addEdit.vue | 8 +- .../accounts/investTransferRecord/addEdit.vue | 8 +- .../accounts/lendTransferRecord/addEdit.vue | 11 +- .../accounts/posTransferRecord/addEdit.vue | 8 +- src/pages/work/base/bankBaseInfo/addEdit.vue | 6 +- src/pages/work/base/creditCard/addEdit.vue | 19 +-- .../work/base/creditCard/adjustLimit.vue | 15 +- src/pages/work/base/debitCard/addEdit.vue | 16 +-- src/pages/work/base/debitCard/adjustLimit.vue | 12 +- src/pages/work/base/financials/addEdit.vue | 8 +- src/pages/work/base/futures/addEdit.vue | 8 +- src/pages/work/base/lend/addEdit.vue | 13 +- src/pages/work/base/posmachine/addEdit.vue | 17 +-- src/pages/work/base/stocks/addEdit.vue | 8 +- .../work/bill/creditCardBill/addEdit.vue | 8 +- .../bill/creditInstallmentHistory/addEdit.vue | 10 +- .../detailsAddEdit.vue | 5 +- .../work/bill/creditQueryRecord/addEdit.vue | 5 +- src/pages/work/bill/futuresBill/addEdit.vue | 5 +- .../work/bill/onlineLendHistory/addEdit.vue | 13 +- .../bill/onlineLendHistory/detailsAddEdit.vue | 8 +- .../work/bill/peopleLendHistory/addEdit.vue | 8 +- src/pages/work/bill/stocksBill/addEdit.vue | 5 +- src/pages/work/heartJourney/addEdit.vue | 6 +- .../work/product/productInfor/addEdit.vue | 6 +- .../product/productPriceRecord/addEdit.vue | 11 +- .../pages/system/config/addEdit.vue | 3 +- src/pages_mine/pages/system/dept/addEdit.vue | 6 +- src/pages_mine/pages/system/dict/addEdit.vue | 3 +- .../pages/system/dictData/addEdit.vue | 6 +- src/pages_mine/pages/system/job/addEdit.vue | 9 +- src/pages_mine/pages/system/menu/addEdit.vue | 18 +-- src/pages_mine/pages/system/post/addEdit.vue | 3 +- src/pages_mine/pages/system/role/addEdit.vue | 6 +- src/pages_mine/pages/system/user/addEdit.vue | 15 +- src/static/scss/form-common.scss | 2 +- 41 files changed, 260 insertions(+), 230 deletions(-) create mode 100644 scripts/patch-u-input.js diff --git a/package.json b/package.json index 3031712..d13d5f5 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "build:quickapp-webview-union": "uni build -p quickapp-webview-union", "type-check": "vue-tsc --noEmit", "clean:linux": "rm -rf dist || rm -rf node_modules", - "clean:windows": "rd /s /q dist || rd /s /q node_modules" + "clean:windows": "rd /s /q dist || rd /s /q node_modules", + "postinstall": "node scripts/patch-u-input.js" }, "dependencies": { "@dcloudio/uni-app": "3.0.0-4000820240401001", diff --git a/scripts/patch-u-input.js b/scripts/patch-u-input.js new file mode 100644 index 0000000..40620ef --- /dev/null +++ b/scripts/patch-u-input.js @@ -0,0 +1,129 @@ +/** + * uView u-input 组件补丁 + * 在 isSelectLike(readonly/disabled)模式下用 view 代替原生 input 显示文字 + * 使下拉选择框超长文字可以自动换行完整显示 + * + * 通过 package.json 的 postinstall 自动执行 + */ +const fs = require('fs'); +const path = require('path'); + +const filePath = path.join('node_modules', 'uview-plus', 'components', 'u-input', 'u-input.vue'); + +if (!fs.existsSync(filePath)) { + console.log('[patch-u-input] u-input.vue not found, skipping'); + process.exit(0); +} + +let content = fs.readFileSync(filePath, 'utf8'); +let patched = false; + +// === 补丁1:模板中添加 v-if/v-else === +if (!content.includes('u-input__content__field-wrapper__field--selectlike')) { + const oldTemplate = ` + + {{ innerValue }} + {{ placeholder }} + + + - + - + - + - + - + @@ -52,15 +47,13 @@ - + - + diff --git a/src/pages/work/accounts/creditTransferRecord/addEdit.vue b/src/pages/work/accounts/creditTransferRecord/addEdit.vue index d3e72d6..15bf1fe 100644 --- a/src/pages/work/accounts/creditTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/creditTransferRecord/addEdit.vue @@ -15,21 +15,19 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + - + @@ -39,8 +37,7 @@ - + diff --git a/src/pages/work/accounts/debitTransferRecord/addEdit.vue b/src/pages/work/accounts/debitTransferRecord/addEdit.vue index 9d51c0a..779cd44 100644 --- a/src/pages/work/accounts/debitTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/debitTransferRecord/addEdit.vue @@ -13,21 +13,19 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + - + diff --git a/src/pages/work/accounts/investAccountDeal/addEdit.vue b/src/pages/work/accounts/investAccountDeal/addEdit.vue index 81d3bef..d1f9091 100644 --- a/src/pages/work/accounts/investAccountDeal/addEdit.vue +++ b/src/pages/work/accounts/investAccountDeal/addEdit.vue @@ -13,21 +13,19 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + diff --git a/src/pages/work/accounts/investTransferRecord/addEdit.vue b/src/pages/work/accounts/investTransferRecord/addEdit.vue index 0549d1f..0f790e3 100644 --- a/src/pages/work/accounts/investTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/investTransferRecord/addEdit.vue @@ -15,21 +15,19 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + - + diff --git a/src/pages/work/accounts/lendTransferRecord/addEdit.vue b/src/pages/work/accounts/lendTransferRecord/addEdit.vue index 1351720..624be78 100644 --- a/src/pages/work/accounts/lendTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/lendTransferRecord/addEdit.vue @@ -13,28 +13,25 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + - + - + diff --git a/src/pages/work/accounts/posTransferRecord/addEdit.vue b/src/pages/work/accounts/posTransferRecord/addEdit.vue index 3f9c928..1d68cb3 100644 --- a/src/pages/work/accounts/posTransferRecord/addEdit.vue +++ b/src/pages/work/accounts/posTransferRecord/addEdit.vue @@ -15,8 +15,7 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + @@ -36,14 +35,13 @@ - + - + diff --git a/src/pages/work/base/bankBaseInfo/addEdit.vue b/src/pages/work/base/bankBaseInfo/addEdit.vue index ae826c0..12d9ff8 100644 --- a/src/pages/work/base/bankBaseInfo/addEdit.vue +++ b/src/pages/work/base/bankBaseInfo/addEdit.vue @@ -21,15 +21,13 @@ - + - + diff --git a/src/pages/work/base/creditCard/addEdit.vue b/src/pages/work/base/creditCard/addEdit.vue index 3281c75..6c7e2aa 100644 --- a/src/pages/work/base/creditCard/addEdit.vue +++ b/src/pages/work/base/creditCard/addEdit.vue @@ -13,8 +13,7 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + @@ -32,8 +31,7 @@ - + @@ -55,8 +53,7 @@ - + @@ -67,8 +64,7 @@ - + @@ -83,7 +79,7 @@ - + @@ -93,7 +89,7 @@ - + @@ -104,8 +100,7 @@ - + diff --git a/src/pages/work/base/creditCard/adjustLimit.vue b/src/pages/work/base/creditCard/adjustLimit.vue index a044d41..c9cb28a 100644 --- a/src/pages/work/base/creditCard/adjustLimit.vue +++ b/src/pages/work/base/creditCard/adjustLimit.vue @@ -23,16 +23,14 @@ - + - + @@ -56,24 +54,21 @@ - + - + - + diff --git a/src/pages/work/base/debitCard/addEdit.vue b/src/pages/work/base/debitCard/addEdit.vue index b5ab4cd..d9c393a 100644 --- a/src/pages/work/base/debitCard/addEdit.vue +++ b/src/pages/work/base/debitCard/addEdit.vue @@ -13,8 +13,7 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + @@ -28,8 +27,7 @@ - + @@ -39,16 +37,14 @@ - + - + @@ -62,13 +58,13 @@ - + - + diff --git a/src/pages/work/base/debitCard/adjustLimit.vue b/src/pages/work/base/debitCard/adjustLimit.vue index ac7411b..4838021 100644 --- a/src/pages/work/base/debitCard/adjustLimit.vue +++ b/src/pages/work/base/debitCard/adjustLimit.vue @@ -22,8 +22,7 @@ - + @@ -47,24 +46,21 @@ - + - + - + diff --git a/src/pages/work/base/financials/addEdit.vue b/src/pages/work/base/financials/addEdit.vue index ad7d64a..0572b70 100644 --- a/src/pages/work/base/financials/addEdit.vue +++ b/src/pages/work/base/financials/addEdit.vue @@ -26,8 +26,7 @@ - + @@ -37,14 +36,13 @@ --> - + - + diff --git a/src/pages/work/base/futures/addEdit.vue b/src/pages/work/base/futures/addEdit.vue index ca2de18..d84ef06 100644 --- a/src/pages/work/base/futures/addEdit.vue +++ b/src/pages/work/base/futures/addEdit.vue @@ -26,22 +26,20 @@ - + - + - + diff --git a/src/pages/work/base/lend/addEdit.vue b/src/pages/work/base/lend/addEdit.vue index 22ab175..5300e0d 100644 --- a/src/pages/work/base/lend/addEdit.vue +++ b/src/pages/work/base/lend/addEdit.vue @@ -13,8 +13,7 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + @@ -28,15 +27,13 @@ - + - + @@ -46,13 +43,13 @@ - + - + diff --git a/src/pages/work/base/posmachine/addEdit.vue b/src/pages/work/base/posmachine/addEdit.vue index 39fa165..3c94372 100644 --- a/src/pages/work/base/posmachine/addEdit.vue +++ b/src/pages/work/base/posmachine/addEdit.vue @@ -17,15 +17,13 @@ - + - + @@ -35,8 +33,7 @@ - + @@ -60,8 +57,7 @@ - + @@ -77,14 +73,13 @@ - + - + - + diff --git a/src/pages/work/bill/creditCardBill/addEdit.vue b/src/pages/work/bill/creditCardBill/addEdit.vue index ab22ca5..37a9862 100644 --- a/src/pages/work/bill/creditCardBill/addEdit.vue +++ b/src/pages/work/bill/creditCardBill/addEdit.vue @@ -15,14 +15,13 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + @@ -32,8 +31,7 @@ - + diff --git a/src/pages/work/bill/creditInstallmentHistory/addEdit.vue b/src/pages/work/bill/creditInstallmentHistory/addEdit.vue index b492317..b82c389 100644 --- a/src/pages/work/bill/creditInstallmentHistory/addEdit.vue +++ b/src/pages/work/bill/creditInstallmentHistory/addEdit.vue @@ -13,8 +13,7 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + @@ -24,7 +23,7 @@ - + @@ -38,8 +37,7 @@ - + @@ -57,7 +55,7 @@ - + diff --git a/src/pages/work/bill/creditInstallmentHistory/detailsAddEdit.vue b/src/pages/work/bill/creditInstallmentHistory/detailsAddEdit.vue index 09387ed..67694af 100644 --- a/src/pages/work/bill/creditInstallmentHistory/detailsAddEdit.vue +++ b/src/pages/work/bill/creditInstallmentHistory/detailsAddEdit.vue @@ -13,7 +13,7 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + @@ -35,8 +35,7 @@ - + diff --git a/src/pages/work/bill/creditQueryRecord/addEdit.vue b/src/pages/work/bill/creditQueryRecord/addEdit.vue index 25105c0..544bfe8 100644 --- a/src/pages/work/bill/creditQueryRecord/addEdit.vue +++ b/src/pages/work/bill/creditQueryRecord/addEdit.vue @@ -17,14 +17,13 @@ - + - + diff --git a/src/pages/work/bill/futuresBill/addEdit.vue b/src/pages/work/bill/futuresBill/addEdit.vue index 6152a41..76abfee 100644 --- a/src/pages/work/bill/futuresBill/addEdit.vue +++ b/src/pages/work/bill/futuresBill/addEdit.vue @@ -13,14 +13,13 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + diff --git a/src/pages/work/bill/onlineLendHistory/addEdit.vue b/src/pages/work/bill/onlineLendHistory/addEdit.vue index 80b4803..38158cd 100644 --- a/src/pages/work/bill/onlineLendHistory/addEdit.vue +++ b/src/pages/work/bill/onlineLendHistory/addEdit.vue @@ -13,8 +13,7 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + @@ -24,14 +23,13 @@ - + - + @@ -45,8 +43,7 @@ - + @@ -64,7 +61,7 @@ - + diff --git a/src/pages/work/bill/onlineLendHistory/detailsAddEdit.vue b/src/pages/work/bill/onlineLendHistory/detailsAddEdit.vue index 1f13ec9..eab690f 100644 --- a/src/pages/work/bill/onlineLendHistory/detailsAddEdit.vue +++ b/src/pages/work/bill/onlineLendHistory/detailsAddEdit.vue @@ -13,14 +13,13 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + @@ -42,8 +41,7 @@ - + diff --git a/src/pages/work/bill/peopleLendHistory/addEdit.vue b/src/pages/work/bill/peopleLendHistory/addEdit.vue index cc3fdfe..db2be0d 100644 --- a/src/pages/work/bill/peopleLendHistory/addEdit.vue +++ b/src/pages/work/bill/peopleLendHistory/addEdit.vue @@ -13,8 +13,7 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + @@ -24,7 +23,7 @@ - + @@ -34,8 +33,7 @@ - + diff --git a/src/pages/work/bill/stocksBill/addEdit.vue b/src/pages/work/bill/stocksBill/addEdit.vue index eb58219..8b234fa 100644 --- a/src/pages/work/bill/stocksBill/addEdit.vue +++ b/src/pages/work/bill/stocksBill/addEdit.vue @@ -13,14 +13,13 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + diff --git a/src/pages/work/heartJourney/addEdit.vue b/src/pages/work/heartJourney/addEdit.vue index 4b548ae..5fe281f 100644 --- a/src/pages/work/heartJourney/addEdit.vue +++ b/src/pages/work/heartJourney/addEdit.vue @@ -17,15 +17,13 @@ - + - + diff --git a/src/pages/work/product/productInfor/addEdit.vue b/src/pages/work/product/productInfor/addEdit.vue index 88b7f34..f2579aa 100644 --- a/src/pages/work/product/productInfor/addEdit.vue +++ b/src/pages/work/product/productInfor/addEdit.vue @@ -21,15 +21,13 @@ - + - + diff --git a/src/pages/work/product/productPriceRecord/addEdit.vue b/src/pages/work/product/productPriceRecord/addEdit.vue index 2b0e69f..56e57f3 100644 --- a/src/pages/work/product/productPriceRecord/addEdit.vue +++ b/src/pages/work/product/productPriceRecord/addEdit.vue @@ -13,15 +13,13 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + - + @@ -35,14 +33,13 @@ - + - + diff --git a/src/pages_mine/pages/system/config/addEdit.vue b/src/pages_mine/pages/system/config/addEdit.vue index 8e29732..0833ac1 100644 --- a/src/pages_mine/pages/system/config/addEdit.vue +++ b/src/pages_mine/pages/system/config/addEdit.vue @@ -28,8 +28,7 @@ - + diff --git a/src/pages_mine/pages/system/dept/addEdit.vue b/src/pages_mine/pages/system/dept/addEdit.vue index c72cbdf..404ba97 100644 --- a/src/pages_mine/pages/system/dept/addEdit.vue +++ b/src/pages_mine/pages/system/dept/addEdit.vue @@ -13,8 +13,7 @@ :labelStyle="{ color: '#333333', fontSize: '30rpx', marginRight: '24rpx' }"> - + @@ -45,8 +44,7 @@ - + diff --git a/src/pages_mine/pages/system/dict/addEdit.vue b/src/pages_mine/pages/system/dict/addEdit.vue index cb181d6..098e19a 100644 --- a/src/pages_mine/pages/system/dict/addEdit.vue +++ b/src/pages_mine/pages/system/dict/addEdit.vue @@ -23,8 +23,7 @@ - + diff --git a/src/pages_mine/pages/system/dictData/addEdit.vue b/src/pages_mine/pages/system/dictData/addEdit.vue index dd2bfee..e8a7b88 100644 --- a/src/pages_mine/pages/system/dictData/addEdit.vue +++ b/src/pages_mine/pages/system/dictData/addEdit.vue @@ -33,16 +33,14 @@ - + - + diff --git a/src/pages_mine/pages/system/job/addEdit.vue b/src/pages_mine/pages/system/job/addEdit.vue index 8c7d88b..5d1fb09 100644 --- a/src/pages_mine/pages/system/job/addEdit.vue +++ b/src/pages_mine/pages/system/job/addEdit.vue @@ -33,24 +33,21 @@ - + - + - + diff --git a/src/pages_mine/pages/system/menu/addEdit.vue b/src/pages_mine/pages/system/menu/addEdit.vue index adaede1..3166a5d 100644 --- a/src/pages_mine/pages/system/menu/addEdit.vue +++ b/src/pages_mine/pages/system/menu/addEdit.vue @@ -14,16 +14,14 @@ - + - + @@ -54,32 +52,28 @@ - + - + - + - + diff --git a/src/pages_mine/pages/system/post/addEdit.vue b/src/pages_mine/pages/system/post/addEdit.vue index ab148c9..2ea6b0c 100644 --- a/src/pages_mine/pages/system/post/addEdit.vue +++ b/src/pages_mine/pages/system/post/addEdit.vue @@ -27,8 +27,7 @@ - + diff --git a/src/pages_mine/pages/system/role/addEdit.vue b/src/pages_mine/pages/system/role/addEdit.vue index ff2bba7..d1102bc 100644 --- a/src/pages_mine/pages/system/role/addEdit.vue +++ b/src/pages_mine/pages/system/role/addEdit.vue @@ -28,8 +28,7 @@ - + @@ -41,8 +40,7 @@ - + diff --git a/src/pages_mine/pages/system/user/addEdit.vue b/src/pages_mine/pages/system/user/addEdit.vue index d5d3bf8..c869233 100644 --- a/src/pages_mine/pages/system/user/addEdit.vue +++ b/src/pages_mine/pages/system/user/addEdit.vue @@ -38,24 +38,21 @@ - + - + - + @@ -72,8 +69,7 @@ - + @@ -90,8 +86,7 @@ - + diff --git a/src/static/scss/form-common.scss b/src/static/scss/form-common.scss index 7d72727..524868c 100644 --- a/src/static/scss/form-common.scss +++ b/src/static/scss/form-common.scss @@ -48,7 +48,7 @@ } /* ==================== 表单 label 防换行 ==================== */ -/* 配合 label-width="230rpx" 固定宽度,保险措施防止意外换行 */ +/* 配合各页面 label-width 固定宽度,保险措施防止意外换行 */ .form-view .u-form-item__body__left__content__label { white-space: nowrap !important; }