Skip to content

Commit

Permalink
Merge pull request #1442 from TaleLin/fix-bug
Browse files Browse the repository at this point in the history
Fix bug
  • Loading branch information
smileShirmy authored Nov 24, 2021
2 parents 540b338 + 9e377a2 commit cd4fa7b
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 28 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

---


## 目录

- [目录](#目录)
Expand Down
2 changes: 1 addition & 1 deletion src/behaviors/countdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default Behavior({
behaviors: [],
properties: {
time: {
type: Date,
type: Object,
value: new Date().getTime() + 86400000,
observer: function (newVal, oldVal) {
if (newVal && !oldVal) {
Expand Down
2 changes: 1 addition & 1 deletion src/behaviors/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default Behavior({
properties: {
// 校验
rules: {
type: [Object, Array],
optionalTypes: [Object, Array],
value: []
},
tipType: {
Expand Down
8 changes: 3 additions & 5 deletions src/calendar/components/mounth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ Component({
},
properties: {
minDate: {
type: [Date,String,null],
// observer: 'setDays'
optionalTypes: [Object,String],
},
maxDate: {
type: [Date,String,null],
// observer: 'setDays'
optionalTypes: [Object,String],
},
formatter: {
type: null,
Expand All @@ -22,7 +20,7 @@ Component({
observer: 'setDays'
},
currentDate: {
type: [null, Array],
optionalTypes: [Array],
observer() {
this.setDays();
}
Expand Down
14 changes: 6 additions & 8 deletions src/calendar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,39 +35,37 @@ Component({
value: ''
},
defaultDate: {
type: [String, Number, Date, Array],
value: '',
optionalTypes: [String, Number, Date, Array],
observer() {
this.setData({ currentDate: this.initCurrentDate() });
}
},
format: {
type: String,
value: 'timestamp'
// value: 'yyyy-MM-dd',
},
formatter: {
type: [Function, null],
type: Object,
value: null
},
minDate: {
type: [String, Number, null],
optionalTypes: [String, Number],
value: Date.now()
},
maxDate: {
type: [String, Number, null],
optionalTypes: [String, Number],
value: new Date(
new Date().getFullYear(),
new Date().getMonth() + 6,
new Date().getDate()
).getTime()
},
minSelect: {
type: [Number, null],
type: Number,
value: null
},
maxSelect: {
type: [Number, null],
type: Number,
value: null
},
allowSameDay: Boolean,
Expand Down
6 changes: 3 additions & 3 deletions src/checkbox-group/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ Component({
},
// 最多选中值
maxSelected: {
type: [Number,null],
type: Number,
value: null
},
minSelected: {
type: [Number,null],
type: Number,
value: null
}
},
},
data: {
},
Expand Down
2 changes: 1 addition & 1 deletion src/image-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Component({
},
sizeType: {
// 该写法经测试有效
type: Array | String,
optionalTypes: [Array, String],
value: ['original', 'compressed']
},
// 所选图片最大限制,单位字节
Expand Down
2 changes: 1 addition & 1 deletion src/input/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class='form-item {{disabled? "disabled": ""}} l-class form-item-{{labelLayout}}'
style="width:{{width===null?'auto':width+'rpx'}}">
<view class='mask' wx:if="{{disabled}}"></view>
<view class='row l-row-class' hidden="{{ showRow ? '' : 'hidden' }}" style="width:{{width}}rpx;"></view>
<view class='row l-row-class' hidden="{{ showRow ? '' : 'hidden' }}" style="width:{{width===null?'100%':width+'rpx'}}"></view>
<view wx:if="{{label && !labelCustom}}" hidden="{{hideLabel}}" class='form-label l-label-class form-label-{{labelLayout}}' style='{{labelLayout !== "top" ? "width:"+ labelWidth+ "rpx;" : "" }} height:{{labelLayout=== "top" ? labelWidth + "rpx" : "" }}'>
<text><text class='text-require' wx:if="{{required}}">* </text>{{label}}<text wx:if="{{colon}}">:</text>
</text>
Expand Down
2 changes: 1 addition & 1 deletion src/mask/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Component({
},
// 不透明度
opacity: {
type: [String, Number],
optionalTypes: [String, Number],
value: .4
},
// mask的z-index值
Expand Down
3 changes: 2 additions & 1 deletion src/message/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.l-message {
width: 750rpx;
height: 72rpx;
height: 0;
border-radius: 0rpx 0rpx 16rpx 16rpx;
display: flex;
justify-content: center;
Expand Down Expand Up @@ -36,6 +36,7 @@

.l-message-show {
transform: translateX(-50%) translateZ(0) translateY(0);
height: 72rpx;
opacity: 1;
}

Expand Down
5 changes: 0 additions & 5 deletions src/tab-bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ Component({
}
},

data: {
// 当前选中项索引
selectedIndex: 0
},

pageLifetimes: {
show: function () {
// 切换 tab 选中项
Expand Down

0 comments on commit cd4fa7b

Please sign in to comment.