fix: 修复场景列表拉宽之后显示缩略号的问题

修复场景列表拉宽之后显示缩略号的问题
This commit is contained in:
song-tianyang 2021-04-25 14:09:27 +08:00 committed by 刘瑞斌
parent ca1941c7c2
commit b47be42743
1 changed files with 35 additions and 30 deletions

View File

@ -4,9 +4,8 @@
<el-link
:class="{'selected-link': selectDataCounts === total}"
@click.native.stop="click('selectAll')"
:type="selectAllLinkType"
ref="selectAllLink">
<span>
<span :style="selectAllFontColor">
{{ $t('api_test.batch_menus.select_all_data', [total]) }}
</span>
@ -16,9 +15,8 @@
<el-link
:class="{'selected-link': selectDataCounts === this.pageSize}"
@click.native.stop="click('selectPageAll')"
:type="selectPageLinkType"
ref="selectPageAllLink">
<span>
<span :style="selectPageFontColor">
{{ $t('api_test.batch_menus.select_show_data', [pageSize]) }}
</span>
</el-link>
@ -56,45 +54,52 @@
return {
selectType: "",
isShow: true,
selectAllLinkType: "info",
selectPageLinkType: "info",
selectAllFontColor: {
color: "gray",
},
selectPageFontColor: {
color: "gray",
},
};
},
watch: {
selectDataCounts() {
this.reload();
},
total() {
this.reload();
}
// selectDataCounts() {
// this.reload();
// },
// total() {
// this.reload();
// }
},
methods: {
click(even) {
if (even === 'selectPageAll') {
this.selectAllLinkType = "info";
this.selectPageLinkType = "primary";
this.selectPageFontColor.color = document.body.style.getPropertyValue("--count_number");
this.selectAllFontColor.color = "gray";
} else if (even === 'selectAll') {
this.selectAllLinkType = "primary";
this.selectPageLinkType = "info";
this.selectAllFontColor.color = document.body.style.getPropertyValue("--count_number");
this.selectPageFontColor.color = "gray";
} else {
this.selectAllLinkType = "info";
this.selectPageLinkType = "info";
this.selectAllSimpleStyle.color = "gray";
this.selectPageFontColor.color = "gray";
}
this.$emit(even);
this.isShow = false;
this.$nextTick(() => {
this.isShow = true;
});
// this.isShow = false;
// this.$nextTick(() => {
// this.isShow = true;
// });
},
reload() {
this.isShow = false;
this.selectAllLinkType = "info";
this.selectPageLinkType = "info";
this.$nextTick(() => {
this.isShow = true;
});
}
// reload() {
// this.isShow = false;
// this.selectAllLinkType = "info";
// this.selectPageLinkType = "info";
// this.$nextTick(() => {
// this.isShow = true;
// });
// }
}
}
</script>