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:
@@ -1,69 +1,70 @@
|
||||
import '@/common/uview-init.js'
|
||||
export default {
|
||||
props: {
|
||||
// 是否显示圆点
|
||||
// 鏄惁鏄剧ず鍦嗙偣
|
||||
isDot: {
|
||||
type: Boolean,
|
||||
default: uni.$u.props.badge.isDot
|
||||
},
|
||||
// 显示的内容
|
||||
// 鏄剧ず鐨勫唴瀹?
|
||||
value: {
|
||||
type: [Number, String],
|
||||
default: uni.$u.props.badge.value
|
||||
},
|
||||
// 是否显示
|
||||
// 鏄惁鏄剧ず
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: uni.$u.props.badge.show
|
||||
},
|
||||
// 最大值,超过最大值会显示 '{max}+'
|
||||
// 鏈€澶у€硷紝瓒呰繃鏈€澶у€间細鏄剧ず '{max}+'
|
||||
max: {
|
||||
type: [Number, String],
|
||||
default: uni.$u.props.badge.max
|
||||
},
|
||||
// 主题类型,error|warning|success|primary
|
||||
// 涓婚绫诲瀷锛宔rror|warning|success|primary
|
||||
type: {
|
||||
type: String,
|
||||
default: uni.$u.props.badge.type
|
||||
},
|
||||
// 当数值为 0 时,是否展示 Badge
|
||||
// 褰撴暟鍊间负 0 鏃讹紝鏄惁灞曠ず Badge
|
||||
showZero: {
|
||||
type: Boolean,
|
||||
default: uni.$u.props.badge.showZero
|
||||
},
|
||||
// 背景颜色,优先级比type高,如设置,type参数会失效
|
||||
// 鑳屾櫙棰滆壊锛屼紭鍏堢骇姣攖ype楂橈紝濡傝缃紝type鍙傛暟浼氬け鏁?
|
||||
bgColor: {
|
||||
type: [String, null],
|
||||
default: uni.$u.props.badge.bgColor
|
||||
},
|
||||
// 字体颜色
|
||||
// 瀛椾綋棰滆壊
|
||||
color: {
|
||||
type: [String, null],
|
||||
default: uni.$u.props.badge.color
|
||||
},
|
||||
// 徽标形状,circle-四角均为圆角,horn-左下角为直角
|
||||
// 寰芥爣褰㈢姸锛宑ircle-鍥涜鍧囦负鍦嗚锛宧orn-宸︿笅瑙掍负鐩磋
|
||||
shape: {
|
||||
type: String,
|
||||
default: uni.$u.props.badge.shape
|
||||
},
|
||||
// 设置数字的显示方式,overflow|ellipsis|limit
|
||||
// overflow会根据max字段判断,超出显示`${max}+`
|
||||
// ellipsis会根据max判断,超出显示`${max}...`
|
||||
// limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
|
||||
// 璁剧疆鏁板瓧鐨勬樉绀烘柟寮忥紝overflow|ellipsis|limit
|
||||
// overflow浼氭牴鎹甿ax瀛楁鍒ゆ柇锛岃秴鍑烘樉绀篳${max}+`
|
||||
// ellipsis浼氭牴鎹甿ax鍒ゆ柇锛岃秴鍑烘樉绀篳${max}...`
|
||||
// limit浼氫緷鎹?000浣滀负鍒ゆ柇鏉′欢锛岃秴鍑?000锛屾樉绀篳${value/1000}K`锛屾瘮濡?.2k銆?.34w锛屾渶澶氫繚鐣?浣嶅皬鏁?
|
||||
numberType: {
|
||||
type: String,
|
||||
default: uni.$u.props.badge.numberType
|
||||
},
|
||||
// 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
|
||||
// 璁剧疆badge鐨勪綅缃亸绉伙紝鏍煎紡涓?[x, y]锛屼篃鍗宠缃殑涓簍op鍜宺ight鐨勫€硷紝absolute涓簍rue鏃舵湁鏁?
|
||||
offset: {
|
||||
type: Array,
|
||||
default: uni.$u.props.badge.offset
|
||||
},
|
||||
// 是否反转背景和字体颜色
|
||||
// 鏄惁鍙嶈浆鑳屾櫙鍜屽瓧浣撻鑹?
|
||||
inverted: {
|
||||
type: Boolean,
|
||||
default: uni.$u.props.badge.inverted
|
||||
},
|
||||
// 是否绝对定位
|
||||
// 鏄惁缁濆瀹氫綅
|
||||
absolute: {
|
||||
type: Boolean,
|
||||
default: uni.$u.props.badge.absolute
|
||||
|
||||
Reference in New Issue
Block a user