Skip to content

Commit

Permalink
V1.5.6更新(2020-08-18)
Browse files Browse the repository at this point in the history
  • Loading branch information
dingyong0214 committed Aug 18, 2020
1 parent fa51e59 commit 63fb30b
Show file tree
Hide file tree
Showing 6 changed files with 400 additions and 352 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ ThorUI组件库,uni-app版本,v3编译,支持nvue uni-app编译模式(

## 更新日志

## V1.5.6(2020-08-18)

1.修复tui-tabs组件宽度不正确的bug。

2.修复级联选择组件(tui-cascade-selection)默认数据不生效的bug。

3.优化tui-button按钮组件,新增props:preventClick[是否阻止用户重复点击,设为true则200ms内只执行一次点击事件,默认false]

--------------------------

注:加入会员享受更多权益(¥99/永久)。

如若需要,请联系QQ:3168647172 或 3039218619。

## V1.5.5(2020-08-16)

1.自定义导航栏组件优化,新增props:maxOpacity(最大不透明度值),dropDownHide(下拉隐藏NavigationBar,主要针对有回弹效果ios端)。
Expand Down
19 changes: 18 additions & 1 deletion components/thorui/tui-button/tui-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,28 @@ export default {
index: {
type: [Number, String],
default: 0
},
//是否需要阻止重复点击【默认200ms】
preventClick: {
type: Boolean,
default: false
}
},
data() {
return {
time: 0
};
},
methods: {
handleClick() {
if (this.disabled) return false;
if (this.disabled) return;
if (this.preventClick) {
if(new Date().getTime() - this.time <= 200) return;
this.time = new Date().getTime();
setTimeout(() => {
this.time = 0;
}, 200);
}
this.$emit('click', {
index: Number(this.index)
});
Expand Down
32 changes: 19 additions & 13 deletions components/thorui/tui-cascade-selection/tui-cascade-selection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,22 +251,13 @@ export default {
},
reset() {
this.initData(this.itemList, -1);
},
defaultItemList(val){
this.setDefaultData(val)
}
},
created() {
let defaultItemList = this.defaultItemList || [];
if (defaultItemList.length > 0) {
defaultItemList.map(item => {
item.scrollViewId = `id_${item.index}`;
});
this.selectedArr = defaultItemList;
this.currentTab = defaultItemList.length - 1;
this.$nextTick(() => {
this.checkCor();
});
} else {
this.initData(this.itemList, -1);
}
this.setDefaultData(this.defaultItemList)
},
data() {
return {
Expand All @@ -277,6 +268,21 @@ export default {
};
},
methods: {
setDefaultData(val){
let defaultItemList = val || [];
if (defaultItemList.length > 0) {
defaultItemList.map(item => {
item.scrollViewId = `id_${item.index}`;
});
this.selectedArr = defaultItemList;
this.currentTab = defaultItemList.length - 1;
this.$nextTick(() => {
this.checkCor();
});
} else {
this.initData(this.itemList, -1);
}
},
initData(data, layer) {
if (!data || data.length === 0) return;
if (this.request) {
Expand Down
3 changes: 2 additions & 1 deletion components/thorui/tui-tabs/tui-tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default {
//tabs宽度,不传值则默认使用windowWidth,单位px
width: {
type: Number,
default: 375
default: 0
},
//rpx
height: {
Expand Down Expand Up @@ -200,6 +200,7 @@ export default {

<style scoped>
.tui-tabs-view {
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
Expand Down
Loading

0 comments on commit 63fb30b

Please sign in to comment.