fix: Vue2 到 Vue3 迁移兼容修复

- 修复 uni-popup-dialog/uni-data-picker keypress.js 中 $once 在 H5 端报错(改用生命周期钩子清理监听)
- main.js 补 $delete globalProperties polyfill(z-paging 自动高度逻辑依赖)
- App.vue onLaunch 补设备信息初始化,修复 X-Device-Id 恒为 unknown
- 68 处 ::v-deep、/deep/ 旧深度选择器替换为 :deep()(含 login-page.scss)
- zetank-personalpage 组件 .sync 修饰符改为 v-model:xxx(Vue3 已移除 .sync)
- vite.config.js HBuilderX 路径支持 HBUILDERX_HOME 环境变量覆盖
- 根 package.json 清理 image-grid 插件遗留元数据
- 收录此前未提交的 uView Vue3 兜底补丁(common/uview-init.js 及各组件 props.js)
This commit is contained in:
2026-09-06 19:36:36 +08:00
parent a68bf43112
commit 99c139d6ce
126 changed files with 1223 additions and 1080 deletions
@@ -1,86 +1,87 @@
import '@/common/uview-init.js'
export default {
props: {
// 是否展示modal
// 鏄惁灞曠ずmodal
show: {
type: Boolean,
default: uni.$u.props.modal.show
},
// 标题
// 鏍囬
title: {
type: [String],
default: uni.$u.props.modal.title
},
// 弹窗内容
// 寮圭獥鍐呭
content: {
type: String,
default: uni.$u.props.modal.content
},
// 确认文案
// 纭鏂囨
confirmText: {
type: String,
default: uni.$u.props.modal.confirmText
},
// 取消文案
// 鍙栨秷鏂囨
cancelText: {
type: String,
default: uni.$u.props.modal.cancelText
},
// 是否显示确认按钮
// 鏄惁鏄剧ず纭鎸夐挳
showConfirmButton: {
type: Boolean,
default: uni.$u.props.modal.showConfirmButton
},
// 是否显示取消按钮
// 鏄惁鏄剧ず鍙栨秷鎸夐挳
showCancelButton: {
type: Boolean,
default: uni.$u.props.modal.showCancelButton
},
// 确认按钮颜色
// 纭鎸夐挳棰滆壊
confirmColor: {
type: String,
default: uni.$u.props.modal.confirmColor
},
// 取消文字颜色
// 鍙栨秷鏂囧瓧棰滆壊
cancelColor: {
type: String,
default: uni.$u.props.modal.cancelColor
},
// 对调确认和取消的位置
// 瀵硅皟纭鍜屽彇娑堢殑浣嶇疆
buttonReverse: {
type: Boolean,
default: uni.$u.props.modal.buttonReverse
},
// 是否开启缩放效果
// 鏄惁寮€鍚缉鏀炬晥鏋?
zoom: {
type: Boolean,
default: uni.$u.props.modal.zoom
},
// 是否异步关闭,只对确定按钮有效
// 鏄惁寮傛鍏抽棴锛屽彧瀵圭‘瀹氭寜閽湁鏁?
asyncClose: {
type: Boolean,
default: uni.$u.props.modal.asyncClose
},
// 是否允许点击遮罩关闭modal
// 鏄惁鍏佽鐐瑰嚮閬僵鍏抽棴modal
closeOnClickOverlay: {
type: Boolean,
default: uni.$u.props.modal.closeOnClickOverlay
},
// 给一个负的margin-top,往上偏移,避免和键盘重合的情况
// 缁欎竴涓礋鐨刴argin-top锛屽線涓婂亸绉伙紝閬垮厤鍜岄敭鐩橀噸鍚堢殑鎯呭喌
negativeTop: {
type: [String, Number],
default: uni.$u.props.modal.negativeTop
},
// modal宽度,不支持百分比,可以数值,px,rpx单位
// modal瀹藉害锛屼笉鏀寔鐧惧垎姣旓紝鍙互鏁板€硷紝px锛宺px鍗曚綅
width: {
type: [String, Number],
default: uni.$u.props.modal.width
},
// 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
// 纭鎸夐挳鐨勬牱寮忥紝circle-鍦嗗舰锛宻quare-鏂瑰舰锛屽璁剧疆锛屽皢涓嶄細鏄剧ず鍙栨秷鎸夐挳
confirmButtonShape: {
type: String,
default: uni.$u.props.modal.confirmButtonShape
},
// 弹窗动画过度时间
// 寮圭獥鍔ㄧ敾杩囧害鏃堕棿
duration:{
type:String | Number,
default: uni.$u.props.modal.duration