king
2021-10-05 f9180a3ab8813c3937c7ba30750763cd693d1d37
2021-10-05
10个文件已修改
170 ■■■■ 已修改文件
src/components/normalform/modalform/mkInput/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkInput/index.scss 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkNumberInput/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkNumberInput/index.scss 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/editColumn/index.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/edit-table/columns/index.jsx 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkInput/index.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkInput/index.scss 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkNumberInput/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/mutilform/mkNumberInput/index.scss 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkInput/index.jsx
@@ -4,7 +4,7 @@
import MKEmitter from '@/utils/events.js'
import './index.scss'
// import './index.scss'
/**
 * @description 自定义文本输入
src/components/normalform/modalform/mkInput/index.scss
@@ -1,27 +0,0 @@
.am-list-item.am-input-item {
  .am-input-control {
    height: 100%;
    input {
      height: 100%;
    }
  }
  .am-input-label {
    width: 28%;
    max-width: 120px;
    text-overflow: ellipsis;
  }
  .am-input-extra {
    max-height: 40px;
    .anticon-scan {
      font-size: 22px;
      padding: 8px 5px;
    }
  }
}
.am-input-item.right {
  .am-input-control {
    input {
      text-align: right;
    }
  }
}
src/components/normalform/modalform/mkNumberInput/index.jsx
@@ -4,7 +4,7 @@
import MKEmitter from '@/utils/events.js'
import './index.scss'
// import './index.scss'
class MKNumberInput extends Component {
  constructor(props) {
src/components/normalform/modalform/mkNumberInput/index.scss
@@ -1,27 +0,0 @@
.am-list-item.am-input-item {
  .am-input-control {
    height: 100%;
    input {
      height: 100%;
    }
  }
  .am-input-label {
    width: 28%;
    max-width: 120px;
    text-overflow: ellipsis;
  }
  .am-input-extra {
    max-height: 40px;
    .anticon-scan {
      font-size: 22px;
      padding: 8px 5px;
    }
  }
}
.am-input-item.right {
  .am-input-control {
    input {
      text-align: right;
    }
  }
}
src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -43,6 +43,7 @@
    this.setState({
      visible: true,
      editable: column.editable || 'false',
      type: column.type,
      formlist: formlist.map(item => {
        item.hidden = !_options.includes(item.key)
@@ -108,6 +109,8 @@
      }
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    } else if (key === 'editable') {
    }
  }
@@ -219,7 +222,7 @@
                  }
                ]
              })(
                <Radio.Group>
                <Radio.Group onChange={(e) => {this.typeChange(item.key, e.target.value)}}>
                  {
                    item.options.map(option => {
                      return (
src/menu/components/table/edit-table/columns/index.jsx
@@ -56,7 +56,7 @@
        connectDropTarget(<th {...restProps} index={index} style={{ cursor: 'move', textAlign: align }} onDoubleClick={() => column && this.props.editColumn(column)}>
          <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
            <div className="mk-popover-control">
              {column && ['custom', 'colspan', 'action'].includes(column.type) ?
              {column && ['custom', 'action'].includes(column.type) ?
                <Icon className="plus" title="添加" type="plus" onClick={() => this.props.addElement(column)} /> : null
              }
              <Icon className="edit" title="编辑" type="edit" onClick={() => this.props.editColumn(column)} />
@@ -74,7 +74,7 @@
        <th {...restProps} key={column.uuid} onDoubleClick={() => this.props.editColumn(column)}>
          <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
            <div className="mk-popover-control">
              {column && ['custom', 'colspan'].includes(column.type) ?
              {column && ['custom'].includes(column.type) ?
                <Icon className="plus" title="添加" type="plus" onClick={() => this.props.addElement(column)} /> : null
              }
              <Icon className="edit" title="编辑" type="edit" onClick={() => this.props.editColumn(column)} />
@@ -257,21 +257,14 @@
    })
  }
  loopCol = (columns, col) => {
    return columns.map(column => {
      if (column.type === 'colspan') {
        column.subcols = this.loopCol(column.subcols, col)
      }
  updateCol = (col, btn) => {
    let _columns = fromJS(this.state.columns).toJS()
    _columns = _columns.map(column => {
      if (column.uuid === col.uuid) {
        return col
      }
      return column
    })
  }
  updateCol = (col, btn) => {
    let _columns = fromJS(this.state.columns).toJS()
    _columns = this.loopCol(_columns, col)
    this.setState({
      columns: _columns,
@@ -295,16 +288,7 @@
    const { config } = this.props
    let column = fromJS(col).toJS()
    if (column.type === 'colspan') {
      column.subcols = column.subcols || []
      let subcol = { isSub: true, focus: true, uuid: Utils.getuuid(), label: 'label', field: '', type: 'text' }
      column.subcols.push(subcol)
      this.setState({
        card: subcol
      })
      this.updateCol(column)
    } else if (column.type === 'custom') {
    if (column.type === 'custom') {
      let newcard = {uuid: Utils.getuuid(), focus: true, eleType: 'text', datatype: 'dynamic', style: {paddingLeft: '4px'}}
  
      // 注册事件-添加元素
@@ -336,9 +320,7 @@
    col.isSub = card.isSub === true
    col.marks = card.marks || []
    
    if (col.type === 'colspan') {
      col.subcols = card.subcols || []
    } else if (col.type === 'custom') {
    if (col.type === 'custom') {
      col.elements = card.type === 'custom' ? (card.elements || []) : []
    } else if (col.type === 'action') {
      col.elements = card.type === 'action' ? (card.elements || []) : []
@@ -376,20 +358,11 @@
    this.setState({card: null})
  }
  loopDelCol = (columns, col) => {
    return columns.filter(column => {
      if (column.type === 'colspan') {
        column.subcols = this.loopDelCol(column.subcols, col)
      }
      return column.uuid !== col.uuid
    })
  }
  deleteCol = (col) => {
    const { appType } = this.state
    let _columns = fromJS(this.state.columns).toJS()
    _columns = this.loopDelCol(_columns, col)
    _columns = _columns.filter(column => column.uuid !== col.uuid)
    this.setState({
      columns: _columns
src/tabviews/zshare/mutilform/mkInput/index.jsx
@@ -53,6 +53,9 @@
    if (!/\n/ig.test(val)) {
      this.props.onChange(val)
      this.setState({value: val})
      if (!val) {
        this.inputRef.current.focus()
      }
    } else {
      val = val.replace(/\n/ig, '')
@@ -79,7 +82,7 @@
    const { config } = this.props
    const { value } = this.state
    return <Input ref={this.inputRef} placeholder={config.placeholder || ''} value={value} autoComplete="off" disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleInputSubmit} />
    return <Input ref={this.inputRef} className="mk-form-input" allowClear placeholder={config.placeholder || ''} value={value} autoComplete="off" disabled={config.readonly} onChange={this.handleChange} onPressEnter={this.handleInputSubmit} />
  }
}
src/tabviews/zshare/mutilform/mkInput/index.scss
@@ -1,27 +1,11 @@
.am-list-item.am-input-item {
  .am-input-control {
    height: 100%;
    input {
      height: 100%;
    }
  }
  .am-input-label {
    width: 28%;
    max-width: 120px;
    text-overflow: ellipsis;
  }
  .am-input-extra {
    max-height: 40px;
    .anticon-scan {
      font-size: 22px;
      padding: 8px 5px;
    }
.mk-form-input {
  .ant-input-suffix {
    opacity: 0;
    transition: opacity 0.3s;
  }
}
.am-input-item.right {
  .am-input-control {
    input {
      text-align: right;
    }
.mk-form-input:hover {
  .ant-input-suffix {
    opacity: 1;
  }
}
src/tabviews/zshare/mutilform/mkNumberInput/index.jsx
@@ -4,7 +4,7 @@
import MKEmitter from '@/utils/events.js'
import './index.scss'
// import './index.scss'
class MKNumberInput extends Component {
  constructor(props) {
src/tabviews/zshare/mutilform/mkNumberInput/index.scss
@@ -1,27 +0,0 @@
.am-list-item.am-input-item {
  .am-input-control {
    height: 100%;
    input {
      height: 100%;
    }
  }
  .am-input-label {
    width: 28%;
    max-width: 120px;
    text-overflow: ellipsis;
  }
  .am-input-extra {
    max-height: 40px;
    .anticon-scan {
      font-size: 22px;
      padding: 8px 5px;
    }
  }
}
.am-input-item.right {
  .am-input-control {
    input {
      text-align: right;
    }
  }
}