From 0c84df247914f893ef5e41d57a422e10a2dc814c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 12 十一月 2021 17:02:06 +0800 Subject: [PATCH] 2021-11-12 --- src/templates/sharecomponent/tablecomponent/index.jsx | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/templates/sharecomponent/tablecomponent/index.jsx b/src/templates/sharecomponent/tablecomponent/index.jsx index e52ef08..abb58fe 100644 --- a/src/templates/sharecomponent/tablecomponent/index.jsx +++ b/src/templates/sharecomponent/tablecomponent/index.jsx @@ -1,7 +1,8 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Icon, Tooltip, Select, List, notification } from 'antd' +import { Tooltip, Select, List, notification } from 'antd' +import { QuestionCircleOutlined, CloseOutlined } from '@ant-design/icons' import moment from 'moment' import Api from '@/api' @@ -112,7 +113,7 @@ if (/^nvarchar/.test(_type)) { try { // 瀛樺湪max _length = +_type.match(/\d+/)[0] || 50 - } catch { + } catch (e) { _length = 2048 } _type = 'text' @@ -137,6 +138,7 @@ datatype: _type, decimal: _decimal, length: _length, + $datatype: item.FieldType.toLowerCase() } }) } @@ -181,10 +183,11 @@ let _type = item.FieldType.toLowerCase() let _decimal = 0 let _length = 50 + if (/^nvarchar/.test(_type)) { try { // 瀛樺湪max _length = +_type.match(/\d+/)[0] || 50 - } catch { + } catch (e) { _length = 2048 } _type = 'text' @@ -208,7 +211,8 @@ type: _type, datatype: _type, decimal: _decimal, - length: _length + length: _length, + $datatype: item.FieldType.toLowerCase() } }) } @@ -272,7 +276,7 @@ <div className="ant-col ant-form-item-label"> <label> <Tooltip placement="topLeft" title={dict['model.tooltip.table.guide']}> - <Icon type="question-circle" /> + <QuestionCircleOutlined className="mk-form-tip" /> {dict['header.menu.table.add']} </Tooltip> </label> @@ -301,7 +305,7 @@ dataSource={selectedTables} renderItem={(item, index) => <List.Item key={index} title={item.Remark + ' (' + item.TbName + ')'}> {item.Remark + ' (' + item.TbName + ')'} - <Icon type="close" onClick={() => this.deleteTable(item)}/> + <CloseOutlined onClick={() => this.deleteTable(item)}/> <div className="bottom-mask"></div> </List.Item>} />} -- Gitblit v1.8.0