From 8e003c1a94d26cc4d477e7aa03593ccb4d7e6c61 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 11 十月 2024 17:47:40 +0800 Subject: [PATCH] 2024-10-11 --- src/menu/components/tabs/antv-tabs/index.jsx | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/menu/components/tabs/antv-tabs/index.jsx b/src/menu/components/tabs/antv-tabs/index.jsx index eaa3206..145bcdc 100644 --- a/src/menu/components/tabs/antv-tabs/index.jsx +++ b/src/menu/components/tabs/antv-tabs/index.jsx @@ -147,7 +147,7 @@ delTab = (tab) => { let tabs = fromJS(this.state.tabs).toJS() - const _this = this + const that = this tabs.subtabs = tabs.subtabs.filter(t => t.uuid !== tab.uuid) @@ -155,8 +155,8 @@ title: '纭畾鍒犻櫎鏍囩锛�', content: '', onOk() { - _this.setState({tabs}) - _this.props.updateConfig(tabs) + that.setState({tabs}) + that.props.updateConfig(tabs) }, onCancel() {} }) @@ -223,6 +223,12 @@ // editab.selectVal = res.selectVal || '' editab.blacklist = res.blacklist + if (/^\s+$/.test(editab.label) && editab.icon) { + editab.taType = 'only-icon' + } else { + delete editab.taType + } + if (editab.uuid) { tabs.subtabs = tabs.subtabs.map(t => { if (t.uuid === editab.uuid) { -- Gitblit v1.8.0