Skip to content

Commit 6355799

Browse files
committed
Merge branch 'yiruiwen' into dev
2 parents d330db1 + 3d74f39 commit 6355799

File tree

27 files changed

+212
-279
lines changed

27 files changed

+212
-279
lines changed

manifest.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name" : "uView",
33
"appid" : "__UNI__60F4B81",
44
"description" : "多平台快速开发的UI框架",
5-
"versionName" : "1.5.3",
5+
"versionName" : "1.5.4",
66
"versionCode" : "100",
77
"transformPx" : false,
88
"app-plus" : {
@@ -106,7 +106,8 @@
106106
"usingComponents" : true
107107
},
108108
"mp-alipay" : {
109-
"usingComponents" : true
109+
"usingComponents" : true,
110+
"component2": true
110111
},
111112
"mp-baidu" : {
112113
"usingComponents" : true,

pages.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"easycom": {
33
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
44
},
5-
"condition": { //模式配置,仅开发期间生效
6-
"current": 0, //当前激活的模式(list 的索引项)
7-
"list": [{
8-
"name": "test", //模式名称
9-
"path": "pages/componentsB/readMore/index", //启动页面,必选
10-
"query": "id=1&name=2" //启动参数,在页面的onLoad函数里面得到
11-
}]
12-
},
5+
// "condition": { //模式配置,仅开发期间生效
6+
// "current": 0, //当前激活的模式(list 的索引项)
7+
// "list": [{
8+
// "name": "test", //模式名称
9+
// "path": "pages/componentsB/table/index", //启动页面,必选
10+
// "query": "id=1&name=2" //启动参数,在页面的onLoad函数里面得到
11+
// }]
12+
// },
1313
"pages": [
1414
// 演示-组件
1515
{

pages/componentsB/table/index.vue

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
<view class="u-demo-title">演示效果</view>
55
<view class="u-demo-area">
66
<u-toast ref="uToast"></u-toast>
7-
<u-table :align="align" :borderColor="borderColor" :style="{
8-
display: !mode ? 'block' : 'none'
9-
}">
7+
<u-table :align="align" :borderColor="borderColor">
108
<u-tr>
119
<u-th>姓名</u-th>
1210
<u-th>年龄</u-th>
@@ -32,56 +30,12 @@
3230
<u-td>女</u-td>
3331
</u-tr>
3432
</u-table>
35-
<u-table :align="align" :borderColor="borderColor" :style="{
36-
display: mode ? 'block' : 'none'
37-
}">
38-
<u-tr>
39-
<u-th>姓名</u-th>
40-
<u-th>年龄</u-th>
41-
<u-th>籍贯</u-th>
42-
<u-th>性别</u-th>
43-
</u-tr>
44-
<u-tr>
45-
<u-td width="25%">吕布</u-td>
46-
<u-td>
47-
<u-tr>
48-
<u-td>28</u-td>
49-
<u-td>楚河</u-td>
50-
<u-td>男</u-td>
51-
</u-tr>
52-
<u-tr>
53-
<u-td>28</u-td>
54-
<u-td>楚河</u-td>
55-
<u-td>男</u-td>
56-
</u-tr>
57-
</u-td>
58-
</u-tr>
59-
<u-tr>
60-
<u-td width="50%">项羽</u-td>
61-
<u-td>
62-
<u-tr>
63-
<u-td>汉界</u-td>
64-
<u-td>男</u-td>
65-
</u-tr>
66-
</u-td>
67-
</u-tr>
68-
<u-tr>
69-
<u-td>木兰</u-td>
70-
<u-td>24</u-td>
71-
<u-td>南国</u-td>
72-
<u-td>女</u-td>
73-
</u-tr>
74-
</u-table>
7533
</view>
7634
</view>
7735
<view class="u-config-wrap">
7836
<view class="u-config-title u-border-bottom">
7937
参数配置
8038
</view>
81-
<view class="u-config-item">
82-
<view class="u-item-title">合并单元格(微信小程序不支持合并)</view>
83-
<u-subsection vibrateShort current="1" :list="['是', '否']" @change="modeChange"></u-subsection>
84-
</view>
8539
<view class="u-config-item">
8640
<view class="u-item-title">边框颜色</view>
8741
<u-subsection vibrateShort :list="['gray', 'primary', 'warning']" @change="borderColorChange"></u-subsection>

pages/componentsC/numberBox/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default {
6363
this.step = index == 0 ? 1 : index == 1 ? 3 : index == 2 ? 5 : 8;
6464
},
6565
change(e) {
66-
console.log(this.value);
66+
//console.log(e.value);
6767
}
6868
}
6969
};

