mirror of https://github.com/openspug/spug
U 优化应用管理应用展开操作体验
parent
190d4efa25
commit
3ba249e0a2
|
@ -41,16 +41,17 @@ class ComTable extends React.Component {
|
|||
title: '操作',
|
||||
render: info => (
|
||||
<span>
|
||||
<LinkButton auth="deploy.app.edit" onClick={() => store.showExtForm(info.id)}>新建发布</LinkButton>
|
||||
<LinkButton auth="deploy.app.edit" onClick={e => store.showExtForm(e, info.id)}>新建发布</LinkButton>
|
||||
<Divider type="vertical"/>
|
||||
<LinkButton auth="deploy.app.edit" onClick={() => store.showForm(info)}>编辑</LinkButton>
|
||||
<LinkButton auth="deploy.app.edit" onClick={e => store.showForm(e, info)}>编辑</LinkButton>
|
||||
<Divider type="vertical"/>
|
||||
<LinkButton auth="deploy.app.del" onClick={() => this.handleDelete(info)}>删除</LinkButton>
|
||||
<LinkButton auth="deploy.app.del" onClick={e => this.handleDelete(e, info)}>删除</LinkButton>
|
||||
</span>
|
||||
)
|
||||
}];
|
||||
|
||||
handleDelete = (text) => {
|
||||
handleDelete = (e, text) => {
|
||||
e.stopPropagation();
|
||||
Modal.confirm({
|
||||
title: '删除确认',
|
||||
content: `确定要删除应用【${text['name']}】?`,
|
||||
|
@ -101,9 +102,9 @@ class ComTable extends React.Component {
|
|||
title: '操作',
|
||||
render: info => (
|
||||
<span>
|
||||
<LinkButton auth="deploy.app.edit" onClick={() => store.showExtForm(record.id, info)}>编辑</LinkButton>
|
||||
<LinkButton auth="deploy.app.edit" onClick={e => store.showExtForm(e, record.id, info)}>编辑</LinkButton>
|
||||
<Divider type="vertical"/>
|
||||
<LinkButton auth="deploy.app.edit" onClick={() => store.showExtForm(record.id, info, true)}>克隆配置</LinkButton>
|
||||
<LinkButton auth="deploy.app.edit" onClick={e => store.showExtForm(e, record.id, info, true)}>克隆配置</LinkButton>
|
||||
<Divider type="vertical"/>
|
||||
<LinkButton auth="deploy.app.edit" onClick={() => this.handleDeployDelete(info)}>删除</LinkButton>
|
||||
</span>
|
||||
|
@ -134,6 +135,7 @@ class ComTable extends React.Component {
|
|||
return (
|
||||
<Table
|
||||
rowKey="id"
|
||||
expandRowByClick
|
||||
loading={store.isFetching}
|
||||
dataSource={data}
|
||||
expandedRowRender={this.expandedRowRender}
|
||||
|
|
|
@ -39,12 +39,14 @@ class Store {
|
|||
.then(res => this.records[app_id]['deploys'] = res)
|
||||
};
|
||||
|
||||
showForm = (info) => {
|
||||
showForm = (e, info) => {
|
||||
if (e) e.stopPropagation();
|
||||
this.record = info || {};
|
||||
this.formVisible = true;
|
||||
};
|
||||
|
||||
showExtForm = (app_id, info, isClone) => {
|
||||
showExtForm = (e, app_id, info, isClone) => {
|
||||
if (e) e.stopPropagation();
|
||||
this.page = 0;
|
||||
this.app_id = app_id;
|
||||
if (info) {
|
||||
|
|
Loading…
Reference in New Issue