king
2022-10-22 03a22ec6f9ad7303d10b4c65bb5bc6fa5cbd448a
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -1,9 +1,11 @@
import MenuUtils from '@/utils/utils-custom.js'
/**
 * @description 获取元素配置信息
 * @param {*} card
 * @param {*} type
 */
export function getCardCellForm (card, type, subtype, cardCell, anchors) {
export function getCardCellForm (card, cards, cardCell) {
  let _options = [
    { value: 'text', text: '文本'},
    { value: 'number', text: '数值'},
@@ -18,7 +20,14 @@
    { value: 'formula', text: '公式'},
  ]
  if (type === 'table' || (type === 'card' && subtype === 'datacard')) {
  let anchors = []
  if (window.GLOB.customMenu.Template === 'BaseTable') {
    anchors = null
  } else {
    anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || []
  }
  if (cards.type === 'table' || (cards.type === 'card' && cards.subtype === 'datacard')) {
    _options.push({value: 'sequence', text: '序号'})
  } else if (card.eleType === 'sequence') { // 拖拽添加类型转换
    card.eleType = 'text'
@@ -364,7 +373,8 @@
      initVal: card.anchors || [],
      tooltip: sessionStorage.getItem('appType') === 'mob' ? '注:小程序中无效' : '',
      required: false,
      options: anchors
      options: anchors,
      forbid: !anchors
    },
    {
      type: 'number',