From f9f60bb0dd17a764ba03faa8041f5b6e9e071553 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 18 一月 2025 23:37:44 +0800 Subject: [PATCH] 2025-01-18 --- src/menu/components/form/simple-form/index.jsx | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx index 60e1f9f..3e67e97 100644 --- a/src/menu/components/form/simple-form/index.jsx +++ b/src/menu/components/form/simple-form/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Popover, Modal, Button, Switch, message } from 'antd' -import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined } from '@ant-design/icons' +import { PlusOutlined, SettingOutlined, EditOutlined, ToolOutlined, DeleteOutlined, SwapOutlined, FontColorsOutlined, VerticalRightOutlined } from '@ant-design/icons' import asyncComponent from '@/utils/asyncComponent' import asyncIconComponent from '@/utils/asyncIconComponent' @@ -516,6 +516,26 @@ }) } + toLower = () => { + let card = fromJS(this.state.card).toJS() + let that = this + + card.subcards[0].fields = card.subcards[0].fields.map(item => { + if (item.field) { + item.field = item.field.toLowerCase() + } + return item + }) + + confirm({ + content: `纭畾灏嗗瓧娈佃浆涓哄皬鍐欏悧锛焋, + onOk() { + that.updateComponent(card) + }, + onCancel() {} + }) + } + clickComponent = (e) => { if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') { e.stopPropagation() @@ -564,6 +584,7 @@ } trigger="hover"> <SwapOutlined /> </Popover> : null} + <VerticalRightOutlined style={{color: 'orange', transform: 'rotate(270deg)'}} title="瀛楁杞皬鍐�" onClick={this.toLower}/> <FormFork forms={card.subcards[0].fields}/> {/* <CopyOutlined title="澶嶅埗" onClick={this.triggerCopy} /> */} <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} /> -- Gitblit v1.8.0