src/menu/components/table/base-table/columns/editColumn/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/templates/zshare/codemirror/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/templates/zshare/codemirror/index.scss | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/utils/utils-custom.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/systemproc/proc/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/systemproc/proc/index.scss | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/menu/components/table/base-table/columns/editColumn/index.jsx
@@ -167,7 +167,15 @@ if (item.type === 'text') { let rules = [] if (item.key !== 'linkurl') { if (item.key === 'field') { rules = [{ pattern: /^[\u4E00-\u9FA50-9a-zA-Z_]*$/ig, message: '字段名只允许包含数字、字母、汉字以及_' }, { max: formRule.input.max, message: formRule.input.message }] } else if (item.key !== 'linkurl') { rules = [{ max: formRule.input.max, message: formRule.input.message src/templates/zshare/codemirror/index.jsx
@@ -23,6 +23,7 @@ value: PropTypes.string, // 内容 mode: PropTypes.any, // 可选,语言模式,默认为sql theme: PropTypes.any, // 可选,主题样式 func: PropTypes.any, // 编辑存储过程 onChange: PropTypes.func // 内容变化时回调 } @@ -38,6 +39,8 @@ editor = null UNSAFE_componentWillMount () { const { func } = this.props let options = { lineNumbers: true, lineWrapping: true, @@ -50,6 +53,7 @@ } this.setState({ style: func ? {fontSize: '14px', lineHeight: '25px'} : {fontSize: '18px', lineHeight: '32px'}, value: this.props.value || '', defaultVal: this.props.value || '', options @@ -146,7 +150,7 @@ } render() { const { mode } = this.props const { mode, func } = this.props const { defaultVal, options, fullScreen, style, display } = this.state const menu = ( <Menu> @@ -190,11 +194,11 @@ ) return ( <div className="code-mirror-wrap" style={fullScreen ? style : null}> <div className="code-mirror-wrap" style={fullScreen || func ? style : null}> {!mode && !fullScreen ? <FormatPainterOutlined onClick={this.handleFormat}/> : null} {!fullScreen ? <FullscreenOutlined onClick={this.fullScreenChange}/> : null} {fullScreen ? <FullscreenExitOutlined onClick={this.fullScreenChange}/> : null} {fullScreen ? <Dropdown overlay={menu} placement="bottomRight"> {fullScreen || func ? <Dropdown overlayClassName="mk-mirror-font" overlay={menu} placement="bottomRight"> <FontSizeOutlined /> </Dropdown> : null} {display ? <CodeMirror src/templates/zshare/codemirror/index.scss
@@ -88,3 +88,6 @@ } } } .mk-mirror-font { z-index: 1200!important; } src/utils/utils-custom.js
@@ -453,16 +453,21 @@ } } if (card.setting.click === 'button' && card.setting.linkbtn) { card.setting.linkbtn = md5(commonId + card.setting.linkbtn) } if (card.elements) { card.elements = card.elements.map(cell => { cell.uuid = this.getuuid() if (cell.eleType === 'button') { cell.uuid = md5(commonId + cell.uuid) if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) { cell.pageTemplate = '' cell.linkmenu = '' } this.resetBtn(cell, commonId) } else { cell.uuid = this.getuuid() } return cell @@ -470,14 +475,15 @@ } if (card.backElements) { card.backElements = card.backElements.map(cell => { cell.uuid = this.getuuid() if (cell.eleType === 'button') { cell.uuid = md5(commonId + cell.uuid) if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) { cell.pageTemplate = '' cell.linkmenu = '' } this.resetBtn(cell, commonId) } else { cell.uuid = this.getuuid() } return cell @@ -488,16 +494,20 @@ if (item.wrap.datatype === 'public' && item.wrap.publicId) { item.wrap.publicId = md5(commonId + item.wrap.publicId) } if (item.wrap.linkbtn) { item.wrap.linkbtn = md5(commonId + item.wrap.linkbtn) } if (item.elements) { item.elements = item.elements.map(cell => { cell.uuid = this.getuuid() if (cell.eleType === 'button') { cell.uuid = md5(commonId + cell.uuid) if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) { cell.pageTemplate = '' cell.linkmenu = '' } this.resetBtn(cell, commonId) } else { cell.uuid = this.getuuid() } return cell @@ -518,7 +528,7 @@ }) } else if (c.type === 'action' && c.elements) { c.elements = c.elements.map(cell => { cell.uuid = this.getuuid() cell.uuid = md5(commonId + cell.uuid) if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) { cell.pageTemplate = '' @@ -548,7 +558,7 @@ }) } else if (col.type === 'action' && col.elements) { col.elements = col.elements.map(cell => { cell.uuid = this.getuuid() cell.uuid = md5(commonId + cell.uuid) this.resetBtn(cell, commonId) return cell }) @@ -721,12 +731,21 @@ } else if (['card', 'carousel', 'timeline'].includes(item.type)) { item.subcards.forEach(card => { card.uuid = this.getuuid() if (card.setting.click === 'button' && card.setting.linkbtn) { card.setting.linkbtn = md5(commonId + card.setting.linkbtn) } if (card.elements) { if (sessionStorage.getItem('editMenuType') === 'popview') { card.elements = card.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton') } card.elements = card.elements.map(cell => { if (cell.eleType === 'button') { cell.uuid = md5(commonId + cell.uuid) } else { cell.uuid = this.getuuid() } return cell }) } @@ -735,7 +754,11 @@ card.elements = card.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton') } card.backElements = card.backElements.map(cell => { if (cell.eleType === 'button') { cell.uuid = md5(commonId + cell.uuid) } else { cell.uuid = this.getuuid() } return cell }) } @@ -745,8 +768,15 @@ if (sessionStorage.getItem('editMenuType') === 'popview') { item.elements = item.elements.filter(b => b.OpenType !== 'popview' && b.OpenType !== 'funcbutton') } if (item.wrap.linkbtn) { item.wrap.linkbtn = md5(commonId + item.wrap.linkbtn) } item.elements = item.elements.map(cell => { if (cell.eleType === 'button') { cell.uuid = md5(commonId + cell.uuid) } else { cell.uuid = this.getuuid() } return cell }) } @@ -784,7 +814,8 @@ col.elements = col.elements.filter(c => c.OpenType !== 'popview' && c.OpenType !== 'funcbutton') } col.elements = col.elements.map(cell => { cell.uuid = this.getuuid() cell.uuid = md5(commonId + cell.uuid) return cell }) } src/views/systemproc/proc/index.jsx
@@ -376,7 +376,7 @@ </div> </div> <div className="edit-wrap"> <CodeMirror value={content} onChange={(val) => this.setState({content: val})}/> <CodeMirror value={content} func={true} onChange={(val) => this.setState({content: val})}/> </div> </div> <Modal src/views/systemproc/proc/index.scss
@@ -109,6 +109,10 @@ background-color: #ffffff; } } .code-mirror-wrap .anticon-font-size { position: absolute; } } .mk-create-func {