king
2025-02-06 d1cd5af5adb53e91efdd278328e1b6f8ad834fb5
src/menu/components/card/table-card/index.jsx
@@ -220,7 +220,7 @@
    this.updateComponent(card)
  }
  addSearch = (copy) => {
  addSearch = (copy, type = '') => {
    const { card } = this.state
    let newcard = {}
@@ -242,7 +242,7 @@
    }
    // 注册事件-添加搜索
    MKEmitter.emit('addSearch', card.uuid, newcard)
    MKEmitter.emit('addSearch', card.uuid, newcard, type)
  }
  move = (item, direction) => {
@@ -337,13 +337,22 @@
        }
  
        if (res.field && keys.includes(res.field.toLowerCase())) {
          resolve({status: false, message: '搜索字段已存在!'})
          return
          resolve({status: false})
          const that = this
          confirm({
            title: '搜索字段已存在!',
            okText: '知道了',
            cancelText: '替换',
            onOk() {},
            onCancel() {
              that.addSearch(res, 'replace')
            }
          })
        } else {
          resolve({status: true})
          this.addSearch(res)
        }
        resolve({status: true})
        this.addSearch(res)
      }
    }
  }