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