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,81 +1,82 @@
import '@/common/uview-init.js'
export default {
props: {
// 图片地址
// 鍥剧墖鍦板潃
src: {
type: String,
default: uni.$u.props.image.src
},
// 裁剪模式
// 瑁佸壀妯″紡
mode: {
type: String,
default: uni.$u.props.image.mode
},
// 宽度,单位任意
// 瀹藉害锛屽崟浣嶄换鎰?
width: {
type: [String, Number],
default: uni.$u.props.image.width
},
// 高度,单位任意
// 楂樺害锛屽崟浣嶄换鎰?
height: {
type: [String, Number],
default: uni.$u.props.image.height
},
// 图片形状,circle-圆形,square-方形
// 鍥剧墖褰㈢姸锛宑ircle-鍦嗗舰锛宻quare-鏂瑰舰
shape: {
type: String,
default: uni.$u.props.image.shape
},
// 圆角,单位任意
// 鍦嗚锛屽崟浣嶄换鎰?
radius: {
type: [String, Number],
default: uni.$u.props.image.radius
},
// 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序
// 鏄惁鎳掑姞杞斤紝寰俊灏忕▼搴忋€丄pp銆佺櫨搴﹀皬绋嬪簭銆佸瓧鑺傝烦鍔ㄥ皬绋嬪簭
lazyLoad: {
type: Boolean,
default: uni.$u.props.image.lazyLoad
},
// 开启长按图片显示识别微信小程序码菜单
// 寮€鍚暱鎸夊浘鐗囨樉绀鸿瘑鍒井淇″皬绋嬪簭鐮佽彍鍗?
showMenuByLongpress: {
type: Boolean,
default: uni.$u.props.image.showMenuByLongpress
},
// 加载中的图标,或者小图片
// 鍔犺浇涓殑鍥炬爣锛屾垨鑰呭皬鍥剧墖
loadingIcon: {
type: String,
default: uni.$u.props.image.loadingIcon
},
// 加载失败的图标,或者小图片
// 鍔犺浇澶辫触鐨勫浘鏍囷紝鎴栬€呭皬鍥剧墖
errorIcon: {
type: String,
default: uni.$u.props.image.errorIcon
},
// 是否显示加载中的图标或者自定义的slot
// 鏄惁鏄剧ず鍔犺浇涓殑鍥炬爣鎴栬€呰嚜瀹氫箟鐨剆lot
showLoading: {
type: Boolean,
default: uni.$u.props.image.showLoading
},
// 是否显示加载错误的图标或者自定义的slot
// 鏄惁鏄剧ず鍔犺浇閿欒鐨勫浘鏍囨垨鑰呰嚜瀹氫箟鐨剆lot
showError: {
type: Boolean,
default: uni.$u.props.image.showError
},
// 是否需要淡入效果
// 鏄惁闇€瑕佹贰鍏ユ晥鏋?
fade: {
type: Boolean,
default: uni.$u.props.image.fade
},
// 只支持网络资源,只对微信小程序有效
// 鍙敮鎸佺綉缁滆祫婧愶紝鍙寰俊灏忕▼搴忔湁鏁?
webp: {
type: Boolean,
default: uni.$u.props.image.webp
},
// 过渡时间,单位ms
// 杩囨浮鏃堕棿锛屽崟浣峬s
duration: {
type: [String, Number],
default: uni.$u.props.image.duration
},
// 背景颜色,用于深色页面加载图片时,为了和背景色融合
// 鑳屾櫙棰滆壊锛岀敤浜庢繁鑹查〉闈㈠姞杞藉浘鐗囨椂锛屼负浜嗗拰鑳屾櫙鑹茶瀺鍚?
bgColor: {
type: String,
default: uni.$u.props.image.bgColor