From c98e45bfac25e9110ad0383faac54a54d98ea9d5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 18 十一月 2021 20:47:04 +0800
Subject: [PATCH] 2021-11-18

---
 src/templates/sharecomponent/tabscomponent/index.jsx |   29 ++++++++++++-----------------
 1 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/src/templates/sharecomponent/tabscomponent/index.jsx b/src/templates/sharecomponent/tabscomponent/index.jsx
index 628dcba..3db153a 100644
--- a/src/templates/sharecomponent/tabscomponent/index.jsx
+++ b/src/templates/sharecomponent/tabscomponent/index.jsx
@@ -1,7 +1,8 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Icon, Tooltip, Modal, notification } from 'antd'
+import { Tooltip, Modal, notification } from 'antd'
+import { QuestionCircleOutlined, ArrowDownOutlined, ArrowUpOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons'
 
 import Utils from '@/utils/utils.js'
 import zhCN from '@/locales/zh-CN/model.js'
@@ -23,7 +24,7 @@
   }
 
   state = {
-    dict: (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS,
+    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     tabgroups: [],     // 鏍囩缁�
     card: [],          // 缂栬緫鏍囩
     group: [],         // 缂栬緫缁�
@@ -226,8 +227,6 @@
 
     confirm({
       content: `纭畾鍒犻櫎<<${card.label}>>鍚楋紵`,
-      okText: this.state.dict['model.confirm'],
-      cancelText: this.state.dict['header.cancel'],
       onOk() {
         tabgroups = tabgroups.map(_group => {
           if (_group.uuid === group.uuid) {
@@ -250,7 +249,7 @@
         _this.setState({
           tabgroups: tabgroups
         }, () => {
-          _this.props.updatetabs({...config, tabgroups: tabgroups}, [card])
+          _this.props.updatetabs({...config, tabgroups: tabgroups})
         })
       },
       onCancel() {}
@@ -267,8 +266,6 @@
 
     confirm({
       content: `纭畾鏂板缓鏍囩缁勫悧锛焋,
-      okText: this.state.dict['model.confirm'],
-      cancelText: this.state.dict['header.cancel'],
       onOk() {
         if (_tabgroups.length === 1) {
           _tabgroups.forEach(group => {
@@ -301,8 +298,6 @@
 
     confirm({
       content: `纭畾鍒犻櫎鏍囩缁勫悧锛焋,
-      okText: this.state.dict['model.confirm'],
-      cancelText: this.state.dict['header.cancel'],
       onOk() {
         _tabgroups = _tabgroups.filter(_group => _group.uuid !== group.uuid)
 
@@ -398,27 +393,27 @@
           return (
             <div key={index} className="tab-line-list">
               {index === 0 ? <Tooltip placement="bottomLeft" overlayClassName="middle" title={dict['model.tooltip.tabs.guide']}>
-                <Icon type="question-circle" />
+                <QuestionCircleOutlined style={{color: '#c49f47', position: 'absolute', left: '5px', top: '20px'}} />
               </Tooltip> : null}
               {index !== (tabgroups.length - 1) ?
-                <Icon type="arrow-down" onClick={() => {this.handleGroup(index, 'down')}} /> : null
+                <ArrowDownOutlined onClick={() => {this.handleGroup(index, 'down')}} /> : null
               }
-              {index !== 0 ? <Icon type="arrow-up" onClick={() => {this.handleGroup(index, 'up')}} /> : null}
-              {index === 0 ? <Icon type="plus" onClick={this.addTabGroup} /> : null}
-              {index !== 0 ? <Icon type="delete" onClick={() => {this.delTabGroup(group)}} /> : null}
+              {index !== 0 ? <ArrowUpOutlined onClick={() => {this.handleGroup(index, 'up')}} /> : null}
+              {index === 0 ? <PlusOutlined onClick={this.addTabGroup} /> : null}
+              {index !== 0 ? <DeleteOutlined onClick={() => {this.delTabGroup(group)}} /> : null}
               <TabDragElement
                 list={group.sublist}
                 handleList={(list, newcard) => this.handleList(list, newcard, group.uuid)}
                 handleMenu={(card) => this.handleTab(card, group)}
                 deleteMenu={(card) => this.deleteElement(card, group)}
                 doubleClickCard={this.props.setSubConfig}
-                placeholder={this.state.dict['header.form.tab.placeholder']}
+                placeholder={dict['form.required.add'] + dict['model.form.tab']}
               />
             </div>)
         })}
         {/* 鏍囩缂栬緫 */}
         <Modal
-          title={this.state.dict['header.modal.tabs.edit']}
+          title={dict['header.modal.tabs.edit']}
           visible={visible}
           width={750}
           maskClosable={false}
@@ -427,7 +422,7 @@
           destroyOnClose
         >
           <TabForm
-            dict={this.state.dict}
+            dict={dict}
             card={this.state.card}
             tabs={this.props.tabs}
             levels={this.state.levels}

--
Gitblit v1.8.0