File tree Expand file tree Collapse file tree 17 files changed +123
-112
lines changed Expand file tree Collapse file tree 17 files changed +123
-112
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " uView" ,
3
3
"appid" : " __UNI__60F4B81" ,
4
4
"description" : " 多平台快速开发的UI框架" ,
5
- "versionName" : " 1.6.5 " ,
5
+ "versionName" : " 1.6.6 " ,
6
6
"versionCode" : " 100" ,
7
7
"transformPx" : false ,
8
8
"app-plus" : {
Original file line number Diff line number Diff line change 17
17
<view class =" u-config-item" >
18
18
<view class =" u-item-title" >模式选择</view >
19
19
<u-table >
20
- <u-tr >
21
- <u-td >
20
+ <u-tr class = " u-tr " >
21
+ <u-td class = " u-td " >
22
22
<u-button :hair-line =" false" size =" mini" @click =" modeChange('car')" >购物车为空</u-button >
23
23
</u-td >
24
- <u-td >
24
+ <u-td class = " u-td " >
25
25
<u-button :hair-line =" false" size =" mini" @click =" modeChange('page')" >页面不存在</u-button >
26
26
</u-td >
27
- <u-td >
27
+ <u-td class = " u-td " >
28
28
<u-button :hair-line =" false" size =" mini" @click =" modeChange('search')" >没有搜索结果</u-button >
29
29
</u-td >
30
30
</u-tr >
31
- <u-tr >
32
- <u-td >
31
+ <u-tr class = " u-tr " >
32
+ <u-td class = " u-td " >
33
33
<u-button :hair-line =" false" size =" mini" @click =" modeChange('address')" >没有收货地址</u-button >
34
34
</u-td >
35
- <u-td >
35
+ <u-td class = " u-td " >
36
36
<u-button :hair-line =" false" size =" mini" @click =" modeChange('wifi')" >没有WiFi</u-button >
37
37
</u-td >
38
- <u-td >
38
+ <u-td class = " u-td " >
39
39
<u-button :hair-line =" false" size =" mini" @click =" modeChange('order')" >订单为空</u-button >
40
40
</u-td >
41
41
</u-tr >
42
- <u-tr >
43
- <u-td >
42
+ <u-tr class = " u-tr " >
43
+ <u-td class = " u-td " >
44
44
<u-button :hair-line =" false" size =" mini" @click =" modeChange('coupon')" >没有优惠券</u-button >
45
45
</u-td >
46
- <u-td >
46
+ <u-td class = " u-td " >
47
47
<u-button :hair-line =" false" size =" mini" @click =" modeChange('favor')" >没有收藏</u-button >
48
48
</u-td >
49
- <u-td >
49
+ <u-td class = " u-td " >
50
50
<u-button :hair-line =" false" size =" mini" @click =" modeChange('permission')" >无权限</u-button >
51
51
</u-td >
52
52
</u-tr >
53
- <u-tr >
54
- <u-td >
53
+ <u-tr class = " u-tr " >
54
+ <u-td class = " u-td " >
55
55
<u-button :hair-line =" false" size =" mini" @click =" modeChange('history')" >无历史记录</u-button >
56
56
</u-td >
57
- <u-td >
57
+ <u-td class = " u-td " >
58
58
<u-button :hair-line =" false" size =" mini" @click =" modeChange('news')" >无新闻列表</u-button >
59
59
</u-td >
60
- <u-td >
60
+ <u-td class = " u-td " >
61
61
<u-button :hair-line =" false" size =" mini" @click =" modeChange('message')" >消息列表为空</u-button >
62
62
</u-td >
63
63
</u-tr >
64
- <u-tr >
65
- <u-td >
64
+ <u-tr class = " u-tr " >
65
+ <u-td class = " u-td " >
66
66
<u-button :hair-line =" false" size =" mini" @click =" modeChange('list')" >列表为空</u-button >
67
67
</u-td >
68
- <u-td >
68
+ <u-td class = " u-td " >
69
69
<u-button :hair-line =" false" size =" mini" @click =" modeChange('data')" >数据为空</u-button >
70
70
</u-td >
71
- <u-td >
71
+ <u-td class = " u-td " >
72
72
待扩展
73
73
</u-td >
74
74
</u-tr >
Original file line number Diff line number Diff line change 9
9
:show-title =" showTitle" :async-close =" asyncClose"
10
10
@confirm =" confirm" :content =" content"
11
11
>
12
- <!-- #ifndef MP-WEIXIN -->
12
+ <!-- #ifndef MP-WEIXIN || MP-TOUTIAO -->
13
13
<view class =" warp" style =" margin : 30 rpx;" v-if =" contentSlot" >
14
14
<image class =" logo" src =" https://uviewui.com/common/logo.png" style =" width : 220 rpx;" mode =" widthFix" ></image >
15
15
</view >
Original file line number Diff line number Diff line change 11
11
@end =" end"
12
12
@moving =" moving"
13
13
>
14
- <!-- #ifndef MP-WEIXIN -->
14
+ <!-- #ifndef MP-WEIXIN || MP-TOUTIAO -->
15
15
<view class =" " v-if =" useSlot" >
16
16
<view class =" badge-button" >
17
17
{{value}}
Original file line number Diff line number Diff line change 3
3
<view class =" u-demo-wrap" >
4
4
<view class =" u-demo-title" >演示效果</view >
5
5
<view class =" u-demo-area u-flex u-row-center" >
6
- <u-line :border-style =" borderStyle" color =" red" :color =" color" :length =" length" :direction =" direction" :hair-line =" hairLine" ></u-line >
6
+ <!-- 头条小程序因为兼容性,必须要给组件写上u-line类 -->
7
+ <u-line class =" u-line" :border-style =" borderStyle" color =" red" :color =" color" :length =" length" :direction =" direction" :hair-line =" hairLine" ></u-line >
7
8
</view >
8
9
</view >
9
10
<view class =" u-config-wrap" >
Original file line number Diff line number Diff line change 28
28
</view >
29
29
</view >
30
30
<u-tabbar
31
- :beforeSwitch =" beforeSwitch"
32
31
v-model =" current"
33
32
:show =" show"
34
33
:bg-color =" bgColor"
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<view class =" " >
3
- <u-dropdown ref =" uDropdown" @open =" open" @close =" close" >
4
- <u-dropdown-item v-model =" value1" title =" 距离" :options =" options1" @change =" change" ></u-dropdown-item >
5
- <u-dropdown-item v-model =" value2" title =" 温度" :options =" options2" ></u-dropdown-item >
6
- </u-dropdown >
3
+ <u-button @click =" show = true;" >打开弹窗</u-button >
4
+ <u-popup mode =" bottom" v-model =" show" >
5
+ <view class =" content" >
6
+ <u-image class =" image" width =" 500rpx" height =" 300rpx" src =" https://cdn.uviewui.com/uview/example/fade.jpg" ></u-image >
7
+
8
+ <view class =" confrim-btn" >
9
+ <u-button @click =" show = false;" >确定</u-button >
10
+ </view >
11
+ </view >
12
+ </u-popup >
7
13
</view >
8
14
</template >
9
15
10
16
<script >
11
17
export default {
12
18
data () {
13
19
return {
14
- value1: 1 ,
15
- value2: 2 ,
16
- options1: [{
17
- label: ' 默认排序' ,
18
- value: 1 ,
19
- },
20
- {
21
- label: ' 距离优先' ,
22
- value: 2 ,
23
- }
24
- ],
25
- options2: [{
26
- label: ' 去冰' ,
27
- value: 1 ,
28
- },
29
- {
30
- label: ' 加冰' ,
31
- value: 2 ,
32
- },
33
- ],
34
- }
35
- },
36
- methods: {
37
- open (index ) {
38
- // 展开某个下来菜单时,先关闭原来的其他菜单高亮
39
- // 同时内部会自动给当前展开项进行高亮
40
- this .$refs .uDropdown .highlight ();
41
- },
42
- close (index ) {
43
- // 关闭的时候,给当前项加上高亮
44
- // 当然,您也可以通过监听dropdown-item的@change事件进行处理
45
- this .$refs .uDropdown .highlight (index);
46
- },
47
- change () {
48
- // 更多的细节,请自行实现
20
+ show: true
49
21
}
50
22
}
51
23
}
52
- </script >
24
+ </script >
25
+
26
+ <style lang="scss" scoped>
27
+ .content {
28
+ padding : 24 rpx;
29
+ text-align : center ;
30
+ position : relative ;
31
+ }
32
+
33
+ .image {
34
+ position : absolute ;
35
+ top : -200 rpx;
36
+ }
37
+ </style >
Original file line number Diff line number Diff line change @@ -219,12 +219,16 @@ export default [{
219
219
icon : 'mask' ,
220
220
title : 'Mask 遮罩层' ,
221
221
title_en : 'Mask' ,
222
- } , {
222
+ } ,
223
+ // #ifndef MP-TOUTIAO
224
+ {
223
225
path : '/pages/componentsA/noNetwork/index' ,
224
226
icon : 'noNetwork' ,
225
227
title : 'NoNetwork 无网络提示' ,
226
228
title_en : 'NoNetwork' ,
227
- } , {
229
+ } ,
230
+ // #endif
231
+ {
228
232
path : '/pages/componentsC/grid/index' ,
229
233
icon : 'grid' ,
230
234
title : 'Grid 宫格布局' ,
@@ -250,12 +254,14 @@ export default [{
250
254
title : 'Sticky 吸顶' ,
251
255
title_en : 'Sticky' ,
252
256
} ,
257
+ // #ifndef MP-TOUTIAO
253
258
{
254
259
path : '/pages/componentsB/waterfall/index' ,
255
260
icon : 'waterfall' ,
256
261
title : 'Waterfall 瀑布流' ,
257
262
title_en : 'Waterfall' ,
258
263
} ,
264
+ // #endif
259
265
{
260
266
path : '/pages/componentsB/divider/index' ,
261
267
icon : 'divider' ,
Original file line number Diff line number Diff line change 67
67
// #ifdef MP
68
68
uni .setClipboardData ({
69
69
data: this .href ,
70
- success () {
70
+ success : () => {
71
71
uni .hideToast ();
72
+ this .$nextTick (() => {
73
+ this .$u .toast (this .mpTips );
74
+ })
72
75
}
73
76
});
74
- this .$nextTick (() => {
75
- this .$u .toast (this .mpTips );
76
- })
77
77
// #endif
78
78
}
79
79
}
Original file line number Diff line number Diff line change 2
2
<view class =" u-char-box" >
3
3
<view class =" u-char-flex" >
4
4
<input :disabled =" disabledKeyboard" :value =" valueModel" type =" number" :focus =" focus" :maxlength =" maxlength" class =" u-input" @input =" getVal" />
5
- <view v-for =" (item, index) in maxlength" :key =" index" >
5
+ <!-- 这里需要通过new Array生成一个供循环的数组,是因为头条小程序不支持通过v-for历遍一个数值,其他端都是正常的 -->
6
+ <view v-for =" (item, index) in (new Array(maxlength).fill(0))" :key =" index" >
6
7
<view :class =" [breathe && charArrLength == index ? 'u-breathe' : '', 'u-char-item',
7
8
charArrLength === index && mode == 'box' ? 'u-box-active' : '',
8
9
mode === 'box' ? 'u-box' : '']" :style =" {
118
119
}
119
120
},
120
121
watch: {
121
- maxlength: {
122
- // 此值设置为true,会在组件加载后无需maxlength变化就会执行一次本监听函数,无需再created生命周期中处理
123
- immediate: true ,
124
- handler (val ) {
125
- this .maxlength = Number (val);
126
- }
127
- },
122
+ // maxlength: {
123
+ // // 此值设置为true,会在组件加载后无需maxlength变化就会执行一次本监听函数,无需再created生命周期中处理
124
+ // immediate: true,
125
+ // handler(val) {
126
+ // this.maxlength = Number(val);
127
+ // }
128
+ // },
128
129
value: {
129
130
immediate: true ,
130
131
handler (val ) {
Original file line number Diff line number Diff line change 2
2
<view v-if =" visibleSync" :style =" [customStyle, {
3
3
zIndex: uZindex - 1
4
4
}]" class =" u-drawer" hover-stop-propagation >
5
- <u-mask :custom-style =" maskCustomStyle" :maskClickAble =" maskCloseAble" :z-index =" uZindex - 2" :show =" showDrawer && mask" @click =" maskClick" ></u-mask >
5
+ <u-mask :duration = " duration " : custom-style =" maskCustomStyle" :maskClickAble =" maskCloseAble" :z-index =" uZindex - 2" :show =" showDrawer && mask" @click =" maskClick" ></u-mask >
6
6
<view
7
7
class =" u-drawer-content"
8
8
@tap =" modeCenterClose(mode)"
@@ -188,6 +188,11 @@ export default {
188
188
default () {
189
189
return {}
190
190
}
191
+ },
192
+ // 遮罩打开或收起的动画过渡时间,单位ms
193
+ duration: {
194
+ type: [String , Number ],
195
+ default: 250
191
196
}
192
197
},
193
198
data () {
@@ -237,6 +242,7 @@ export default {
237
242
// 不加可能圆角无效
238
243
style .overflow = ' hidden' ;
239
244
}
245
+ if (this .duration ) style .transition = ` all ${ this .duration / 1000 } s linear` ;
240
246
return style;
241
247
},
242
248
// 中部弹窗的特有样式
@@ -323,7 +329,7 @@ export default {
323
329
this .timer = setTimeout (() => {
324
330
this [param2] = status;
325
331
this .$emit (status ? ' open' : ' close' );
326
- }, 300 );
332
+ }, this . duration );
327
333
}
328
334
}
329
335
}
@@ -351,7 +357,7 @@ export default {
351
357
/* #endif */
352
358
position : absolute ;
353
359
z-index : 1003 ;
354
- transition : all 0.3 s linear ;
360
+ transition : all 0.25 s linear ;
355
361
}
356
362
357
363
.u-drawer__scroll-view {
Original file line number Diff line number Diff line change @@ -123,14 +123,14 @@ export default {
123
123
// 获取评分组件盒子的布局信息
124
124
getElRectById () {
125
125
// uView封装的获取节点的方法,详见文档
126
- this .$u . getRect (' #' + this .elId ).then (res => {
126
+ this .$uGetRect (' #' + this .elId ).then (res => {
127
127
this .starBoxLeft = res .left ;
128
128
})
129
129
},
130
130
// 获取单个星星的尺寸
131
131
getElRectByClass () {
132
132
// uView封装的获取节点的方法,详见文档
133
- this .$u . getRect (' .' + this .elClass ).then (res => {
133
+ this .$uGetRect (' .' + this .elClass ).then (res => {
134
134
this .starWidth = res .width ;
135
135
// 把每个星星右边到组件盒子左边的距离放入数组中
136
136
for (let i = 0 ; i < this .count ; i++ ) {
@@ -191,8 +191,10 @@ export default {
191
191
}
192
192
},
193
193
mounted () {
194
- this .getElRectById ();
195
- this .getElRectByClass ();
194
+ setTimeout (() => {
195
+ this .getElRectById ();
196
+ this .getElRectByClass ();
197
+ }, 100 )
196
198
}
197
199
};
198
200
</script >
Original file line number Diff line number Diff line change 112
112
customStyle () {
113
113
let style = {};
114
114
// 文字颜色(如果有此值,会覆盖type值的颜色)
115
- if (this .color ) style .color = this .color + " !important " ;
115
+ if (this .color ) style .color = this .color ;
116
116
// tag的背景颜色(如果有此值,会覆盖type值的颜色)
117
- if (this .bgColor ) style .backgroundColor = this .bgColor + " !important " ;
117
+ if (this .bgColor ) style .backgroundColor = this .bgColor ;
118
118
// 如果是镂空型tag,没有传递边框颜色(borderColor)的话,使用文字的颜色(color属性)
119
119
if (this .mode == ' plain' && this .color && ! this .borderColor ) style .borderColor = this .color ;
120
120
else style .borderColor = this .borderColor ;
You can’t perform that action at this time.
0 commit comments