king
2023-01-28 1b60547cb25f5c0a4371e5be0517adf092f2dc62
src/menu/components/card/data-card/index.jsx
@@ -69,7 +69,12 @@
            marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px'
          },
          backStyle: {},
          elements: [],
          elements: [{
            uuid: Utils.getuuid(),
            eleType: 'text',
            datatype: 'static',
            value: '循环区域'
          }],
          backElements: [],
          menus: []
        }]
@@ -196,16 +201,6 @@
          card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`})
        }
      }
      // $check@有效性检测
      // if (['prompt', 'exec', 'pop'].includes(cell.OpenType) && cell.Ot === 'required' && cell.verify && cell.verify.scripts && cell.verify.scripts.length > 0) {
      //   cell.verify.scripts.some(s => {
      //     if (s.status !== 'false' && /\$check@|@check\$/ig.test(s.sql)) {
      //       card.errors.push({ level: 1, detail: `可选择多行的按钮“${cell.label}”中 $check@ 或 @check$ 将不会生效!`})
      //       return true
      //     }
      //     return false
      //   })
      // }
    })
    card.subcards.forEach((item, i) => {
@@ -293,7 +288,7 @@
  changeStyle = () => {
    const { card } = this.state
    MKEmitter.emit('changeStyle', ['background', 'height', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle)
    MKEmitter.emit('changeStyle', ['background', 'height', 'border', 'padding', 'margin', 'shadow', 'clear'], card.style, this.getStyle)
  }
  getStyle = (style) => {
@@ -496,9 +491,9 @@
      let elements = []
      res.elements && res.elements.forEach(cell => {
        if (cell.datatype === 'dynamic') {
          cell.datatype = 'static'
        }
        // if (cell.datatype === 'dynamic') {
        //   cell.datatype = 'static'
        // }
        if (cell.eleType !== 'button') {
          cell.uuid = Utils.getuuid()
@@ -517,9 +512,9 @@
      if (appType !== 'mob') {
        res.backElements && res.backElements.forEach(cell => {
          if (cell.datatype === 'dynamic') {
            cell.datatype = 'static'
          }
          // if (cell.datatype === 'dynamic') {
          //   cell.datatype = 'static'
          // }
          if (cell.eleType !== 'button') {
            cell.uuid = Utils.getuuid()