refactor: 统一调用 showComingSoon & 防止重复触发
- coming-soon-mixin: 全局 \.info 配置 3s 自动关闭、顶部居中 - fwsc/xqsc: 禁用 tab 改走 showComingSoon - qych: 卡片按钮使用 showComingSoon,外部链接固定 _blank 打开 - hyzt: 进入专题时加 messageShowing 锁,避免连点产生重复 toast Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
cbb4096ea4
commit
b57a015ae4
@ -15,6 +15,11 @@ export default {
|
||||
prev.close()
|
||||
this[COMING_SOON_INSTANCE] = null
|
||||
}
|
||||
this.$message.config({
|
||||
duration: 3000, // 3s后自动关闭
|
||||
placement: 'top', // 顶部居中
|
||||
offset: [0, 100], // 离顶部100px
|
||||
})
|
||||
this.$message.info(text).then((instance) => {
|
||||
this[COMING_SOON_INSTANCE] = instance
|
||||
})
|
||||
|
||||
@ -424,7 +424,7 @@ export default {
|
||||
},
|
||||
goToTab({path, disable}) {
|
||||
if (disable) {
|
||||
this.$message.info('敬请期待');
|
||||
this.showComingSoon();
|
||||
return
|
||||
}
|
||||
this.$router.push(path);
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'hyzt',
|
||||
@ -55,11 +56,15 @@ export default {
|
||||
return index === 2 ? '进入交易大厅' : '进入专题';
|
||||
},
|
||||
goToHref(href) {
|
||||
if (href) {
|
||||
window.open(href, '_blank');
|
||||
} else {
|
||||
this.$message.info('敬请期待');
|
||||
}
|
||||
if (this.messageShowing) return;
|
||||
|
||||
this.messageShowing = true;
|
||||
|
||||
this.$message.info('敬请期待');
|
||||
|
||||
setTimeout(() => {
|
||||
this.messageShowing = false;
|
||||
}, 3000);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@ -325,10 +325,10 @@ export default {
|
||||
methods: {
|
||||
goPage(url) {
|
||||
if (url) {
|
||||
window.open(url);
|
||||
} else {
|
||||
this.$message.info('敬请期待')
|
||||
window.open(url, '_blank');
|
||||
return;
|
||||
}
|
||||
this.showComingSoon();
|
||||
},
|
||||
handleCardBtnClick(item) {
|
||||
if (item.externalLink) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user