king
2024-06-24 0ac68a47d7e024ba74d63e1b0f3cf7b9eeb20994
2024-06-24
3个文件已修改
64 ■■■■ 已修改文件
src/menu/components/card/cardcellcomponent/elementform/index.jsx 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/cardcellList/index.jsx 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -233,6 +233,24 @@
      if (this.record.eval === 'true') {
        _options.push('decimal')
      }
      if (this.record.eval !== 'func') {
        _options.push('link')
      }
      if (this.record.link && this.record.eval !== 'func') {
        _options.push('linkType')
        if (this.record.linkType === 'linkmenu') {
          _options.push('open')
          if (this.record.link === 'static') {
            _options.push('linkmenu')
          } else {
            _options.push('linkurl')
          }
        } else if (this.record.linkType === 'other') {
          _options.push('linkurl', 'open')
        } else {
          _options.push('linkurl')
        }
      }
    }
    if (_options.includes('fixStyle') && this.record.fixStyle === 'alone') {
      _options.push('fixSize', 'fixColor', 'fixLeft', 'fixRight')
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -608,6 +608,16 @@
      ]
    },
    {
      type: 'codemirror',
      key: 'formula',
      label: '公式',
      initVal: card.formula || '',
      tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果,在不使用解析时换行符或空格会替换为页面元素。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等。注:会替换公式中的@username@、@fullName@、@bid@。',
      toolWidth: 450,
      placeholder: '例如:@price@ * @number@',
      required: true
    },
    {
      type: 'radio',
      key: 'link',
      label: '链接',
@@ -683,16 +693,6 @@
        {value: 'blank', text: appType !== 'mob' ? '新窗口' : '新页面'},
        {value: 'self', text: appType !== 'mob' ? '当前窗口' : '当前页面'},
      ]
    },
    {
      type: 'codemirror',
      key: 'formula',
      label: '公式',
      initVal: card.formula || '',
      tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果,在不使用解析时换行符或空格会替换为页面元素。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等。注:会替换公式中的@username@、@fullName@、@bid@。',
      toolWidth: 450,
      placeholder: '例如:@price@ * @number@',
      required: true
    },
    {
      type: 'checkbox',
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -1034,14 +1034,26 @@
          className = mark.signType
        }
        contents.push(
          <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
            <div style={_style}>
              {card.alignItems ? <TextCell card={card} className={'ant-mk-text line' + (card.height || '') + className} value={val}/> :
              <div className={'ant-mk-text line' + (card.height || '') + className} style={{height: card.innerHeight}}>{val}</div>}
        if (card.link && !data.$disabled) {
          _style.cursor = 'pointer'
          contents.push(
            <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
              <div style={_style} onClick={(e) => {this.openNewView(e, card)}}>
                {card.alignItems ? <TextCell card={card} className={'ant-mk-text line' + (card.height || '') + className} value={val}/> :
                <div className={'ant-mk-text line' + (card.height || '') + className} style={{height: card.innerHeight}}>{val}</div>}
              </div>
            </div>
          </div>
        )
          )
        } else {
          contents.push(
            <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
              <div style={_style}>
                {card.alignItems ? <TextCell card={card} className={'ant-mk-text line' + (card.height || '') + className} value={val}/> :
                <div className={'ant-mk-text line' + (card.height || '') + className} style={{height: card.innerHeight}}>{val}</div>}
              </div>
            </div>
          )
        }
      } else if (card.eleType === 'tag') {
        let vals = ''