Commit 7b4642b6 by zhaochengxiang

模型编辑页面调整

parent 507ac4b9
...@@ -111,6 +111,30 @@ div[id^='__qiankun_microapp_wrapper_'] { ...@@ -111,6 +111,30 @@ div[id^='__qiankun_microapp_wrapper_'] {
word-break: break-all; word-break: break-all;
} }
.yy-table-thead > tr > th {
padding: 8px 16px !important;
}
.yy-table-tbody > tr > td {
padding: 12px 16px !important;
}
.yy-table-tbody > .yy-table-measure-row > td {
padding: 0px !important;
}
.yy-table-tbody > tr.yy-table-row-selected > td {
background: #fff !important;
}
tr.yy-table-expanded-row > td {
background: #fff !important;
}
.yy-table-thead > tr > th {
background-color: #F2F5FC !important;
}
.yy-popover-content { .yy-popover-content {
pointer-events: auto !important; pointer-events: auto !important;
} }
......
...@@ -9,6 +9,8 @@ import { getQueryParam, showMessage } from '../../../../util'; ...@@ -9,6 +9,8 @@ import { getQueryParam, showMessage } from '../../../../util';
import { Action, CatalogId, ModelerId, Hints, ModelerData, PermitCheckOut, Editable, StateId, VersionId } from '../../../../util/constant'; import { Action, CatalogId, ModelerId, Hints, ModelerData, PermitCheckOut, Editable, StateId, VersionId } from '../../../../util/constant';
import HistoryAndVersionDrawer from './HistoryAndVersionDrawer'; import HistoryAndVersionDrawer from './HistoryAndVersionDrawer';
import './EditModel.less';
const EditModel = (props) => { const EditModel = (props) => {
const [ actionData, setActionData ] = useState({ action: '', catalogId: '', modelerId: '', hints: [], roughModelerData: null, permitCheckOut: false, editable: false, stateId: '', versionId: '' }); const [ actionData, setActionData ] = useState({ action: '', catalogId: '', modelerId: '', hints: [], roughModelerData: null, permitCheckOut: false, editable: false, stateId: '', versionId: '' });
...@@ -159,6 +161,7 @@ const EditModel = (props) => { ...@@ -159,6 +161,7 @@ const EditModel = (props) => {
type='primary' type='primary'
onClick={save} onClick={save}
loading={confirmLoading} loading={confirmLoading}
danger
> >
保存 保存
</Button> </Button>
...@@ -166,63 +169,53 @@ const EditModel = (props) => { ...@@ -166,63 +169,53 @@ const EditModel = (props) => {
} else if (action === 'detail') { } else if (action === 'detail') {
actionsBtn = ( actionsBtn = (
<Space> <Space>
<Button onClick={onHistory} >版本历史</Button>
{ {
(editable==='true') && <Button type='primary' onClick={edit} > (editable==='true') && <Button type='primary' onClick={edit} danger >
编辑 编辑
</Button> </Button>
} }
<Button type='primary' onClick={onHistory} danger >版本历史</Button>
</Space> </Space>
); );
} else if (action === 'edit') { } else if (action === 'edit') {
actionsBtn = ( actionsBtn = (
<Space> <Space>
<Button onClick={cancelEdit} >
取消
</Button>
<Button onClick={onHistory} >
版本历史
</Button>
<Button <Button
type='primary' type='primary'
onClick={save} onClick={save}
loading={confirmLoading} loading={confirmLoading}
danger
> >
保存 保存
</Button> </Button>
<Button type='primary' onClick={onHistory} danger >
版本历史
</Button>
<Button onClick={cancelEdit} >
取消
</Button>
</Space> </Space>
) )
} else if (action === 'flow') { } else if (action === 'flow') {
actionsBtn = ( actionsBtn = (
<Button onClick={onHistory} > <Button type='primary' onClick={onHistory} danger>
版本历史 版本历史
</Button> </Button>
); );
} }
return ( return (
<div className='position-relative'> <div className='edit-model position-relative'>
<div <div className='edit-header'>
className='flex' <span style={{ fontSize: 16, fontWeight: 'bold', color: '#fff' }}>{title}</span>
style={{
width: '100%',
height: 64,
padding: '0 15px',
backgroundColor: '#fff',
alignItems: 'center',
position: 'fixed',
justifyContent: 'space-between',
borderBottom: '1px solid #EFEFEF',
zIndex: 100
}}
>
<span style={{ fontSize: 16, fontWeight: 'bold', color: '#000' }}>{title}</span>
{actionsBtn}
</div> </div>
<div className='position-absolute' style={{ top: 64, width: '100%' }}> <div className='edit-container'>
<div className='position-relative' style={{ margin: 15 }}> <div className='edit-container-card'>
<ImportAction hints={hints} onChange={onActionChange} action={action} modelerId={modelerId} form={form} terms={terms} roughModelerData={roughModelerData} permitCheckOut={permitCheckOut} stateId={stateId} versionId={versionId} /> <ImportAction hints={hints} onChange={onActionChange} action={action} modelerId={modelerId} form={form} terms={terms} roughModelerData={roughModelerData} permitCheckOut={permitCheckOut} stateId={stateId} versionId={versionId} />
</div> </div>
</div>
<div className='edit-footer'>
{actionsBtn}
</div> </div>
<CatalogModal <CatalogModal
visible={catalogModalVisible} visible={catalogModalVisible}
......
.edit-model {
.edit-header {
display: flex;
width: 100%;
height: 44px;
padding: 0 15px;
background-color: #464d6e;
align-items: center;
position: fixed;
justify-content: space-between;
border-bottom: 1px solid #EFEFEF;
z-index: 100;
}
.edit-container {
top: 44px;
width: 100%;
height: calc(100vh - 44px - 64px);
overflow: auto;
background: #EDF0F5;
padding: 10px 20px;
position: absolute;
}
.edit-container-card {
padding: 20px 20px 0;
background: #fff;
}
.edit-footer {
display: flex;
bottom: 0;
width: 100%;
height: 64px;
position: fixed;
justify-content: flex-end;
opacity: 0.9;
background: #fff;
box-shadow: 0 -1px 4px 0 #e5e9ea;
padding: 0 20px;
}
}
\ No newline at end of file
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Spin } from 'antd'; import { Spin, Tabs, Popover, Divider, Button, Space } from 'antd';
import LocalStorage from 'local-storage'; import LocalStorage from 'local-storage';
import { QuestionCircleOutlined } from '@ant-design/icons';
import ImportActionHeader from './ImportActionHeader'; import ImportActionHeader from './ImportActionHeader';
import ImportActionTable from './ImportActionTable'; import ImportActionTable from './ImportActionTable';
...@@ -9,6 +10,8 @@ import ImportActionPartition from './ImportActionPartition'; ...@@ -9,6 +10,8 @@ import ImportActionPartition from './ImportActionPartition';
import { dispatch } from '../../../../model'; import { dispatch } from '../../../../model';
const { TabPane } = Tabs;
const ImportAction = (props) => { const ImportAction = (props) => {
const { action, hints, onChange, form, modelerId, terms, ddl, roughModelerData, stateId, versionId, permitCheckOut } = props; const { action, hints, onChange, form, modelerId, terms, ddl, roughModelerData, stateId, versionId, permitCheckOut } = props;
...@@ -20,6 +23,7 @@ const ImportAction = (props) => { ...@@ -20,6 +23,7 @@ const ImportAction = (props) => {
const [ supportedDatatypes, setSupportedDatatypes ] = useState([]); const [ supportedDatatypes, setSupportedDatatypes ] = useState([]);
const [ supportedPartitionTypes, setSupportedPartitionTypes ] = useState([]); const [ supportedPartitionTypes, setSupportedPartitionTypes ] = useState([]);
const [ validateReports, setValidateReports ] = useState([]); const [ validateReports, setValidateReports ] = useState([]);
const [ tabKey, setTabKey ] = useState('1');
const [ loading, setLoading ] = useState(false); const [ loading, setLoading ] = useState(false);
useEffect(() =>{ useEffect(() =>{
...@@ -331,54 +335,116 @@ const ImportAction = (props) => { ...@@ -331,54 +335,116 @@ const ImportAction = (props) => {
return newEasyDataModelerIndices.filter(item => (item.indexedEasyDataModelAttributes||[]).length > 0); return newEasyDataModelerIndices.filter(item => (item.indexedEasyDataModelAttributes||[]).length > 0);
} }
const container = (<React.Fragment> const onTabChange = (key) => {
<ImportActionHeader setTabKey(key);
form={form} }
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
modelerData={modelerData||{}} const prevStep = () => {
constraints={constraints} setTabKey(`${Number(tabKey)-1}`);
templates={templates} }
validateReports={validateReports}
onTemplateChange={onTemplateChange} const nextStep = () => {
onConstraintChange={onConstraintChange} setTabKey(`${Number(tabKey)+1}`);
onChange={onHeaderChange} }
terms={terms}
/>
<ImportActionTable
modelerData={modelerData||{}}
constraint={constraint}
template={template}
validateReports={validateReports}
supportedDatatypes={supportedDatatypes}
onChange={onTableChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
action={action}
terms={terms}
/>
<ImportActionIndex
modelerData={modelerData||{}}
constraint={constraint}
template={template}
validateReports={validateReports}
onChange={onIndexChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
terms={terms}
/>
<ImportActionPartition
modelerData={modelerData||{}}
constraint={constraint}
template={template}
validateReports={validateReports}
supportedPartitionTypes={supportedPartitionTypes}
onChange={onPartitionChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
terms={terms}
/>
</React.Fragment>);
return ( return (
<Spin spinning={loading}> <Spin spinning={loading}>
{ container } <Tabs activeKey={tabKey} onChange={onTabChange}>
<TabPane tab='基本信息' key='1'>
<ImportActionHeader
form={form}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
modelerData={modelerData||{}}
constraints={constraints}
templates={templates}
validateReports={validateReports}
onTemplateChange={onTemplateChange}
onConstraintChange={onConstraintChange}
onChange={onHeaderChange}
terms={terms}
/>
</TabPane>
<TabPane
tab={
<span>
<span>数据表结构</span>
{
(action!=='detail'&&action!=='flow'&&action!=='detail-version') && (
<Popover content='表格可以通过拖拽来排序'>
<QuestionCircleOutlined className='ml-1 pointer' />
</Popover>
)
}
</span>
}
key='2'
>
<ImportActionTable
modelerData={modelerData||{}}
constraint={constraint}
template={template}
validateReports={validateReports}
supportedDatatypes={supportedDatatypes}
onChange={onTableChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
action={action}
terms={terms}
/>
</TabPane>
<TabPane
tab={
<span>
<span>数据表索引</span>
{
(action!=='detail'&&action!=='flow'&&action!=='detail-version') && (
<Popover content='表格可以通过拖拽来排序'>
<QuestionCircleOutlined className='ml-1 pointer' />
</Popover>
)
}
</span>
}
key='3'
>
<ImportActionIndex
modelerData={modelerData||{}}
constraint={constraint}
template={template}
validateReports={validateReports}
onChange={onIndexChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
terms={terms}
/>
</TabPane>
<TabPane
tab='数据表分区'
key='4'
>
<ImportActionPartition
modelerData={modelerData||{}}
constraint={constraint}
template={template}
validateReports={validateReports}
supportedPartitionTypes={supportedPartitionTypes}
onChange={onPartitionChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'}
terms={terms}
/>
</TabPane>
</Tabs>
{
action!=='detail'&&action!=='flow'&&action!=='detail-version'&&(
<React.Fragment>
<Divider style={{ margin: 0 }} />
<div className='flex' style={{ justifyContent: 'flex-end', height: 64, alignItems: 'center' }}>
<Space size='small'>
<Button type='primary' onClick={prevStep} disabled={tabKey==='1'} danger>上一步</Button>
<Button type='primary' onClick={nextStep} disabled={tabKey==='4'} danger>下一步</Button>
</Space>
</div>
</React.Fragment>
)
}
</Spin> </Spin>
); );
}; };
......
...@@ -6,6 +6,7 @@ import { dispatchLatest } from '../../../../model'; ...@@ -6,6 +6,7 @@ import { dispatchLatest } from '../../../../model';
import './ImportActionHeader.less'; import './ImportActionHeader.less';
const { TextArea } = Input;
const { Option } = Select; const { Option } = Select;
const ConstraintSelect = ({ value = {}, constraints = [], onChange, ...restProps }) => { const ConstraintSelect = ({ value = {}, constraints = [], onChange, ...restProps }) => {
...@@ -170,7 +171,7 @@ const ImportActionHeader = (props) => { ...@@ -170,7 +171,7 @@ const ImportActionHeader = (props) => {
{...formItemLayout} {...formItemLayout}
onValuesChange={onValuesChange} onValuesChange={onValuesChange}
> >
<Row gutter={10}> <Row >
<Col span={8}> <Col span={8}>
<Form.Item <Form.Item
label="中文名称" label="中文名称"
...@@ -189,21 +190,10 @@ const ImportActionHeader = (props) => { ...@@ -189,21 +190,10 @@ const ImportActionHeader = (props) => {
rules={[{ required: true, message: '请输入英文名称!' }]} rules={[{ required: true, message: '请输入英文名称!' }]}
> >
<AutoComplete options={options} onSearch={onSearch} style={{ width: 300 }} /> <AutoComplete options={options} onSearch={onSearch} style={{ width: 300 }} />
{/* <Input /> */}
</Form.Item>
</Col>
<Col span={8}>
<Form.Item
label="描述"
name="remark"
labelAlign="left"
rules={[{ required: true, message: '请输入描述!' }]}
>
<Input style={{ width: 300 }} />
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
<Row gutter={10}> <Row >
<Col span={8}> <Col span={8}>
<Form.Item <Form.Item
label="规范" label="规范"
...@@ -233,9 +223,21 @@ const ImportActionHeader = (props) => { ...@@ -233,9 +223,21 @@ const ImportActionHeader = (props) => {
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
<Row>
<Col span={8}>
<Form.Item
label="描述"
name="remark"
labelAlign="left"
rules={[{ required: true, message: '请输入描述!' }]}
>
<TextArea row={4} style={{ width: 300 }} />
</Form.Item>
</Col>
</Row>
</Form> </Form>
) : ( ) : (
<Descriptions column={5}> <Descriptions column={2}>
<Descriptions.Item label="中文名称">{highlightSearchContentByTerms(modelerData.cnName||'', terms)}</Descriptions.Item> <Descriptions.Item label="中文名称">{highlightSearchContentByTerms(modelerData.cnName||'', terms)}</Descriptions.Item>
<Descriptions.Item label="英文名称"> <Descriptions.Item label="英文名称">
{ {
......
.model-import-action-header { .model-import-action-header {
.yy-form-item { .yy-form-item {
margin-bottom: 10px; margin-bottom: 24px;
}
.yy-form-item-has-error {
margin-bottom: 0px;
} }
.yy-descriptions-row > th, .yy-descriptions-row > td { .yy-descriptions-row > th, .yy-descriptions-row > td {
padding-bottom: 10px; padding-bottom: 20px;
} }
} }
\ No newline at end of file
import React, { useState, useCallback, useRef, useEffect } from 'react'; import React, { useState, useCallback, useRef, useEffect } from 'react';
import { Input, Form, Typography, Divider, Button, Select, Row, Col, Popover, Checkbox, Tooltip, Table } from 'antd'; import { Input, Form, Typography, Button, Select, Row, Col, Popover, Checkbox, Tooltip, Table } from 'antd';
import { QuestionCircleOutlined, DeleteOutlined, CloseOutlined, CheckOutlined } from '@ant-design/icons'; import { DeleteOutlined, CloseOutlined, CheckOutlined } from '@ant-design/icons';
import { DndProvider, useDrag, useDrop } from 'react-dnd'; import { DndProvider, useDrag, useDrop } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend'; import { HTML5Backend } from 'react-dnd-html5-backend';
import update from 'immutability-helper'; import update from 'immutability-helper';
...@@ -422,7 +422,7 @@ const ImportActionIndex = (props) => { ...@@ -422,7 +422,7 @@ const ImportActionIndex = (props) => {
title: '序号', title: '序号',
dataIndex: 'key', dataIndex: 'key',
editable: false, editable: false,
width: 50, width: 60,
render: (_, __, index) => { render: (_, __, index) => {
return (index+1).toString(); return (index+1).toString();
} }
...@@ -640,21 +640,12 @@ const ImportActionIndex = (props) => { ...@@ -640,21 +640,12 @@ const ImportActionIndex = (props) => {
} }
return ( return (
<div className='model-import-action-index mt-7'> <div className='model-import-action-index'>
<Divider orientation='left'> <div className='d-flex mb-3' style={{ justifyContent: editable?'space-between':'flex-end' }}>
<> {
<span>数据表索引</span> editable && <Button onClick={onAddClick} disabled={ editingKey!==null || keyword!=='' } >新建</Button>
{ editable && (
<Popover content='表格可以通过拖拽来排序'>
<QuestionCircleOutlined className='ml-1 pointer' />
</Popover>
)
} }
</>
</Divider>
<div className='d-flex mb-3' style={{ justifyContent: 'space-between' }}>
<div className='d-flex' style={{ alignItems: 'center' }}> <div className='d-flex' style={{ alignItems: 'center' }}>
<span className='mr-3'>索引搜索:</span>
<Input <Input
placeholder="请输入索引名称" placeholder="请输入索引名称"
allowClear allowClear
...@@ -663,11 +654,8 @@ const ImportActionIndex = (props) => { ...@@ -663,11 +654,8 @@ const ImportActionIndex = (props) => {
style={{ width: 230 }} style={{ width: 230 }}
/> />
</div> </div>
{
editable && <Button className='ml-3' type="primary" onClick={onAddClick} disabled={ editingKey!==null || keyword!=='' } >新增索引</Button>
}
</div> </div>
<div id="containerId"> <div className='mb-3' id="containerId">
<DndProvider backend={HTML5Backend} > <DndProvider backend={HTML5Backend} >
<Form form={form} component={false} onValuesChange={onValuesChange}> <Form form={form} component={false} onValuesChange={onValuesChange}>
<Table <Table
......
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Form, Typography, Divider, Button, Select, Row, Col, Tooltip, Table } from 'antd'; import { Form, Typography, Button, Select, Row, Col, Tooltip, Table } from 'antd';
import { DeleteOutlined } from '@ant-design/icons'; import { DeleteOutlined } from '@ant-design/icons';
import { showMessage, highlightSearchContentByTerms } from '../../../../util'; import { showMessage, highlightSearchContentByTerms } from '../../../../util';
...@@ -289,7 +289,7 @@ const ImportActionPartition = (props) => { ...@@ -289,7 +289,7 @@ const ImportActionPartition = (props) => {
title: '序号', title: '序号',
dataIndex: 'key', dataIndex: 'key',
editable: false, editable: false,
width: 50, width: 60,
render: (_, __, index) => { render: (_, __, index) => {
return (index+1).toString(); return (index+1).toString();
} }
...@@ -393,18 +393,13 @@ const ImportActionPartition = (props) => { ...@@ -393,18 +393,13 @@ const ImportActionPartition = (props) => {
} }
return ( return (
<div className='model-import-action-index mt-7'> <div className='model-import-action-index'>
<Divider orientation='left'>
<>
<span>数据表分区</span>
</>
</Divider>
{ {
editable && <div className='d-flex mb-3' style={{ justifyContent: 'flex-end' }}> editable && <div className='d-flex mb-3'>
<Button type="primary" onClick={onAddClick} disabled={ data||isEditing } >新增分区</Button> <Button onClick={onAddClick} disabled={ data||isEditing } >新建</Button>
</div> </div>
} }
<div id="containerId"> <div className='mb-3' id="containerId">
<Form form={form} component={false} onValuesChange={onValuesChange}> <Form form={form} component={false} onValuesChange={onValuesChange}>
<Table <Table
components={{ components={{
......
import React, { useState, useCallback, useRef, useEffect } from 'react'; import React, { useState, useCallback, useRef, useEffect } from 'react';
import { Input, Form, Typography, Radio, Divider, Button, Popconfirm, Select, Row, Col, Popover, Checkbox, Tooltip, Table } from 'antd'; import { Input, Form, Typography, Radio, Button, Popconfirm, Select, Row, Col, Popover, Checkbox, Tooltip, Table } from 'antd';
import { QuestionCircleOutlined, CloseOutlined, CheckOutlined } from '@ant-design/icons'; import { CloseOutlined, CheckOutlined } from '@ant-design/icons';
import { DndProvider, useDrag, useDrop } from 'react-dnd'; import { DndProvider, useDrag, useDrop } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend'; import { HTML5Backend } from 'react-dnd-html5-backend';
import update from 'immutability-helper'; import update from 'immutability-helper';
...@@ -489,7 +489,7 @@ const ImportActionTable = (props) => { ...@@ -489,7 +489,7 @@ const ImportActionTable = (props) => {
title: '序号', title: '序号',
dataIndex: 'key', dataIndex: 'key',
editable: false, editable: false,
width: 50, width: 60,
fixed: 'left', fixed: 'left',
render: (text, record, index) => { render: (text, record, index) => {
return (index+1).toString(); return (index+1).toString();
...@@ -553,7 +553,7 @@ const ImportActionTable = (props) => { ...@@ -553,7 +553,7 @@ const ImportActionTable = (props) => {
}, },
{ {
title: '可否为空', title: '可否为空',
width: 80, width: 100,
dataIndex: 'nullable', dataIndex: 'nullable',
editable: (type==='model'?true:false), editable: (type==='model'?true:false),
render: (nullable, record, index) => { render: (nullable, record, index) => {
...@@ -610,7 +610,7 @@ const ImportActionTable = (props) => { ...@@ -610,7 +610,7 @@ const ImportActionTable = (props) => {
}, },
{ {
title: '重点关注', title: '重点关注',
width: 80, width: 100,
dataIndex: 'needAttention', dataIndex: 'needAttention',
editable: (type==='model'?true:false), editable: (type==='model'?true:false),
render: (needAttention, record, index) => { render: (needAttention, record, index) => {
...@@ -914,20 +914,11 @@ const ImportActionTable = (props) => { ...@@ -914,20 +914,11 @@ const ImportActionTable = (props) => {
return ( return (
<div className='model-import-action-table'> <div className='model-import-action-table'>
<Divider orientation='left'> <div className='d-flex mb-3' style={{ justifyContent: editable?'space-between':'flex-end' }}>
<> {
<span>数据表结构</span> editable && <Button onClick={onAddClick} disabled={ editingKey!=='' || keyword!=='' } >新建</Button>
{ editable && (
<Popover content='表格可以通过拖拽来排序'>
<QuestionCircleOutlined className='ml-1 pointer' />
</Popover>
)
} }
</>
</Divider>
<div className='d-flex mb-3' style={{ justifyContent: 'space-between' }}>
<div className='d-flex' style={{ alignItems: 'center' }}> <div className='d-flex' style={{ alignItems: 'center' }}>
<span className='mr-3'>字段搜索:</span>
<Input <Input
placeholder="请输入中文名称或者英文名称" placeholder="请输入中文名称或者英文名称"
allowClear allowClear
...@@ -936,11 +927,8 @@ const ImportActionTable = (props) => { ...@@ -936,11 +927,8 @@ const ImportActionTable = (props) => {
style={{ width: 230 }} style={{ width: 230 }}
/> />
</div> </div>
{
editable && <Button className='ml-3' type="primary" onClick={onAddClick} disabled={ editingKey!=='' || keyword!=='' } >新增字段</Button>
}
</div> </div>
<div id="containerId"> <div className='mb-3' id="containerId">
<DndProvider backend={HTML5Backend} > <DndProvider backend={HTML5Backend} >
<Form form={form} component={false} onValuesChange={onValuesChange}> <Form form={form} component={false} onValuesChange={onValuesChange}>
<Table <Table
......
...@@ -146,7 +146,7 @@ const ModelTable = (props) => { ...@@ -146,7 +146,7 @@ const ModelTable = (props) => {
<div style={{ margin: '0 5px' }}> <div style={{ margin: '0 5px' }}>
<Divider type='vertical' /> <Divider type='vertical' />
</div> </div>
<Dropdown overlay={moreMenu(record)} placement="bottomLeft"> <Dropdown overlay={moreMenu(record)} trigger={['click']} placement="bottomLeft">
<Button <Button
type='link' type='link'
size='small' size='small'
......
...@@ -5,30 +5,6 @@ ...@@ -5,30 +5,6 @@
overflow: auto !important; overflow: auto !important;
} }
.yy-table-thead > tr > th {
padding: 8px 16px !important;
}
.yy-table-tbody > tr > td {
padding: 12px 16px !important;
}
.yy-table-tbody > .yy-table-measure-row > td {
padding: 0px !important;
}
.yy-table-tbody > tr.yy-table-row-selected > td {
background: #fff !important;
}
tr.yy-table-expanded-row > td {
background: #fff !important;
}
.yy-table-thead > tr > th {
background-color: #F2F5FC !important;
}
.yy-pro-table { .yy-pro-table {
.yy-card-body { .yy-card-body {
padding: 0 !important; padding: 0 !important;
......
...@@ -473,7 +473,7 @@ class Model extends React.Component { ...@@ -473,7 +473,7 @@ class Model extends React.Component {
</Tooltip> </Tooltip>
</Space> </Space>
<Space> <Space>
<Dropdown overlay={moreMenu} placement="bottomLeft"> <Dropdown overlay={moreMenu} trigger={['click']} placement="bottomLeft">
<Button>更多<DownOutlined /></Button> <Button>更多<DownOutlined /></Button>
</Dropdown> </Dropdown>
</Space> </Space>
......
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