| | |
| | | import { DndProvider } from 'react-dnd' |
| | | import { fromJS } from 'immutable' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { SketchPicker } from 'react-color' |
| | | // import { SketchPicker } from 'react-color' |
| | | import { Icon, Tabs, notification, Modal } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | |
| | | const { confirm } = Modal |
| | | |
| | | const Header = asyncComponent(() => import('@/mob/header')) |
| | | const Controller = asyncComponent(() => import('@/mob/controller')) |
| | | const MobShell = asyncComponent(() => import('@/mob/mobshell')) |
| | | const SourceWrap = asyncComponent(() => import('@/mob/modelsource')) |
| | | const DataSource = asyncComponent(() => import('@/mob/datasource')) |
| | |
| | | appConfig: null, |
| | | saveIng: false, |
| | | config: null, |
| | | pageIndex: 0 |
| | | pageIndex: 0, |
| | | editElem: null |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | |
| | | editCard = (element) => { |
| | | console.log(element) |
| | | this.setState({ |
| | | editElem: element |
| | | }) |
| | | } |
| | | |
| | | updateConfig = (config) => { |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { saveIng, appType, config } = this.state |
| | | const { saveIng, appType, config, editElem } = this.state |
| | | |
| | | return ( |
| | | <div className="mobile-view"> |
| | |
| | | </div> |
| | | {appType === 'mob' && config ? |
| | | <div className="mob-shell"> |
| | | <MobShell config={config} deleteCard={this.deleteCard} editCard={this.editCard} handleList={this.updateConfig} /> |
| | | <MobShell config={config} deleteCard={this.deleteCard} editCard={this.editCard} editId={editElem ? editElem.uuid : ''} handleList={this.updateConfig} /> |
| | | </div> : null |
| | | } |
| | | <div className="mob-setting"> |
| | | {config ? <Tabs defaultActiveKey="2" animated={false} size="small"> |
| | | <TabPane tab="配置" key="1"> |
| | | <SketchPicker /> |
| | | {/* <SketchPicker /> */} |
| | | <Controller /> |
| | | </TabPane> |
| | | <TabPane tab="数据源" key="2"> |
| | | <DataSource config={config} updateConfig={this.updateConfig} /> |