Skip to content

Commit 0f1448f

Browse files
committed
fix: 部分针对抖音小程序进行visualhost特别判断
1 parent bc06834 commit 0f1448f

File tree

13 files changed

+52
-135
lines changed

13 files changed

+52
-135
lines changed

Diff for: uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue

+3-8
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,9 @@
8383
components: {
8484
uploadImage,
8585
uploadFile
86-
},
87-
options: {
88-
// #ifdef MP-TOUTIAO
89-
virtualHost: false,
90-
// #endif
91-
// #ifndef MP-TOUTIAO
92-
virtualHost: true
93-
// #endif
86+
},
87+
options: {
88+
virtualHost: true
9489
},
9590
emits: ['select', 'success', 'fail', 'progress', 'delete', 'update:modelValue', 'input'],
9691
props: {

Diff for: uni_modules/uni-forms/components/uni-forms/uni-forms.vue

+3-8
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,9 @@
6666
*/
6767
export default {
6868
name: 'uniForms',
69-
emits: ['validate', 'submit'],
70-
options: {
71-
// #ifdef MP-TOUTIAO
72-
virtualHost: false,
73-
// #endif
74-
// #ifndef MP-TOUTIAO
75-
virtualHost: true
76-
// #endif
69+
emits: ['validate', 'submit'],
70+
options: {
71+
virtualHost: true
7772
},
7873
props: {
7974
// 即将弃用

Diff for: uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@
225225
}
226226
227227
.uni-numbox .uni-numbox--disabled {
228-
color: #c0c0c0;
228+
color: #c0c0c0 !important;
229229
/* #ifdef H5 */
230230
cursor: not-allowed;
231231
/* #endif */
232232
}
233-
</style>
233+
</style>

Diff for: uni_modules/uni-row/components/uni-col/uni-col.vue

+3-8
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,9 @@
5050
// -1 默认值,因为在微信小程序端只给Number会有默认值0
5151
export default {
5252
name: 'uniCol',
53-
// #ifdef MP-WEIXIN
54-
options: {
55-
// #ifdef MP-TOUTIAO
56-
virtualHost: false,
57-
// #endif
58-
// #ifndef MP-TOUTIAO
59-
virtualHost: true
60-
// #endif
53+
// #ifdef MP-WEIXIN
54+
options: {
55+
virtualHost: true // 在微信小程序中将组件节点渲染为虚拟节点,更加接近Vue组件的表现
6156
},
6257
// #endif
6358
props: {

Diff for: uni_modules/uni-row/components/uni-row/uni-row.vue

+5-8
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@
2929
3030
export default {
3131
name: 'uniRow',
32-
componentName: 'uniRow',
33-
options: {
34-
// #ifdef MP-TOUTIAO
35-
virtualHost: false,
36-
// #endif
37-
// #ifdef MP-WEIXIN
38-
virtualHost: true
39-
// #endif
32+
componentName: 'uniRow',
33+
// #ifdef MP-WEIXIN
34+
options: {
35+
virtualHost: true // 在微信小程序中将组件节点渲染为虚拟节点,更加接近Vue组件的表现,可使用flex布局
4036
},
37+
// #endif
4138
props: {
4239
type: String,
4340
gutter: Number,

Diff for: uni_modules/uni-swipe-action/components/uni-swipe-action-item/uni-swipe-action-item.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,4 +345,4 @@
345345
}
346346
347347
/* #endif */
348-
</style>
348+
</style>

Diff for: uni_modules/uni-table/components/uni-table/uni-table.vue

+9-14
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,10 @@
3434
* @event {Function} selection-change 开启多选时,当选择项发生变化时会触发该事件
3535
*/
3636
export default {
37-
name: 'uniTable',
38-
options: {
39-
// #ifdef MP-TOUTIAO
40-
virtualHost: false,
41-
// #endif
42-
// #ifndef MP-TOUTIAO
43-
virtualHost: true
44-
// #endif
45-
},
37+
name: 'uniTable',
38+
options: {
39+
virtualHost: true
40+
},
4641
emits:['selection-change'],
4742
props: {
4843
data: {
@@ -95,10 +90,10 @@ export default {
9590
if (this.theadChildren) {
9691
rowspan = this.theadChildren.rowspan
9792
}
98-
93+
9994
// this.trChildren.length - rowspan
10095
this.noData = false
101-
// this.noData = newVal.length === 0
96+
// this.noData = newVal.length === 0
10297
}
10398
},
10499
created() {
@@ -252,9 +247,9 @@ export default {
252247
if (!this.theadChildren) {
253248
theadChildren = this.trChildren[0]
254249
}
255-
256-
257-
250+
251+
252+
258253
let childDomIndex = this.trChildren.findIndex((item, index) => child === item)
259254
if(childDomIndex < 0){
260255
childDomIndex = this.data.findIndex(v=>v[this.rowKey] === keyValue) + 1

Diff for: uni_modules/uni-table/components/uni-tbody/uni-tbody.vue

+14-21
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,24 @@
55
</tbody>
66
<!-- #endif -->
77
<!-- #ifndef H5 -->
8-
<view>
9-
<slot></slot>
10-
</view>
8+
<view><slot></slot></view>
119
<!-- #endif -->
1210
</template>
1311

1412
<script>
15-
export default {
16-
name: 'uniBody',
17-
options: {
18-
// #ifdef MP-TOUTIAO
19-
virtualHost: false,
20-
// #endif
21-
// #ifndef MP-TOUTIAO
22-
virtualHost: true
23-
// #endif
24-
},
25-
data() {
26-
return {
27-
28-
}
29-
},
30-
created() {},
31-
methods: {}
32-
}
13+
export default {
14+
name: 'uniBody',
15+
options: {
16+
virtualHost: true
17+
},
18+
data() {
19+
return {
20+
21+
}
22+
},
23+
created() {},
24+
methods: {}
25+
}
3326
</script>
3427

3528
<style>

Diff for: uni_modules/uni-table/components/uni-td/uni-td.vue

+4-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<slot></slot>
1111
</view>
1212
<!-- #endif -->
13-
13+
1414
</template>
1515

1616
<script>
@@ -21,14 +21,9 @@
2121
* @property {Number} align = [left|center|right] 单元格对齐方式
2222
*/
2323
export default {
24-
name: 'uniTd',
25-
options: {
26-
// #ifdef MP-TOUTIAO
27-
virtualHost: false,
28-
// #endif
29-
// #ifndef MP-TOUTIAO
30-
virtualHost: true
31-
// #endif
24+
name: 'uniTd',
25+
options: {
26+
virtualHost: true
3227
},
3328
props: {
3429
width: {

Diff for: uni_modules/uni-table/components/uni-th/filter-dropdown.vue

+1-6
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,7 @@
8787
checkBox
8888
},
8989
options: {
90-
// #ifdef MP-TOUTIAO
91-
virtualHost: false,
92-
// #endif
93-
// #ifndef MP-TOUTIAO
9490
virtualHost: true
95-
// #endif
9691
},
9792
props: {
9893
filterType: {
@@ -298,7 +293,7 @@
298293

299294
<style lang="scss">
300295
$uni-primary: #1890ff !default;
301-
296+
302297
.flex-r {
303298
display: flex;
304299
flex-direction: row;

Diff for: uni_modules/uni-table/components/uni-th/uni-th.vue

+4-9
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,10 @@
3939
* @event {Function} sort-change 排序触发事件
4040
*/
4141
export default {
42-
name: 'uniTh',
43-
options: {
44-
// #ifdef MP-TOUTIAO
45-
virtualHost: false,
46-
// #endif
47-
// #ifndef MP-TOUTIAO
48-
virtualHost: true
49-
// #endif
50-
},
42+
name: 'uniTh',
43+
options: {
44+
virtualHost: true
45+
},
5146
components: {
5247
// #ifdef H5
5348
dropdown

Diff for: uni_modules/uni-ui/changelog.md

-38
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,3 @@
1-
## 1.5.5(2024-03-31)
2-
- uni-data-select 修复 在vue2下:style动态绑定导致编译失败的bug
3-
- uni-easyinput 修复 在头条小程序下丢失事件绑定的问题
4-
- uni-popup 修复 uni-popup-dialog 双向绑定时初始化逻辑修正
5-
- uni-segmented-control 修复 在vue2下:style动态绑定导致编译失败的bug
6-
- uni-steps 修复 uni-steps为竖排列时,文本长度过长引起点错乱的bug
7-
## 1.5.3(2024-03-22)
8-
- uni-collapse 修复 titleBorder类型修正
9-
- uni-data-checkbox 修复 单选模式下选中样式不生效的bug
10-
- uni-easyinput 修复 在密码输入情况下 清除和小眼睛覆盖bug 在edge浏览器下显示双眼睛bug
11-
- uni-file-picker 补充 删除文件时返回文件下标
12-
- uni-number-box 新增 设置宽度属性width(单位:px)
13-
- uni-popup 修复 uni-popup-dialog 数据输入时修正为双向绑定
14-
- uni-search-bar 修复 清空按钮emit值错误的bug
15-
- uni-segmented-control 新增 inActiveColor属性,可供配置未激活时的颜色
16-
- uni-tag 优化 app下边框过窄导致不显示的bug
17-
- uni-tooltip 修复 弹出位置修正
18-
## 1.5.2(2024-02-22)
19-
- uni-countdown 新增 支持控制小时,分钟的显隐:showHour showMinute
20-
- uni-datetime-picker 修复 日历的close事件触发异常的bug [详情](https://github.com/dcloudio/uni-ui/issues/844)
21-
- uni-datetime-picker 修复 h5平台 右边日历的月份默认+1的bug [详情](https://github.com/dcloudio/uni-ui/issues/841)
22-
- uni-easyinput 新增 左侧插槽:left
23-
- uni-file-picker 新增 微信小程序选择视频时改用chooseMedia,并返回视频缩略图
24-
- uni-number-box 修复 step步长小于1时,键盘类型为number的bug
25-
- uni-popup 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
26-
- uni-search-bar 新增 设置输入框字体颜色:textColor
27-
- uni-search-bar 修复 uni-search-bar在支付宝小程序下样式兼容问题
28-
## 1.5.1(2024-02-19)
29-
- uni-data-checkbox 修复 修复错别字chagne为change
30-
- uni-datetime-picker 修复 隐藏“秒”时,在IOS15及以下版本时出现 结束时间在开始时间之前 的bug [详情](https://github.com/dcloudio/uni-ui/issues/788)
31-
- uni-easyinput 修复 onBlur的emit传值错误
32-
- uni-easyinput 补充 adjust-position文档属性补充
33-
- uni-easyinput 补充 adjust-position属性传递值:(Boolean)当键盘弹起时,是否自动上推页面
34-
- uni-number-box 修复 加减号垂直位置偏移样式问题
35-
- uni-popup 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
36-
- uni-popup 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
37-
- uni-popup 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
38-
- uni-search-bar 修复 uni-search-bar居中问题,现在默认居左,并修复样式偏移问题
391
## 1.5.0(2024-01-13)
402
- 修复 npm包结构目录错误的问题
413
- uni-calendar 修复 回到今天时,月份显示不一致问题

Diff for: uni_modules/uni-ui/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"id": "uni-ui",
33
"displayName": "uni-ui",
4-
"version": "1.5.5",
4+
"version": "1.5.0",
55
"description": "uni-ui 是基于uni-app的、全端兼容的、高性能UI框架",
66
"keywords": [
77
"uni-ui",
88
"uniui",
99
"UI组件库",
1010
"ui框架",
1111
"ui库"
12-
],
12+
],
1313
"repository": "https://github.com/dcloudio/uni-ui",
1414
"engines": {
1515
"HBuilderX": "^3.2.10"
@@ -126,4 +126,4 @@
126126
}
127127
}
128128
}
129-
}
129+
}

0 commit comments

Comments
 (0)