Skip to content

Commit 3da06be

Browse files
committed
fix: 修复 popup 组件超出一屏不居中的问题
update: calendar 日历、collapse 、drawer 抽屉、notice-bar 、swipe-action 兼容新建编译器
1 parent 993b57b commit 3da06be

6 files changed

Lines changed: 22 additions & 4 deletions

File tree

‎components/uni-calendar/uni-calendar.vue‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@
133133
}
134134
},
135135
data() {
136+
/**
137+
* TODO 兼容新旧编译器
138+
* 新编译器(自定义组件模式)下必须使用固定数值,否则部分平台下会获取不到节点。
139+
* 随机数值是在旧编译器下使用的,旧编译器模式已经不推荐使用,后续直接废掉随机数值的写法。
140+
*/
136141
const elClass = this.__call_hook ? 'uni_canlender' : `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
137142
return {
138143
dateShow: false, // 日期是否选择

‎components/uni-collapse-item/uni-collapse-item.vue‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353
}
5454
},
5555
data() {
56+
/**
57+
* TODO 兼容新旧编译器
58+
* 新编译器(自定义组件模式)下必须使用固定数值,否则部分平台下会获取不到节点。
59+
* 随机数值是在旧编译器下使用的,旧编译器模式已经不推荐使用,后续直接废掉随机数值的写法。
60+
*/
5661
const elId = this.__callback_hook ? 'uni_collapse_item' : `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
5762
return {
5863
isOpen: false,

‎components/uni-drawer/uni-drawer.vue‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
return {
3838
visibleSync: false,
3939
showDrawer: false,
40-
rightMode: false,
41-
closeTimer: null,
42-
watchTimer: null
40+
rightMode: false
4341
}
4442
},
4543
watch: {

‎components/uni-notice-bar/uni-notice-bar.vue‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@
6868
}
6969
},
7070
data() {
71+
/**
72+
* TODO 兼容新旧编译器
73+
* 新编译器(自定义组件模式)下必须使用固定数值,否则部分平台下会获取不到节点。
74+
* 随机数值是在旧编译器下使用的,旧编译器模式已经不推荐使用,后续直接废掉随机数值的写法。
75+
*/
7176
const elId = this.__call_hook ? 'uni_notice_bar' : `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
7277
return {
7378
elId: elId,

‎components/uni-popup/uni-popup.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
}
109109
110110
.uni-popup {
111-
position: absolute;
111+
position: fixed;
112112
z-index: 999;
113113
background-color: #ffffff;
114114
}

‎components/uni-swipe-action/uni-swipe-action.vue‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@
4242
}
4343
},
4444
data() {
45+
/**
46+
* TODO 兼容新旧编译器
47+
* 新编译器(自定义组件模式)下必须使用固定数值,否则部分平台下会获取不到节点。
48+
* 随机数值是在旧编译器下使用的,旧编译器模式已经不推荐使用,后续直接废掉随机数值的写法。
49+
*/
4550
const elId = this.__call_hook ? 'uni_swipe_action' : `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
4651
return {
4752
elId: elId,

0 commit comments

Comments
 (0)