mirror of https://github.com/openspug/spug
U 优化发布配置克隆
parent
fbb33b96db
commit
c88074959a
|
@ -49,6 +49,7 @@ class CloneConfirm extends React.Component {
|
|||
<Form.Item required label="应用及环境" help="克隆配置,将基于选择对象的配置来创建新的发布配置。">
|
||||
<Cascader
|
||||
options={options}
|
||||
placeholder="请选择目标应用及环境"
|
||||
loadData={this.handleLoadData}
|
||||
onChange={this.props.onChange}/>
|
||||
</Form.Item>
|
||||
|
|
|
@ -18,7 +18,7 @@ import lds from 'lodash';
|
|||
class ComTable extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.cloneObj = {};
|
||||
this.cloneObj = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
@ -60,11 +60,16 @@ class ComTable extends React.Component {
|
|||
|
||||
handleClone = (e, id) => {
|
||||
e.stopPropagation();
|
||||
this.cloneObj = null;
|
||||
Modal.confirm({
|
||||
icon: 'exclamation-circle',
|
||||
title: '选择克隆对象',
|
||||
content: <CloneConfirm onChange={v => this.cloneObj = v[1]}/>,
|
||||
onOk: () => {
|
||||
if (!this.cloneObj) {
|
||||
message.error('请选择目标应用及环境')
|
||||
return Promise.reject()
|
||||
}
|
||||
const info = JSON.parse(this.cloneObj);
|
||||
store.showExtForm(null, id, info, true)
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue