Commit 4c1e494d authored by 陈前坚's avatar 陈前坚

perf: dictionary

parent 73291171
import React, { useState, useEffect } from 'react';
import {
Table,
Tooltip,
Spin,
Modal,
Form,
......@@ -13,6 +14,7 @@ import {
Row,
Col,
} from 'antd';
import { EditTwoTone, DeleteOutlined } from '@ant-design/icons';
import { get } from '@/services/index';
import styles from './WebDic.less';
......@@ -51,26 +53,25 @@ const WebDic = () => {
{
title: '操作',
key: 'action',
width: 130,
width: 100,
render: record => (
<Space>
<Button
type="primary"
size="small"
onClick={() => {
setSelect(record);
if (record.parentID === '-1') {
setSelectColor(record);
}
setEditVisible(true);
editForm.setFieldsValue({
nodeName1: record.nodeName,
nodeValue: record.nodeValue,
});
}}
>
修改
</Button>
<Tooltip title="编辑">
<EditTwoTone
onClick={() => {
setSelect(record);
if (record.parentID === '-1') {
setSelectColor(record);
}
setEditVisible(true);
editForm.setFieldsValue({
nodeName1: record.nodeName,
nodeValue: record.nodeValue,
});
}}
style={{ fontSize: '16px' }}
/>
</Tooltip>
<div onClick={e => e.stopPropagation()}>
<Popconfirm
title="是否删除该数据?"
......@@ -78,18 +79,19 @@ const WebDic = () => {
cancelText="取消"
onConfirm={submitDelete}
>
<Button
size="small"
danger
<DeleteOutlined
onClick={() => {
setSelect(record);
if (record.parentID === '-1') {
setSelectColor(record);
}
}}
>
删除
</Button>
style={{
fontSize: '16px',
margin: '0px 10px',
color: '#e86060',
}}
/>
</Popconfirm>
</div>
</Space>
......@@ -275,7 +277,7 @@ const WebDic = () => {
<div className={styles.WebDic}>
<Spin spinning={loading} tip="loading...">
<Row style={{ background: 'white' }}>
<Col span={12}>
<Col span={12} className={styles.left}>
<div style={{ marginBottom: '10px', fontSize: '16px' }}>
<span style={{ padding: '0 10px' }}>一级条目</span>
<Button type="primary" size="small" onClick={() => setItem(1)}>
......
......@@ -34,6 +34,11 @@
z-index: 999;
border-top: 1px solid #f0eded;
}
.left{
.ant-pagination{
border-right: 1px solid #f0eded;
}
}
.ant-table-pagination{
padding-top: 16px;
background: white;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment