From 84804b405cb88f659d055b16eb3bd00b813ccb4a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 10 十二月 2020 10:58:38 +0800 Subject: [PATCH] 2020-12-10 --- src/templates/calendarconfig/index.jsx | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/templates/calendarconfig/index.jsx b/src/templates/calendarconfig/index.jsx index e0e78ea..506fe3d 100644 --- a/src/templates/calendarconfig/index.jsx +++ b/src/templates/calendarconfig/index.jsx @@ -16,7 +16,6 @@ import SearchComponent from '@/templates/sharecomponent/searchcomponent' import MenuForm from '@/templates/comtableconfig/menuform' -import EditComponent from '@/templates/zshare/editcomponent' import SourceElement from '@/templates/zshare/dragsource' import Source from './source' import './index.scss' @@ -24,6 +23,7 @@ const { Panel } = Collapse const { confirm } = Modal +const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent')) const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcalcomponent')) const TabComponent = asyncComponent(() => import('./tabcomponent')) const CalComponent = asyncComponent(() => import('./calcomponent')) @@ -688,12 +688,7 @@ config: res.config }) } else if (res.type === 'paste') { - let config = fromJS(this.state.config).toJS() - if (res.content.copyType === 'search') { - config.search.push(res.content) - } - - this.setState({config}) + this.setState({config: res.config}) } } @@ -785,7 +780,7 @@ </div> } bordered={false} extra={ <div> - <EditComponent dict={this.state.dict} type="calendar" config={this.state.config} refresh={this.updateConfig}/> + <EditComponent dict={this.state.dict} options={['search']} config={this.state.config} refresh={this.updateConfig}/> <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button> <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button> -- Gitblit v1.8.0