pages/example/components.config.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,15 @@ export default [{
197197
path: '/pages/componentsB/sticky/index',
198198
icon: 'sticky',
199199
title: 'Sticky 吸顶',
200-
}, {
200+
},
201+
// #ifndef MP-ALIPAY
202+
{
201203
path: '/pages/componentsB/waterfall/index',
202204
icon: 'waterfall',
203205
title: 'Waterfall 瀑布流',
204-
}, {
206+
},
207+
// #endif
208+
{
205209
path: '/pages/componentsB/divider/index',
206210
icon: 'divider',
207211
title: 'Divider 分割线',
@@ -224,11 +228,15 @@ export default [{
224228
path: '/pages/componentsA/tabs/index',
225229
icon: 'tabs',
226230
title: 'Tabs 标签',
227-
}, {
231+
},
232+
// #ifndef MP-ALIPAY
233+
{
228234
path: '/pages/template/order/index',
229235
icon: 'tabsSwiper',
230236
title: 'TabsSwiper 全屏选项卡',
231-
}, {
237+
},
238+
// #endif
239+
{
232240
path: '/pages/componentsC/subsection/index',
233241
icon: 'subsection',
234242
title: 'Subsection 分段器',

pages/example/components.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
2828
}
2929
}
30+
},
31+
created() {
32+
3033
},
3134
methods: {
3235
openPage(path) {

uview-ui/components/u-index-anchor/u-index-anchor.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<template>
2-
<view class="u-index-anchor-wrapper" :id="$u.guid()" :style="[wrapperStyle]">
3-
<view class="u-index-anchor " :class="[active ? 'u-index-anchor--active' : '']" :style="[customAnchorStyle]">
4-
<slot v-if="useSlot" />
5-
<block v-else>
6-
<text>{{ index }}</text>
7-
</block>
2+
<!-- 支付宝小程序使用$u.getRect()获取组件的根元素尺寸,所以在外面套一个"壳" -->
3+
<view>
4+
<view class="u-index-anchor-wrapper" :id="$u.guid()" :style="[wrapperStyle]">
5+
<view class="u-index-anchor " :class="[active ? 'u-index-anchor--active' : '']" :style="[customAnchorStyle]">
6+
<slot v-if="useSlot" />
7+
<block v-else>
8+
<text>{{ index }}</text>
9+
</block>
10+
</view>
811
</view>
912
</view>
1013
</template>

uview-ui/components/u-index-list/u-index-list.vue

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
<template>
2-
<view class="u-index-bar">
3-
<slot />
4-
<view v-if="showSidebar" class="u-index-bar__sidebar" @touchstart.stop.prevent="onTouchMove" @touchmove.stop.prevent="onTouchMove"
5-
@touchend.stop.prevent="onTouchStop" @touchcancel.stop.prevent="onTouchStop">
6-
<view v-for="(item, index) in indexList" :key="index" class="u-index-bar__index" :style="{zIndex: zIndex + 1, color: activeAnchorIndex === index ? activeColor : ''}"
7-
:data-index="index">
8-
{{ item }}
2+
<!-- 支付宝小程序使用$u.getRect()获取组件的根元素尺寸,所以在外面套一个"壳" -->
3+
<view>
4+
<view class="u-index-bar">
5+
<slot />
6+
<view v-if="showSidebar" class="u-index-bar__sidebar" @touchstart.stop.prevent="onTouchMove" @touchmove.stop.prevent="onTouchMove"
7+
@touchend.stop.prevent="onTouchStop" @touchcancel.stop.prevent="onTouchStop">
8+
<view v-for="(item, index) in indexList" :key="index" class="u-index-bar__index" :style="{zIndex: zIndex + 1, color: activeAnchorIndex === index ? activeColor : ''}"
9+
:data-index="index">
10+
{{ item }}
11+
</view>
12+
</view>
13+
<view class="u-indexed-list-alert" v-if="touchmove && indexList[touchmoveIndex]" :style="{
14+
zIndex: alertZIndex
15+
}">
16+
<text>{{indexList[touchmoveIndex]}}</text>
917
</view>
10-
</view>
11-
<view class="u-indexed-list-alert" v-if="touchmove && indexList[touchmoveIndex]" :style="{
12-
zIndex: alertZIndex
13-
}">
14-
<text>{{indexList[touchmoveIndex]}}</text>
1518
</view>
1619
</view>
1720
</template>

uview-ui/components/u-keyboard/u-keyboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<u-popup class="" :mask="mask" :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto"
3-
:safeAreaInsetBottom="safeAreaInsetBottom" @close="popupClose">
3+
:safeAreaInsetBottom="safeAreaInsetBottom" @close="popupClose" :zIndex="uZIndex">
44
<slot />
55
<view class="u-tooltip" v-if="tooltip">
66
<view class="u-tooltip-item u-tooltip-cancel" hover-class="u-tooltip-cancel-hover" @tap="onCancel">

uview-ui/components/u-line-progress/u-line-progress.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
type ? `u-type-${type}-bg` : '',
99
striped ? 'u-striped' : '',
1010
striped && stripedActive ? 'u-striped-active' : ''
11-
]" class="u-active" :style="[progressStyle]">{{showPercent ? percent + '%' : ''}}
11+
]" class="u-active" :style="[progressStyle]">
12+
<slot v-if="$slots.default" />
13+
<block v-else-if="showPercent">
14+
{{percent + '%'}}
15+
</block>
1216
</view>
1317
</view>
1418
</template>

