king
2021-01-15 2737c184d0954ac1f13b3a02840a88cd0db159c0
2021-01-15
6个文件已修改
42 ■■■■ 已修改文件
src/templates/modalconfig/dragelement/card.jsx 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/dragelement/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.scss 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/source.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/modalform/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/dragelement/card.jsx
@@ -3,12 +3,15 @@
import { Icon, Select, DatePicker, Input, InputNumber, Button, Popover, Switch, Radio, Checkbox } from 'antd'
import moment from 'moment'
import CheckCard from '../checkCard'
import ColorSketch from '@/mob/colorsketch'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
const { MonthPicker } = DatePicker
const { TextArea } = Input
const Editor = asyncComponent(() => import('@/components/editor'))
const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
const CheckCard = asyncComponent(() => import('../checkCard'))
const Card = ({ id, card, cols, moveCard, findCard, editCard, closeCard, copyCard, showField }) => {
  const originalIndex = findCard(id).index
@@ -63,7 +66,7 @@
  let wrapCol = 'ant-col-sm-16'
  let isEntireLine = false
  if (card.entireLine === 'true' || ['textarea', 'hint', 'checkcard'].includes(card.type)) {
  if (card.entireLine === 'true' || ['textarea', 'hint', 'checkcard', 'brafteditor'].includes(card.type)) {
    isEntireLine = true
  }
@@ -97,6 +100,8 @@
    formItem = (<DatePicker showTime value={card.initval ? moment().subtract(card.initval, 'days') : null} />)
  } else if (card.type === 'textarea') {
    formItem = (<TextArea value={card.initval} autoSize={{ minRows: 2, maxRows: 6 }} />)
  } else if (card.type === 'brafteditor') {
    formItem = (<Editor />)
  } else if (card.type === 'fileupload') {
    formItem = (<Button style={{marginTop: '3px'}}><Icon type="upload" /> 点击上传 </Button>)
  } else if (card.type === 'funcvar') {
src/templates/modalconfig/dragelement/index.jsx
@@ -128,7 +128,7 @@
      {cards.map(card => {
        let isEntireLine = false
        if (card.entireLine === 'true' || ['textarea', 'hint', 'checkcard'].includes(card.type)) {
        if (card.entireLine === 'true' || ['textarea', 'hint', 'checkcard', 'brafteditor'].includes(card.type)) {
          isEntireLine = true
        }
        
src/templates/modalconfig/index.scss
@@ -252,6 +252,10 @@
                  min-width: 100px;
                }
              }
              .normal-braft-editor {
                border: 1px solid #d9d9d9;
                border-radius: 4px;
              }
            }
            .ant-form-item-control-wrapper::after {
              content: '';
src/templates/modalconfig/source.jsx
@@ -170,6 +170,12 @@
  },
  {
    type: 'form',
    label: '富文本',
    subType: 'brafteditor',
    url: ''
  },
  {
    type: 'form',
    label: CommonDict['header.form.funcvar'],
    subType: 'funcvar',
    url: ''
src/templates/zshare/formconfig.jsx
@@ -1927,6 +1927,9 @@
        value: 'color',
        text: Formdict['model.form.color']
      }, {
        value: 'brafteditor',
        text: '富文本'
      }, {
        value: 'funcvar',
        text: Formdict['header.form.funcvar']
      },
@@ -2225,6 +2228,19 @@
    },
    {
      type: 'radio',
      key: 'hidelabel',
      label: '隐藏名称',
      initVal: card.hidelabel || 'false',
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    {
      type: 'radio',
      key: 'readonly',
      label: Formdict['header.form.readonly'],
      initVal: card.readonly || 'false',
src/templates/zshare/modalform/index.jsx
@@ -30,6 +30,7 @@
  textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'maxRows', 'encryption', 'interception', 'tooltip'],
  color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'entireLine', 'tooltip'],
  hint: ['label', 'type', 'blacklist', 'message'],
  brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'tooltip'],
  funcvar: [],
  linkMain: ['readonly', 'required', 'hidden', 'fieldlength', 'entireLine', 'tooltip']
}
@@ -521,7 +522,7 @@
                  getPopupContainer={() => document.getElementById('modal-fields-form-box')}
                >
                  {item.options.map((option, i) =>
                    <Select.Option key={`${i}`} value={option.value || option.field}>
                    <Select.Option key={`${i}`} value={option.value || option.field || ''}>
                      {item.key === 'icon' && <Icon type={option.text} />} {option.text || option.label}
                    </Select.Option>
                  )}