Skip to content

Commit e3e36c7

Browse files
author
二一
authored
feat:发布0.6.12
修复counter组件最大值无禁用效果的问题 card组件新增image的mode属性
2 parents d5bceb4 + 0abe135 commit e3e36c7

File tree

29 files changed

+69
-31
lines changed

29 files changed

+69
-31
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="row" />
1212

1313
<div align="center">
14-
<span class="desc" >Fantastic native based Mini-Programe components</span>
14+
<span class="desc" >Fantastic native based Mini-Program components</span>
1515
</div>
1616

1717
<div align="center">

dist/badge/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Component({
6666
break;
6767
case 'limit':
6868
this.setData({
69-
finalCount: Number(this.data.value) > 999 ? (Number(this.data.value) >= 9999 ? Math.floor(this.data.value / 10000 * 100) / 100 + `w` : Math.floor(this.data.value / 1000 * 100) / 100 + `k`) : this.data.value
69+
finalCount: Number(this.data.value) > 999 ? `${ Number.isInteger(this.data.value / 1000)? (this.data.value/1000) : (this.data.value/1000).toFixed(1) }k` : this.data.value
7070
});
7171
break;
7272
default:

dist/card/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Component({
1616
type:String,
1717
value:'left'
1818
},
19+
imageMode:{
20+
type:String,
21+
value: 'aspectFit'
22+
},
1923
type: {
2024
type: String,
2125
value: 'primary'

dist/card/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<block wx:if="{{type ==='avatar'}}">
1010
<view class="card-avatar-top">
1111
<view class="card-avatar-left">
12-
<image mode="aspectFill" class="l-img-class {{ 'card-img-' + type }}" src='{{image}}'></image>
12+
<image lazy-load mode="{{imageMode}}" class="l-img-class {{ 'card-img-' + type }}" src='{{image}}'></image>
1313
<view class="card-avatar">
1414
<text class="l-title-class card-title {{'card-title-' + type}}">{{title}}</text>
1515
<text class="describe">{{describe}}</text>

dist/checkbox-group/index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Component({
4040

4141
init(target) {
4242
if(this._keys === undefined) this._keys = {};
43-
if(this._selected === undefined) this._selected = {};
44-
this.checkDefaultItem(target);
43+
// if(this._selected === undefined) this._selected = {};
44+
// this.checkDefaultItem(target);
4545
this.checkedKeyRepeat(target);
4646
},
4747

@@ -74,7 +74,7 @@ Component({
7474
},
7575

7676
onEmitEventHandle(currentItem) {
77-
currentItem.checked ? this.addSelect(currentItem.key):this.removeSelect(currentItem.key);
77+
// currentItem.checked ? this.addSelect(currentItem.key):this.removeSelect(currentItem.key);
7878

7979
this.triggerEvent('linchange', currentItem, {
8080
bubbles: true,
@@ -92,6 +92,14 @@ Component({
9292
},
9393
addSelect(key) {
9494
this._selected[key] = key;
95+
},
96+
_selected(){
97+
const items = this.getRelationNodes('../checkbox/index');
98+
let num = 0;
99+
items.map(item=> {
100+
item.properties.checked ? num++ : '';
101+
});
102+
return num;
95103
}
96104

97105
}

dist/checkbox/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Component({
9898

9999
const limit = parent.properties[type];
100100
if (!limit) return false;
101-
const selectedLength = Object.values(parent._selected).length;
101+
const selectedLength = parent._selected();
102102
let isOverflow = type === 'minSelected' ? selectedLength <= limit : selectedLength >= limit;
103103
if (isOverflow) {
104104
let backType = type === 'minSelected' ? 'min_selected' : 'max_selected';

dist/count-selector/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
value="{{result}}"
1414
bindblur="onBlur"></input>
1515
<view wx:else class="l-count-class count" bindtap="onCount">{{result}}</view>
16-
<view class="l-symbol-class symbol {{result>=max|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}"
16+
<view class="symbol {{result>=max|| disabled?'disabled l-disabled-class':'abled l-symbol-class'}}"
1717
catchtap="{{result>=max|| disabled?'doNothing':'addTap'}}"
1818
data-type="overflow_max"
1919
hover-class="count-hover">

dist/loading/index.wxml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@
7474
</view>
7575
</view>
7676
</view>
77+

dist/loading/index.wxss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.container-loading{position:fixed;height:100%;width:100%;top:0;left:0}.content{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;height:100%}.spinner-flash-medium{width:60rpx;height:60rpx}.spinner-flash-mini{width:40rpx;height:40rpx}.spinner-flash-large{width:80rpx;height:80rpx}.spinner-flip-medium{width:60rpx;height:60rpx}.spinner-flip-mini{width:40rpx;height:40rpx}.spinner-flip-large{width:80rpx;height:80rpx}.spinner-change-medium{width:30rpx;height:30rpx}.spinner-change-mini{width:20rpx;height:20rpx}.spinner-change-large{width:50rpx;height:50rpx}.flash-spinner{position:relative}.flash-bounce1,.flash-bounce2{width:100%;height:100%;border-radius:50%;background-color:#3963bc;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.flash-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes bounce{0%,100%{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.flip-bounce1{background-color:#3963bc;-webkit-animation:rotateplane 1.2s infinite ease-in-out;animation:rotateplane 1.2s infinite ease-in-out}@-webkit-keyframes rotateplane{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}100%{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes rotateplane{0%{transform:perspective(120px) rotateX(0) rotateY(0);-webkit-transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.change-spinner{width:240rpx;text-align:center}.change-bounce1{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.32s;animation-delay:-.32s}.change-bounce2{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.16s;animation-delay:-.16s}.change-bounce3{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.spinner-circle{position:relative}.spinner-circle-mini{width:40rpx;height:40rpx}.spinner-circle-medium{width:60rpx;height:60rpx}.spinner-circle-large{width:70rpx;height:70rpx}.container1>view,.container2>view,.container3>view{border-radius:50%;position:absolute;background-color:#3963bc;-webkit-animation:bouncedelay4 1.2s infinite ease-in-out;animation:bouncedelay4 1.2s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.circle-mini{width:12rpx;height:12rpx}.circle-medium{width:15rpx;height:15rpx}.circle-large{width:20rpx;height:20rpx}.spinner-circle .spinner-container{position:absolute;width:100%;height:100%}.container2{-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}.container3{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}.circle1{top:0;left:0}.circle2{top:0;right:0}.circle3{right:0;bottom:0}.circle4{left:0;bottom:0}.container2 .circle1{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.container3 .circle1{-webkit-animation-delay:-1s;animation-delay:-1s}.container1 .circle2{-webkit-animation-delay:-.9s;animation-delay:-.9s}.container2 .circle2{-webkit-animation-delay:-.8s;animation-delay:-.8s}.container3 .circle2{-webkit-animation-delay:-.7s;animation-delay:-.7s}.container1 .circle3{-webkit-animation-delay:-.6s;animation-delay:-.6s}.container2 .circle3{-webkit-animation-delay:-.5s;animation-delay:-.5s}.container3 .circle3{-webkit-animation-delay:-.4s;animation-delay:-.4s}.container1 .circle4{-webkit-animation-delay:-.3s;animation-delay:-.3s}.container2 .circle4{-webkit-animation-delay:-.2s;animation-delay:-.2s}.container3 .circle4{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes bouncedelay4{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay4{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.rotate{border-radius:50%;animation:rotate .7s linear infinite}.rotate-mini{height:40rpx;width:40rpx;border-top:6rpx solid #3963bc;border-right:6rpx solid transparent!important;border-bottom:6rpx solid #3963bc;border-left:6rpx solid #3963bc}.rotate-medium{height:50rpx;width:50rpx;border-top:6rpx solid #3963bc;border-right:6rpx solid transparent!important;border-bottom:6rpx solid #3963bc;border-left:6rpx solid #3963bc}.rotate-large{height:70rpx;width:70rpx;border-top:8rpx solid #3963bc;border-right:8rpx solid transparent!important;border-bottom:8rpx solid #3963bc;border-left:8rpx solid #3963bc}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.inner-loading-container{position:absolute;width:100%;left:0;height:100%;top:0}.loading-icon-container{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}
1+
.container-loading{position:fixed;height:100%;width:100%;top:0;left:0}.content{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;height:100%}.spinner-flash-medium{width:60rpx;height:60rpx}.spinner-flash-mini{width:40rpx;height:40rpx}.spinner-flash-large{width:80rpx;height:80rpx}.spinner-flip-medium{width:60rpx;height:60rpx}.spinner-flip-mini{width:40rpx;height:40rpx}.spinner-flip-large{width:80rpx;height:80rpx}.spinner-change-medium{width:30rpx;height:30rpx}.spinner-change-mini{width:20rpx;height:20rpx}.spinner-change-large{width:50rpx;height:50rpx}.flash-spinner{position:relative}.flash-bounce1,.flash-bounce2{width:100%;height:100%;border-radius:50%;background-color:#3963bc;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.flash-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0)}50%{-webkit-transform:scale(1)}}@keyframes bounce{0%,100%{transform:scale(0);-webkit-transform:scale(0)}50%{transform:scale(1);-webkit-transform:scale(1)}}.flip-bounce1{background-color:#3963bc;-webkit-animation:rotateplane 1.2s infinite ease-in-out;animation:rotateplane 1.2s infinite ease-in-out}@-webkit-keyframes rotateplane{0%{-webkit-transform:perspective(120px)}50%{-webkit-transform:perspective(120px) rotateY(180deg)}100%{-webkit-transform:perspective(120px) rotateY(180deg) rotateX(180deg)}}@keyframes rotateplane{0%{transform:perspective(120px) rotateX(0) rotateY(0);-webkit-transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0);-webkit-transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}100%{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg);-webkit-transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}.change-spinner{width:240rpx;text-align:center}.change-bounce1{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.32s;animation-delay:-.32s}.change-bounce2{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-delay:-.16s;animation-delay:-.16s}.change-bounce3{background-color:#3963bc;border-radius:100%;display:inline-block;-webkit-animation:bouncedelay 1.4s infinite ease-in-out;animation:bouncedelay 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}@-webkit-keyframes bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.spinner-circle{position:relative}.spinner-circle-mini{width:40rpx;height:40rpx}.spinner-circle-medium{width:60rpx;height:60rpx}.spinner-circle-large{width:70rpx;height:70rpx}.container1>view,.container2>view,.container3>view{border-radius:50%;position:absolute;background-color:#3963bc;-webkit-animation:bouncedelay4 1.2s infinite ease-in-out;animation:bouncedelay4 1.2s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.circle-mini{width:12rpx;height:12rpx}.circle-medium{width:15rpx;height:15rpx}.circle-large{width:20rpx;height:20rpx}.spinner-circle .spinner-container{position:absolute;width:100%;height:100%}.container2{-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}.container3{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}.circle1{top:0;left:0}.circle2{top:0;right:0}.circle3{right:0;bottom:0}.circle4{left:0;bottom:0}.container2 .circle1{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.container3 .circle1{-webkit-animation-delay:-1s;animation-delay:-1s}.container1 .circle2{-webkit-animation-delay:-.9s;animation-delay:-.9s}.container2 .circle2{-webkit-animation-delay:-.8s;animation-delay:-.8s}.container3 .circle2{-webkit-animation-delay:-.7s;animation-delay:-.7s}.container1 .circle3{-webkit-animation-delay:-.6s;animation-delay:-.6s}.container2 .circle3{-webkit-animation-delay:-.5s;animation-delay:-.5s}.container3 .circle3{-webkit-animation-delay:-.4s;animation-delay:-.4s}.container1 .circle4{-webkit-animation-delay:-.3s;animation-delay:-.3s}.container2 .circle4{-webkit-animation-delay:-.2s;animation-delay:-.2s}.container3 .circle4{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes bouncedelay4{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay4{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.rotate{border-radius:50%;animation:rotate .7s linear infinite}.rotate-mini{height:40rpx;width:40rpx;border-top:6rpx solid #3963bc;border-right:6rpx solid transparent!important;border-bottom:6rpx solid #3963bc;border-left:6rpx solid #3963bc}.rotate-medium{height:50rpx;width:50rpx;border-top:6rpx solid #3963bc;border-right:6rpx solid transparent!important;border-bottom:6rpx solid #3963bc;border-left:6rpx solid #3963bc}.rotate-large{height:70rpx;width:70rpx;border-top:8rpx solid #3963bc;border-right:8rpx solid transparent!important;border-bottom:8rpx solid #3963bc;border-left:8rpx solid #3963bc}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.inner-loading-container{position:absolute;width:100%;left:0;height:100%;top:0}.loading-icon-container{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}

dist/step/index.wxml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var setStatus = function(activeIndex,index,status){
4040
return 'wait'
4141
}
4242
}
43+
4344
var statusStyle = function(activeIndex,index,color,status){
4445
if(activeIndex===index){
4546
return status==='error'?'':('background-color:' + color)
@@ -57,6 +58,7 @@ var dotStyle = function(activeIndex,index,color){
5758
return ''
5859
}
5960
}
61+
6062
var isReverse = function(reverse,activeIndex,index) {
6163
if(reverse){
6264
return (activeIndex>=index)

0 commit comments

Comments
 (0)