uview-ui/components/u-number-box/u-number-box.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@
132132
}
133133
},
134134
watch: {
135-
value(val, val1) {
136-
// 防止用户在change事件回调中将回调值赋值给valut变量,导致change事件触发两次
137-
if(Number(val) != this.inputVal) this.inputVal = Number(val);
138-
},
139135
inputVal(v1, v2) {
140136
// 为了让用户能够删除所有输入值,重新输入内容,删除所有值后,内容为空字符串
141137
if (v1 == '') return;
@@ -144,10 +140,8 @@
144140
let tmp = this.$u.test.number(v1);
145141
if (tmp && v1 >= this.min && v1 <= this.max) value = v1;
146142
else value = v2;
143+
// 发出change事件
147144
this.handleChange(value, 'change');
148-
this.$nextTick(() => {
149-
this.inputVal = v1;
150-
})
151145
}
152146
},
153147
data() {
@@ -258,7 +252,6 @@
258252
this.$nextTick(() => {
259253
this.inputVal = val;
260254
})
261-
this.handleChange(val, "blur");
262255
},
263256
handleChange(value, type) {
264257
if (this.disabled) return;

uview-ui/components/u-parse/libs/MpHtmlParser.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* html 解析器
33
* @tutorial https://github.com/jin-yufeng/Parser
4-
* @version 20200712
4+
* @version 20200719
55
* @author JinYufeng
66
* @listens MIT
77
*/
@@ -233,8 +233,6 @@ MpHtmlParser.prototype.setNode = function() {
233233
style += ';-webkit-touch-callout:none';
234234
styleObj['max-width'] = '100%';
235235
}
236-
if (!styleObj.position)
237-
styleObj.top = styleObj.bottom = styleObj.left = styleObj.right = styleObj['z-index'] = void 0;
238236
var width;
239237
if (styleObj.width) width = styleObj.width;
240238
else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : attrs.width + 'px';
@@ -305,7 +303,7 @@ MpHtmlParser.prototype.remove = function(node) {
305303
if (!node.attrs.xmlns) src = ' xmlns="http://www.w3.org/2000/svg"' + src;
306304
var i = j;
307305
while (this.data[j] != '<') j--;
308-
src = this.data.substring(j, i) + src;
306+
src = this.data.substring(j, i).replace("viewbox", "viewBox") + src;
309307
var parent = this.parent();
310308
if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline'))
311309
parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;

0 commit comments

Comments
 (0)