From a8507cc8c42d17d4fb854594dbf1e084d61912ac Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 18 十月 2022 12:44:22 +0800 Subject: [PATCH] 2022-10-18 --- src/views/tabledesign/index.jsx | 43 +++++++++++++++---------------------------- 1 files changed, 15 insertions(+), 28 deletions(-) diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx index 9865697..19d5c67 100644 --- a/src/views/tabledesign/index.jsx +++ b/src/views/tabledesign/index.jsx @@ -11,7 +11,9 @@ import Utils, { setGLOBFuncs } from '@/utils/utils.js' import antdZhCN from 'antd/es/locale/zh_CN' import MKEmitter from '@/utils/events.js' +import SourceElement from '@/templates/zshare/dragsource' import asyncComponent from '@/utils/asyncComponent' +import Source from './source' import '@/assets/css/design.scss' import './index.scss' @@ -22,15 +24,14 @@ const _locale = antdZhCN const MenuForm = asyncComponent(() => import('./menuform')) +const TableSource = asyncComponent(() => import('./tablesource')) const Header = asyncComponent(() => import('@/menu/header')) const MenuShell = asyncComponent(() => import('@/menu/tableshell')) const BgController = asyncComponent(() => import('@/pc/bgcontroller')) const StyleController = asyncComponent(() => import('@/menu/stylecontroller')) const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) const Versions = asyncComponent(() => import('@/menu/versions')) -const SysInterface = asyncComponent(() => import('@/menu/sysinterface')) const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent')) -const PictureController = asyncComponent(() => import('@/menu/picturecontroller')) const ModalController = asyncComponent(() => import('@/menu/modalconfig/controller')) const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) @@ -90,7 +91,6 @@ MKEmitter.addListener('modalStatus', this.modalStatus) MKEmitter.addListener('changePopview', this.initPopview) MKEmitter.addListener('triggerMenuSave', this.triggerMenuSave) - MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle) MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent) setTimeout(() => { if (sessionStorage.getItem('app_custom_components')) { @@ -158,7 +158,6 @@ MKEmitter.removeListener('modalStatus', this.modalStatus) MKEmitter.removeListener('changePopview', this.initPopview) MKEmitter.removeListener('triggerMenuSave', this.triggerMenuSave) - MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle) MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent) } @@ -299,28 +298,6 @@ }) }) this.setState({customComponents: coms}) - } - - updateComponentStyle = (parentId, keys, style) => { - const { config } = this.state - - if (config.uuid !== parentId) return - - let components = config.components.map(item => { - if (keys.includes(item.uuid)) { - item.style = {...item.style, ...style} - } - return item - }) - - this.setState({ - config: {...config, components}, - comloading: true - }, () => { - this.setState({ - comloading: false - }) - }) } initPopview = (card, btn) => { @@ -783,6 +760,18 @@ {config ? <TableComponent config={config} updatetable={this.updateConfig}/> : null} {config ? <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>鑿滃崟ID</Paragraph> : null} </Panel> + <Panel header="鎼滅储" key="search"> + {Source.searchItems.map((item, index) => (<SourceElement key={index} content={item}/>))} + </Panel> + <Panel header="鎸夐挳" key="action"> + {Source.actionItems.map((item, index) => (<SourceElement key={index} content={item}/>))} + </Panel> + <Panel header="鏄剧ず鍒�" key="cols"> + {Source.columnItems.map((item, index) => (<SourceElement key={index} content={item}/>))} + </Panel> + <Panel header="缁勪欢" key="component"> + {Source.menuItems.map((item, index) => (<TableSource key={index} item={item}/>))} + </Panel> <Panel header="椤甸潰鏍峰紡" key="background"> {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null} </Panel> @@ -795,8 +784,6 @@ <div> <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/> <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> - <SysInterface config={config} updateConfig={this.updateConfig}/> - <PictureController/> <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={config && config.enabled} onChange={this.onEnabledChange} /> <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>淇濆瓨</Button> <Button type="default" onClick={this.closeView}>鍏抽棴</Button> -- Gitblit v1.8.0