Commit 9098f9f5 authored by 张烨's avatar 张烨
parents ef0eaf39 4c1e494d
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { import {
Table, Table,
Tooltip,
Spin, Spin,
Modal, Modal,
Form, Form,
...@@ -13,6 +14,7 @@ import { ...@@ -13,6 +14,7 @@ import {
Row, Row,
Col, Col,
} from 'antd'; } from 'antd';
import { EditTwoTone, DeleteOutlined } from '@ant-design/icons';
import { get } from '@/services/index'; import { get } from '@/services/index';
import styles from './WebDic.less'; import styles from './WebDic.less';
...@@ -51,26 +53,25 @@ const WebDic = () => { ...@@ -51,26 +53,25 @@ const WebDic = () => {
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
width: 130, width: 100,
render: record => ( render: record => (
<Space> <Space>
<Button <Tooltip title="编辑">
type="primary" <EditTwoTone
size="small" onClick={() => {
onClick={() => { setSelect(record);
setSelect(record); if (record.parentID === '-1') {
if (record.parentID === '-1') { setSelectColor(record);
setSelectColor(record); }
} setEditVisible(true);
setEditVisible(true); editForm.setFieldsValue({
editForm.setFieldsValue({ nodeName1: record.nodeName,
nodeName1: record.nodeName, nodeValue: record.nodeValue,
nodeValue: record.nodeValue, });
}); }}
}} style={{ fontSize: '16px' }}
> />
修改 </Tooltip>
</Button>
<div onClick={e => e.stopPropagation()}> <div onClick={e => e.stopPropagation()}>
<Popconfirm <Popconfirm
title="是否删除该数据?" title="是否删除该数据?"
...@@ -78,18 +79,19 @@ const WebDic = () => { ...@@ -78,18 +79,19 @@ const WebDic = () => {
cancelText="取消" cancelText="取消"
onConfirm={submitDelete} onConfirm={submitDelete}
> >
<Button <DeleteOutlined
size="small"
danger
onClick={() => { onClick={() => {
setSelect(record); setSelect(record);
if (record.parentID === '-1') { if (record.parentID === '-1') {
setSelectColor(record); setSelectColor(record);
} }
}} }}
> style={{
删除 fontSize: '16px',
</Button> margin: '0px 10px',
color: '#e86060',
}}
/>
</Popconfirm> </Popconfirm>
</div> </div>
</Space> </Space>
...@@ -275,7 +277,7 @@ const WebDic = () => { ...@@ -275,7 +277,7 @@ const WebDic = () => {
<div className={styles.WebDic}> <div className={styles.WebDic}>
<Spin spinning={loading} tip="loading..."> <Spin spinning={loading} tip="loading...">
<Row style={{ background: 'white' }}> <Row style={{ background: 'white' }}>
<Col span={12}> <Col span={12} className={styles.left}>
<div style={{ marginBottom: '10px', fontSize: '16px' }}> <div style={{ marginBottom: '10px', fontSize: '16px' }}>
<span style={{ padding: '0 10px' }}>一级条目</span> <span style={{ padding: '0 10px' }}>一级条目</span>
<Button type="primary" size="small" onClick={() => setItem(1)}> <Button type="primary" size="small" onClick={() => setItem(1)}>
......
...@@ -34,6 +34,11 @@ ...@@ -34,6 +34,11 @@
z-index: 999; z-index: 999;
border-top: 1px solid #f0eded; border-top: 1px solid #f0eded;
} }
.left{
.ant-pagination{
border-right: 1px solid #f0eded;
}
}
.ant-table-pagination{ .ant-table-pagination{
padding-top: 16px; padding-top: 16px;
background: white; 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