Skip to content

Commit 6ccdf36

Browse files
YpchenLove7insummer
authored andcommitted
fix: 修改loading的style多余的bug&& 增加checkbox的样式类型 (#349)
1 parent bea7ed1 commit 6ccdf36

File tree

17 files changed

+101
-81
lines changed

17 files changed

+101
-81
lines changed

dist/checkbox/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Component({
2020
type: String,
2121
value: 'right'
2222
},
23+
type: {
24+
type: String,
25+
value: 'square' // square 方形 circle 圆形
26+
},
2327
// checkbox的大小
2428
size: {
2529
type: [String, Number],

dist/checkbox/index.wxml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<view class="l-class checkbox-wrapper" catchtap="onCheckBoxChangeTap">
22
<label class='label-{{placement}} '>
3-
<view wx:if="{{checked}}" class='checkbox' style="background:{{ checked?color:''}}; height:{{size}}rpx; width:{{size}}rpx">
3+
<view wx:if="{{checked}}" class='checkbox checkbox-type-{{ type }}' style="background:{{ checked ? color: '' }}; height:{{size}}rpx; width:{{size}}rpx">
44
<image class='checkbox-{{shape==="right"? "right": "circle"}}' src='{{shape==="right"? right: circle}}'></image>
55
</view>
6-
<view wx:else style='background:{{ disabled? "#ccc":""}}; :;height:{{size}}rpx; width:{{size}}rpx' class='checkbox-unselected checkbox'>
7-
<image class='checkbox-{{shape==="right"? "right": "circle"}}' src='{{shape==="right"? right: circle}}'></image>
6+
<view wx:else style='background:{{ disabled? "#ccc":""}}; :;height:{{size}}rpx; width:{{size}}rpx' class='checkbox-unselected checkbox checkbox-type-{{ type }} '>
7+
<image class='checkbox-{{shape==="right"? "right": "circle"}}' src='{{shape === "right"? right: circle}}'></image>
88
</view>
99
<view wx:if="{{ !custom }}" class="checkbox-title{{disabled? '-disabled': ''}} l-title-class">{{value}}</view>
1010
<view wx:else class="checkbox-title">
1111
<slot />
1212
</view>
1313
</label>
14-
</view>
14+
</view>

dist/checkbox/index.wxss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.label-left{display:flex;flex-direction:row;align-items:center;color:#333}.label-right{display:flex;flex-direction:row-reverse;align-items:center;color:#333}.checkbox{border-radius:50%;display:flex;flex-direction:row;align-items:center;justify-content:center;margin-right:20rpx}.checkbox-right{width:100%;height:100%}.checkbox-circle{width:100%;height:100%}.checkbox-title{font-size:28rpx;flex:1}.checkbox-title-disabled{font-size:28rpx;flex:1;color:#ccc}.checkbox-unselected{border:1px solid #c4c9d2;box-sizing:border-box}
1+
.label-left{display:flex;flex-direction:row;align-items:center;color:#333}.label-right{display:flex;flex-direction:row-reverse;align-items:center;color:#333}.checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;margin-right:20rpx}.checkbox-type-circle{border-radius:50%}.checkbox-type-square{border-radius:8rpx}.checkbox-right{width:100%;height:100%}.checkbox-circle{width:100%;height:100%}.checkbox-title{font-size:28rpx;flex:1}.checkbox-title-disabled{font-size:28rpx;flex:1;color:#ccc}.checkbox-unselected{border:1px solid #c4c9d2;box-sizing:border-box}

dist/input/index.wxss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.form-item{position:relative;font-size:28rpx;color:#333;width:750rpx;height:88rpx;display:flex;flex-direction:row;align-items:center;padding-right:25rpx;box-sizing:border-box}.row{position:absolute;bottom:0;right:0;height:2rpx;width:730rpx;background:#f3f3f3}.text-require{color:#e23;vertical-align:middle}.form-label{display:flex;flex-direction:row;align-items:center;height:88rpx;padding-left:25rpx;padding-right:15rpx;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.form-label-right{justify-content:flex-end}.form-label-left{justify-content:flex-start}.input{height:100%;line-height:100%;flex:1}.close{height:30rpx;width:30rpx;background:#ddd;display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:50%;margin-right:20rpx}.pls-class{color:#9a9a9a}
1+
.form-item{position:relative;font-size:28rpx;color:#333;width:750rpx;height:88rpx;display:flex;flex-direction:row;align-items:center;padding-right:25rpx;box-sizing:border-box}.row{position:absolute;bottom:0;right:0;height:2rpx;width:730rpx;background:#f3f3f3}.text-require{color:#e23;vertical-align:middle}.form-label{display:flex;flex-direction:row;align-items:center;height:88rpx;padding-left:25rpx;padding-right:15rpx;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.form-label-right{justify-content:flex-end}.form-label-left{justify-content:flex-start}.input{height:100%;line-height:100%;flex:1}.close{height:36rpx;width:36rpx;background:#ddd;display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:50%;margin-right:20rpx}.pls-class{color:#9a9a9a}

dist/loading/index.wxml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
<view class="spinner-container container1">
1212
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
1313
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
14-
<view class="circle3 {{type + '-'+ size}}" style="background: {{color}}" style="background: {{color}}" style="background: {{color}}"></view>
15-
<view class="circle4 {{type + '-'+ size}}" style="background: {{color}}" style="background: {{color}}"></view>
14+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
15+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
1616
</view>
1717
<view class="spinner-container container2">
18-
<view class="circle1 {{type + '-'+ size}}" style="background: {{color}}"></view>
19-
<view class="circle2 {{type + '-'+ size}}" style="background: {{color}}"></view>
20-
<view class="circle3 {{type + '-' +size}}" style="background: {{color}}"></view>
21-
<view class="circle4 {{type + '-'+ size}}" style="background: {{color}}"></view>
18+
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
19+
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
20+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
21+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
2222
</view>
2323
<view class="spinner-container container3">
24-
<view class="circle1 {{type + '-'+ size}}" style="background: {{color}}"></view>
25-
<view class="circle2 {{type + '-'+ size}}" style="background: {{color}}"></view>
26-
<view class="circle3 {{type + '-'+ size}}" style="background: {{color}}"></view>
27-
<view class="circle4 {{type + '-'+size}}" style="background: {{color}}"></view>
24+
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
25+
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
26+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
27+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
2828
</view>
2929
</view>
3030
<view wx:if="{{ type === 'rotate'}}">
@@ -45,20 +45,20 @@
4545
<view class="spinner-container container1">
4646
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
4747
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
48-
<view class="circle3 {{type + '-'+ size}}" style="background: {{color}}" style="background: {{color}}" style="background: {{color}}"></view>
49-
<view class="circle4 {{type + '-'+ size}}" style="background: {{color}}" style="background: {{color}}"></view>
48+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
49+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
5050
</view>
5151
<view class="spinner-container container2">
52-
<view class="circle1 {{type + '-'+ size}}" style="background: {{color}}"></view>
53-
<view class="circle2 {{type + '-'+ size}}" style="background: {{color}}"></view>
54-
<view class="circle3 {{type + '-' +size}}" style="background: {{color}}"></view>
55-
<view class="circle4 {{type + '-'+ size}}" style="background: {{color}}"></view>
52+
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
53+
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
54+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
55+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
5656
</view>
5757
<view class="spinner-container container3">
58-
<view class="circle1 {{type + '-'+ size}}" style="background: {{color}}"></view>
59-
<view class="circle2 {{type + '-'+ size}}" style="background: {{color}}"></view>
60-
<view class="circle3 {{type + '-'+ size}}" style="background: {{color}}"></view>
61-
<view class="circle4 {{type + '-'+size}}" style="background: {{color}}"></view>
58+
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
59+
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
60+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
61+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
6262
</view>
6363
</view>
6464
<view wx:if="{{ type === 'rotate'}}">

examples/dist/checkbox/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Component({
2020
type: String,
2121
value: 'right'
2222
},
23+
type: {
24+
type: String,
25+
value: 'square' // square 方形 circle 圆形
26+
},
2327
// checkbox的大小
2428
size: {
2529
type: [String, Number],

examples/dist/checkbox/index.wxml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<view class="l-class checkbox-wrapper" catchtap="onCheckBoxChangeTap">
22
<label class='label-{{placement}} '>
3-
<view wx:if="{{checked}}" class='checkbox' style="background:{{ checked?color:''}}; height:{{size}}rpx; width:{{size}}rpx">
3+
<view wx:if="{{checked}}" class='checkbox checkbox-type-{{ type }}' style="background:{{ checked ? color: '' }}; height:{{size}}rpx; width:{{size}}rpx">
44
<image class='checkbox-{{shape==="right"? "right": "circle"}}' src='{{shape==="right"? right: circle}}'></image>
55
</view>
6-
<view wx:else style='background:{{ disabled? "#ccc":""}}; :;height:{{size}}rpx; width:{{size}}rpx' class='checkbox-unselected checkbox'>
7-
<image class='checkbox-{{shape==="right"? "right": "circle"}}' src='{{shape==="right"? right: circle}}'></image>
6+
<view wx:else style='background:{{ disabled? "#ccc":""}}; :;height:{{size}}rpx; width:{{size}}rpx' class='checkbox-unselected checkbox checkbox-type-{{ type }} '>
7+
<image class='checkbox-{{shape==="right"? "right": "circle"}}' src='{{shape === "right"? right: circle}}'></image>
88
</view>
99
<view wx:if="{{ !custom }}" class="checkbox-title{{disabled? '-disabled': ''}} l-title-class">{{value}}</view>
1010
<view wx:else class="checkbox-title">
1111
<slot />
1212
</view>
1313
</label>
14-
</view>
14+
</view>

examples/dist/checkbox/index.wxss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.label-left{display:flex;flex-direction:row;align-items:center;color:#333}.label-right{display:flex;flex-direction:row-reverse;align-items:center;color:#333}.checkbox{border-radius:50%;display:flex;flex-direction:row;align-items:center;justify-content:center;margin-right:20rpx}.checkbox-right{width:100%;height:100%}.checkbox-circle{width:100%;height:100%}.checkbox-title{font-size:28rpx;flex:1}.checkbox-title-disabled{font-size:28rpx;flex:1;color:#ccc}.checkbox-unselected{border:1px solid #c4c9d2;box-sizing:border-box}
1+
.label-left{display:flex;flex-direction:row;align-items:center;color:#333}.label-right{display:flex;flex-direction:row-reverse;align-items:center;color:#333}.checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;margin-right:20rpx}.checkbox-type-circle{border-radius:50%}.checkbox-type-square{border-radius:8rpx}.checkbox-right{width:100%;height:100%}.checkbox-circle{width:100%;height:100%}.checkbox-title{font-size:28rpx;flex:1}.checkbox-title-disabled{font-size:28rpx;flex:1;color:#ccc}.checkbox-unselected{border:1px solid #c4c9d2;box-sizing:border-box}

examples/dist/input/index.wxss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.form-item{position:relative;font-size:28rpx;color:#333;width:750rpx;height:88rpx;display:flex;flex-direction:row;align-items:center;padding-right:25rpx;box-sizing:border-box}.row{position:absolute;bottom:0;right:0;height:2rpx;width:730rpx;background:#f3f3f3}.text-require{color:#e23;vertical-align:middle}.form-label{display:flex;flex-direction:row;align-items:center;height:88rpx;padding-left:25rpx;padding-right:15rpx;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.form-label-right{justify-content:flex-end}.form-label-left{justify-content:flex-start}.input{height:100%;line-height:100%;flex:1}.close{height:30rpx;width:30rpx;background:#ddd;display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:50%;margin-right:20rpx}.pls-class{color:#9a9a9a}
1+
.form-item{position:relative;font-size:28rpx;color:#333;width:750rpx;height:88rpx;display:flex;flex-direction:row;align-items:center;padding-right:25rpx;box-sizing:border-box}.row{position:absolute;bottom:0;right:0;height:2rpx;width:730rpx;background:#f3f3f3}.text-require{color:#e23;vertical-align:middle}.form-label{display:flex;flex-direction:row;align-items:center;height:88rpx;padding-left:25rpx;padding-right:15rpx;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.form-label-right{justify-content:flex-end}.form-label-left{justify-content:flex-start}.input{height:100%;line-height:100%;flex:1}.close{height:36rpx;width:36rpx;background:#ddd;display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:50%;margin-right:20rpx}.pls-class{color:#9a9a9a}

examples/dist/loading/index.wxml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
<view class="spinner-container container1">
1212
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
1313
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
14-
<view class="circle3 {{type + '-'+ size}}" style="background: {{color}}" style="background: {{color}}" style="background: {{color}}"></view>
15-
<view class="circle4 {{type + '-'+ size}}" style="background: {{color}}" style="background: {{color}}"></view>
14+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
15+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
1616
</view>
1717
<view class="spinner-container container2">
18-
<view class="circle1 {{type + '-'+ size}}" style="background: {{color}}"></view>
19-
<view class="circle2 {{type + '-'+ size}}" style="background: {{color}}"></view>
20-
<view class="circle3 {{type + '-' +size}}" style="background: {{color}}"></view>
21-
<view class="circle4 {{type + '-'+ size}}" style="background: {{color}}"></view>
18+
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
19+
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
20+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
21+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
2222
</view>
2323
<view class="spinner-container container3">
24-
<view class="circle1 {{type + '-'+ size}}" style="background: {{color}}"></view>
25-
<view class="circle2 {{type + '-'+ size}}" style="background: {{color}}"></view>
26-
<view class="circle3 {{type + '-'+ size}}" style="background: {{color}}"></view>
27-
<view class="circle4 {{type + '-'+size}}" style="background: {{color}}"></view>
24+
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
25+
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
26+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
27+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
2828
</view>
2929
</view>
3030
<view wx:if="{{ type === 'rotate'}}">
@@ -45,20 +45,20 @@
4545
<view class="spinner-container container1">
4646
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
4747
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
48-
<view class="circle3 {{type + '-'+ size}}" style="background: {{color}}" style="background: {{color}}" style="background: {{color}}"></view>
49-
<view class="circle4 {{type + '-'+ size}}" style="background: {{color}}" style="background: {{color}}"></view>
48+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
49+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
5050
</view>
5151
<view class="spinner-container container2">
52-
<view class="circle1 {{type + '-'+ size}}" style="background: {{color}}"></view>
53-
<view class="circle2 {{type + '-'+ size}}" style="background: {{color}}"></view>
54-
<view class="circle3 {{type + '-' +size}}" style="background: {{color}}"></view>
55-
<view class="circle4 {{type + '-'+ size}}" style="background: {{color}}"></view>
52+
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
53+
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
54+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
55+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
5656
</view>
5757
<view class="spinner-container container3">
58-
<view class="circle1 {{type + '-'+ size}}" style="background: {{color}}"></view>
59-
<view class="circle2 {{type + '-'+ size}}" style="background: {{color}}"></view>
60-
<view class="circle3 {{type + '-'+ size}}" style="background: {{color}}"></view>
61-
<view class="circle4 {{type + '-'+size}}" style="background: {{color}}"></view>
58+
<view class="circle1 {{type + '-' + size}}" style="background: {{color}}"></view>
59+
<view class="circle2 {{type + '-' + size}}" style="background: {{color}}"></view>
60+
<view class="circle3 {{type + '-' + size}}" style="background: {{color}}"></view>
61+
<view class="circle4 {{type + '-' + size}}" style="background: {{color}}"></view>
6262
</view>
6363
</view>
6464
<view wx:if="{{ type === 'rotate'}}">

0 commit comments

Comments
 (0)