king
2024-12-10 0c168ce15c9e166c98a1f1ad1decc073dfec2ea4
src/menu/components/share/markcomponent/index.jsx
@@ -112,7 +112,7 @@
        options: [],
        render: text => {
          let sign = {
            'font': '文字',
            'font': '字体颜色',
            'background': '背景',
            'underline': '下划线',
            'line-through': '中划线',
@@ -267,7 +267,7 @@
    let signs = [
      {
        value: 'font',
        label: '文字'
        label: '字体颜色'
      },
      {
        value: 'background',
@@ -324,6 +324,11 @@
      signs.pop()
      signs.pop()
      signs.pop()
    } else if (type === 'icon') {
      signs = [{
        value: 'font',
        label: '字体颜色'
      }]
    } else if (type === 'slider') {
      markColumns = markColumns.filter(col => {
        col.width = '20%'
@@ -399,12 +404,12 @@
      })
      this.props.onSubmit(marks)
    } else {
      const _this = this
      const that = this
      confirm({
        title: '存在未保存标记,确定忽略吗?',
        onOk() {
          _this.setState({ visible: false })
          _this.props.onSubmit(marks)
          that.setState({ visible: false })
          that.props.onSubmit(marks)
        },
        onCancel() {}
      })
@@ -414,8 +419,13 @@
  render() {
    const { marks, markColumns, visible, options, signs } = this.state
    let className = ''
    if (this.props.type === 'line' && this.props.marks.length) {
      className = 'mk-line-marks'
    }
    return (
      <div style={{display: 'inline-block'}}>
      <div style={{display: 'inline-block'}} className={className}>
        <AntDesignOutlined className="profile" title="标记" onClick={this.resetMark} />
        <Modal
          wrapClassName="mark-modal-wrap"
@@ -430,7 +440,7 @@
        >
          <MarkForm field={this.props.field} signs={signs} columns={options} markChange={this.markChange}/>
          <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>注:从上到下,匹配第一个符合条件的标记。</Col>
          <EditTable actions={['edit', 'move', 'del']} data={marks} columns={markColumns} onChange={(marks) => this.setState({marks})}/>
          <EditTable actions={['edit', 'move', 'del', 'copy']} type="marks" data={marks} columns={markColumns} onChange={(marks) => this.setState({marks})}/>
        </Modal>
      </div>
    )