1234567891011121314151617181920212223242526272829303132 |
- import React, { Component } from 'react'
- import { Modal } from 'antd'
- import { FormItem } from 'wptpc-design'
- export default class Index extends Component {
- render () {
- const { showModal, params, versions, onChange, onOk, onCancel, fetching } = this.props
- const formSetting = [{
- label: '模型名称',
- type: 'input',
- key: 'name'
- },
- {
- label: '模型版本',
- type: 'select',
- key: 'version',
- options: versions.map(item => ({ label: item, value: item }))
- }]
- return (
- <Modal
- title={'模型回退'}
- visible={showModal}
- onOk={onOk}
- onCancel={onCancel}
- okButtonProps={{ disabled: fetching }}
- >
- <FormItem formSetting={formSetting} params={params} onChange={onChange}/>
- </Modal>
- )
- }
- }
|