king
2024-03-29 6dea6877f825d8b69bd1f0a9e127c8a03ec374be
2024-03-29
7个文件已修改
115 ■■■■ 已修改文件
src/index.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/normal-group/options.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/group/normal-group/index.jsx 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/group/normal-group/index.scss 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/share/tabtransfer/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/popview/index.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/index.js
@@ -78,6 +78,9 @@
    if (config.probation && /^20\d{2}-\d{2}-\d{2}$/.test(config.probation) && new Date(config.probation).getTime() > new Date().getTime()) {
      GLOB.probation = true
    }
    if (config.forcedUpdate && /^20\d{2}-\d{2}-\d{2}$/.test(config.forcedUpdate) && new Date(config.forcedUpdate).getTime() > new Date().getTime()) {
      GLOB.forcedUpdate = true
    }
    // 只有业务系统才可以设置为正式系统
    if (GLOB.sysType === 'local' && (config.systemType === 'official' || config.systemType === 'production')) {
@@ -93,9 +96,6 @@
      }
      GLOB.systemType = 'production'
      if (config.forcedUpdate && /^20\d{2}-\d{2}-\d{2}$/.test(config.forcedUpdate) && new Date(config.forcedUpdate).getTime() > new Date().getTime()) {
        GLOB.forcedUpdate = true
      }
    } else if (GLOB.sysType === 'local') {
      GLOB.probation = true
      GLOB.debugger = true
src/menu/components/group/normal-group/options.jsx
@@ -122,6 +122,18 @@
      ]
    },
    {
      type: 'radio',
      field: 'mergeAble',
      label: '展开/收起',
      initval: setting.mergeAble || 'false',
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: appType === 'mob'
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
src/tabviews/custom/components/group/normal-group/index.jsx
@@ -1,5 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
@@ -8,23 +9,32 @@
class NormalGroup extends Component {
  static propTpyes = {
    config: PropTypes.object,        // 组件配置信息
    config: PropTypes.object
  }
  state = {}
  state = {
    visible: true,
    mergeAble: this.props.config.setting.mergeAble === 'true'
  }
  render() {
    const { config } = this.props
    const { config, style } = this.props
    const { visible, mergeAble } = this.state
    if (config.components.length === 0) return (<div style={config.style}></div>)
    if (config.components.length === 0) return (<div className={'ant-col ant-col-' + config.width} style={style}><div style={config.style}></div></div>)
    
    return (
      <div className={'normal-group-wrap ' + (config.setting.layout || '')} id={'anchor' + config.uuid} style={config.style}>
        {config.setting && config.setting.title ? <div className="group-header" style={config.headerStyle}>
          <span className="title">{config.setting.title}</span>
        </div> : null}
        <TabTransfer config={config}/>
        {/* <Row className="component-wrap">{this.getComponents()}</Row> */}
      <div className={'ant-col ant-col-' + config.width + (mergeAble ? ' mk-merge-able' : '') + (visible ? '' : ' close')} style={style}>
        <div className={'normal-group-wrap ' + (config.setting.layout || '')} id={'anchor' + config.uuid} style={config.style}>
          <div className="mk-control">
            <DoubleLeftOutlined onClick={() => this.setState({visible: false})}/>
            <DoubleRightOutlined onClick={() => this.setState({visible: true})}/>
          </div>
          {config.setting && config.setting.title ? <div className="group-header" style={config.headerStyle}>
            <span className="title">{config.setting.title}</span>
          </div> : null}
          <TabTransfer config={config}/>
        </div>
      </div>
    )
  }
src/tabviews/custom/components/group/normal-group/index.scss
@@ -20,6 +20,21 @@
      z-index: 1;
    }
  }
  .mk-control {
    display: none;
    position: absolute;
    top: 0px;
    right: -24px;
    z-index: 2;
    background: #ffffff;
    box-shadow: 0px 0px 2px #d8d8d8;
    .anticon {
      padding: 5px;
      cursor: pointer;
    }
  }
}
.normal-group-wrap::after {
@@ -37,4 +52,44 @@
      width: 5%;
    }
  }
}
.mk-merge-able {
  transition: all 0.2s;
  .normal-group-wrap {
    position: relative;
  }
  .mk-control {
    display: inline-block;
    .anticon-double-left {
      display: inline-block;
    }
    .anticon-double-right {
      display: none;
    }
  }
}
.mk-merge-able + .ant-col {
  transition: all 0.2s;
}
.mk-merge-able.close {
  width: 0px;
  .normal-group-wrap {
    margin: 0!important;
  }
  .mk-control {
    display: inline-block;
    .anticon-double-left {
      display: none;
    }
    .anticon-double-right {
      display: inline-block;
    }
  }
}
.mk-merge-able.close + .ant-col {
  width: 100%;
}
src/tabviews/custom/components/share/tabtransfer/index.jsx
@@ -294,9 +294,7 @@
        )
      } else if (item.type === 'group' && item.subtype === 'normalgroup') {
        return (
          <Col span={item.width} style={style} key={item.uuid}>
            <NormalGroup config={item}/>
          </Col>
          <NormalGroup config={item} style={style} key={item.uuid}/>
        )
      } else if (item.type === 'form' && item.subtype === 'simpleform') {
        return (
src/tabviews/custom/index.jsx
@@ -1642,9 +1642,7 @@
        )
      } else if (item.type === 'group' && item.subtype === 'normalgroup') {
        return (
          <Col span={item.width} style={style} key={item.uuid}>
            <NormalGroup config={item}/>
          </Col>
          <NormalGroup config={item} style={style} key={item.uuid}/>
        )
      } else if (item.type === 'editor') {
        return (
src/tabviews/custom/popview/index.jsx
@@ -1120,9 +1120,7 @@
        )
      } else if (item.type === 'group' && item.subtype === 'normalgroup') {
        return (
          <Col span={item.width} style={style} key={item.uuid}>
            <NormalGroup config={item}/>
          </Col>
          <NormalGroup config={item} style={style} key={item.uuid}/>
        )
      } else if (item.type === 'editor') {
        return (