From e9c48bd7356462ba9257540b130a47a65ad1861d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 26 八月 2021 17:17:11 +0800 Subject: [PATCH] 2021-08-26 --- src/menu/components/card/balcony/index.jsx | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/menu/components/card/balcony/index.jsx b/src/menu/components/card/balcony/index.jsx index 0fc02d5..fc5ae1b 100644 --- a/src/menu/components/card/balcony/index.jsx +++ b/src/menu/components/card/balcony/index.jsx @@ -1,19 +1,20 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Icon, Popover } from 'antd' +import { Icon, Popover, Checkbox } from 'antd' import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' import { resetStyle } from '@/utils/utils-custom.js' import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' +import getWrapForm from './options' import zhCN from '@/locales/zh-CN/model.js' import enUS from '@/locales/en-US/model.js' import './index.scss' const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) -const WrapComponent = asyncIconComponent(() => import('./wrapsetting')) +const NormalForm = asyncIconComponent(() => import('@/components/normalform')) const CardCellComponent = asyncComponent(() => import('../cardcellcomponent')) const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) const PasteComponent = asyncIconComponent(() => import('@/components/paste')) @@ -128,7 +129,7 @@ changeStyle = () => { const { card } = this.state - MKEmitter.emit('changeStyle', [card.uuid], ['height', 'background', 'border', 'padding', 'margin'], card.style) + MKEmitter.emit('changeStyle', [card.uuid], ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style) } getStyle = (comIds, style) => { @@ -163,24 +164,9 @@ addButton = () => { const { card } = this.state - let newcard = {} + let newcard = {eleType: 'button', label: 'button', verify: null, show: 'link', sqlType: '', Ot: 'requiredSgl', OpenType: 'prompt', icon: '', class: 'primary', intertype: 'system', execSuccess: 'grid', execError: 'never', popClose: 'never'} newcard.uuid = Utils.getuuid() newcard.focus = true - - newcard.eleType = 'button' - newcard.label = 'button' - newcard.sqlType = '' - newcard.Ot = 'requiredSgl' - newcard.OpenType = 'prompt' - newcard.icon = '' - newcard.class = 'primary' - newcard.intertype = 'system' - newcard.execSuccess = 'grid' - newcard.execError = 'never' - newcard.popClose = 'never' - newcard.errorTime = 10 - newcard.verify = null - newcard.show = 'link' // 娉ㄥ唽浜嬩欢-娣诲姞鍏冪礌 MKEmitter.emit('cardAddElement', [card.uuid, card.uuid], newcard) @@ -204,6 +190,17 @@ resolve({status: true}) } + getWrapForms = () => { + const { wrap } = this.state.card + + return getWrapForm(wrap) + } + + updateWrap = (res) => { + delete res.quick + this.updateComponent({...this.state.card, wrap: res}) + } + render() { const { card } = this.state @@ -215,7 +212,9 @@ <div className="mk-popover-control"> <Icon className="plus" title="娣诲姞鍏冪礌" onClick={this.addElement} type="plus" /> <Icon className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} type="plus-square" /> - <WrapComponent config={card} updateConfig={this.updateComponent} /> + <NormalForm title="鍗$墖璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}> + <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/> + </NormalForm> <CopyComponent type="balcony" card={card}/> <PasteComponent options={['action', 'customCardElement']} updateConfig={this.pasteComponent} /> <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" /> @@ -228,6 +227,7 @@ } trigger="hover"> <Icon type="tool" /> </Popover> + {card.wrap.checkAll === 'show' ? <div className="check-all"><Checkbox>鍏ㄩ��</Checkbox></div> : null} <CardCellComponent cards={card} cardCell={card} elements={card.elements} updateElement={this.updateCard}/> </div> ) -- Gitblit v1.8.0