Skip to content

Commit a6ffb9e

Browse files
authored
feat:v0.5.12=>v0.5.13 (#396)
2 parents 6463b49 + c0845c3 commit a6ffb9e

File tree

99 files changed

+1425
-1138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1425
-1138
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div align="center">
1818

1919
![](https://img.shields.io/badge/build-passing-00d508.svg)
20-
![](https://img.shields.io/badge/version-0.5.12-3963bc.svg)
20+
![](https://img.shields.io/badge/version-0.5.13-3963bc.svg)
2121
![](https://img.shields.io/badge/license-MIT-3963bc.svg)
2222

2323
</div>
@@ -39,7 +39,7 @@ Lin UI 是基于 **微信小程序原生语法** 实现的组件库。遵循简
3939

4040
## 最新版本
4141

42-
核心库:0.5.12
42+
核心库:0.5.13
4343

4444
示例工程:0.0.1-alpha.2
4545

build/build-prod.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ gulp.task('dispose-js', () => {
1313
.pipe(gulp.dest('../dist/'));
1414
});
1515

16-
1716
gulp.task('dispose-wxss', () => {
1817
const path = isCustom ? `../src/${result}/*.less` : '../src/**/*.less',
1918
remainPath = isCustom ? `!../src/${result}/_*.less` : '!../src/**/_*.less';

config/component.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"components": [
3-
4-
]
2+
"components": []
53
}

dist/action-sheet/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Component({
8787
success
8888
} = this.data;
8989
success && success({ ...e.currentTarget.dataset });
90-
this.triggerEvent('linitemtap', { ...e.currentTarget.dataset });
90+
this.triggerEvent('linitemtap', { ...e.currentTarget.dataset },{ bubbles: true, composed: true });
9191
this._hideActionSheet();
9292
},
9393

@@ -112,7 +112,7 @@ Component({
112112
});
113113
this.triggerEvent('lincancel', {
114114
errMsg: 'showactionsheet:fail cancel'
115-
});
115+
},{ bubbles: true, composed: true });
116116
this._hideActionSheet();
117117
},
118118

dist/badge/index.js

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Component({
2-
externalClasses: ['l-class','l-class-self'],
2+
externalClasses: ['l-class', 'l-class-self'],
33
properties: {
44
// 红点模式
55
dot: {
@@ -32,32 +32,34 @@ Component({
3232
// 最终数字
3333
finalCount() {
3434
switch (this.data.countType) {
35-
case 'overflow':
36-
this.setData({
37-
finalCount: parseInt(this.data.count) >= parseInt(this.data.maxCount) ? `${this.data.maxCount}+` : this.data.count
38-
});
39-
break;
40-
case 'ellipsis':
41-
this.setData({
42-
finalCount: parseInt(this.data.count) >= parseInt(this.data.maxCount) ? `...` : this.data.count
43-
});
44-
break;
45-
case 'limit':
46-
this.setData({
47-
finalCount: parseInt(this.data.count) >= 999 ? (parseInt(this.data.count) >= 9999 ? Math.floor(this.data.count / 10000 * 100) / 100 + `w` : Math.floor(this.data.count / 1000 * 100) / 100 + `k`) : this.data.count
48-
})
49-
break;
50-
default:
51-
this.setData({
52-
finalCount: parseInt(this.data.count)
53-
})
54-
break;
35+
case 'overflow':
36+
this.setData({
37+
finalCount: parseInt(this.data.count) >= parseInt(this.data.maxCount) ? `${this.data.maxCount}+` : this.data.count
38+
});
39+
break;
40+
case 'ellipsis':
41+
this.setData({
42+
finalCount: parseInt(this.data.count) >= parseInt(this.data.maxCount) ? `...` : this.data.count
43+
});
44+
break;
45+
case 'limit':
46+
this.setData({
47+
finalCount: parseInt(this.data.count) >= 999 ? (parseInt(this.data.count) >= 9999 ? Math.floor(this.data.count / 10000 * 100) / 100 + `w` : Math.floor(this.data.count / 1000 * 100) / 100 + `k`) : this.data.count
48+
});
49+
break;
50+
default:
51+
this.setData({
52+
finalCount: parseInt(this.data.count)
53+
});
54+
break;
5555
}
5656
},
5757
// 点击事件
5858
handleTap() {
59-
this.triggerEvent('lintap');
60-
this.triggerEvent('lintapcatch', {}, { bubbles: true });
59+
this.triggerEvent('lintap', {}, {
60+
bubbles: true,
61+
composed: true
62+
});
6163
},
6264
}
6365
});

dist/button/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ Component({
3232
value: false,
3333
},
3434
// 微信原生接口
35-
width:Number,
36-
height:Number,
35+
width: Number,
36+
height: Number,
3737
icon: String,
3838
image: String,
39+
bgColor: String,
3940
iconStyle: {
4041
type: String,
4142
value: 'size:20;color:#3683D6'
@@ -68,8 +69,10 @@ Component({
6869
// button点击事件
6970
handleTap() {
7071
if (this.data.disabled) return false;
71-
this.triggerEvent('lintap');
72-
this.triggerEvent('lintapcatch',{},{ bubbles: true });
72+
this.triggerEvent('lintap', {}, {
73+
bubbles: true,
74+
composed: true
75+
});
7376
},
7477
// 开放能力事件回调
7578
openTypeEvent(data) {

dist/button/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
hover-stop-propagation="{{hoverStopPropagation}}"
1111
hover-start-time="{{hoverStartTime}}"
1212
hover-stay-time="{{hoverStayTime}}"
13-
style="{{width?'min-width:'+width+'rpx;':''}} {{height?'height:'+height+'rpx;'+'line-height:'+height+'rpx;':''}} {{size=='long'?'border-radius:0':''}}">
13+
style="{{width?'min-width:'+width+'rpx;':''}} {{height?'height:'+height+'rpx;'+'line-height:'+height+'rpx;':''}} {{size=='long'?'border-radius:0;':''}} {{'background-color:'+bgColor}}">
1414
<view wx:if="{{loading}}" class="l-btn-loading {{'margin-' + size}} {{ plain ?'l-btn-loading-' + type : '' }}"></view>
1515
<l-icon class="{{'margin-' + size}}" wx:if="{{icon}}" name="{{icon}}" color="{{iconColor}}" size="{{iconSize}}" />
1616
<slot/>

dist/card/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ Component({
3535
methods: {
3636

3737
}
38-
})
38+
});

dist/count-selector/index.js

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Component({
22
externalClasses: [
3-
'l-class',
4-
'l-symbol-class',
3+
'l-class',
4+
'l-symbol-class',
55
'l-count-class',
66
'l-disabled-class'
77
],
@@ -41,67 +41,76 @@ Component({
4141
onBlur(e) {
4242
let {
4343
value
44-
} = e.detail
44+
} = e.detail;
4545
setTimeout(() => {
46-
this.blurCount(value)
47-
}, 50)
46+
this.blurCount(value);
47+
}, 50);
4848
},
4949

5050
blurCount(value) {
5151
if (value) {
5252
if (value > this.properties.max) this.setData({
5353
count: this.properties.max
54-
})
54+
});
5555
else if (value < this.properties.min) this.setData({
5656
count: this.properties.min
57-
})
57+
});
5858
else this.setData({
5959
count: value
60-
})
60+
});
6161
} else {
6262
this.setData({
6363
count: this.properties.count
64-
})
64+
});
6565
}
6666
let detail = {
6767
count: this.data.count,
6868
type: 'blur'
69-
}
70-
this.triggerEvent('lintap', detail)
69+
};
70+
this.triggerEvent('lintap', detail, {
71+
bubbles: true,
72+
composed: true
73+
});
7174
},
7275

7376
reduceTap() {
74-
let distance = this.data.count - this.properties.step
77+
let distance = this.data.count - this.properties.step;
7578
if (distance <= this.properties.min) {
76-
this.data.count = this.properties.min
79+
this.data.count = this.properties.min;
7780
} else {
78-
this.data.count -= this.properties.step
81+
this.data.count -= this.properties.step;
7982
}
8083
this.setData({
8184
count: this.data.count
82-
})
85+
});
8386
let detail = {
8487
count: this.data.count,
8588
type: 'reduce'
86-
}
87-
this.triggerEvent('lintap', detail)
89+
};
90+
this.triggerEvent('lintap', detail, {
91+
bubbles: true,
92+
composed: true
93+
});
8894
},
8995

9096
addTap() {
9197
let distance = this.data.count + this.properties.step;
9298
if (distance >= this.properties.max) {
93-
this.data.count = this.properties.max
99+
this.data.count = this.properties.max;
94100
} else {
95101
this.data.count += this.properties.step;
96102
}
97103
this.setData({
98104
count: this.data.count
99-
})
105+
});
100106
let detail = {
101107
count: this.data.count,
102108
type: 'add'
103-
}
104-
this.triggerEvent('lintap', detail)
109+
};
110+
this.triggerEvent('lintap', detail, {
111+
bubbles: true,
112+
composed: true
113+
});
105114
},
106115
}
107-
})
116+
});

dist/custom-tab-bar/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Component({
9090
idx,
9191
path:this.route
9292
};
93-
let option = {};
93+
let option = { bubbles: true, composed: true };
9494
this.triggerEvent('lintap', detail, option);
9595
},
9696
showRedDot(idx) {

0 commit comments

Comments
 (0)