king
2025-02-06 d1cd5af5adb53e91efdd278328e1b6f8ad834fb5
src/menu/components/card/data-card/index.jsx
@@ -207,7 +207,7 @@
    this.updateComponent(_card)
  }
  addSearch = (copy) => {
  addSearch = (copy, type = '') => {
    const { card } = this.state
    let newcard = {}
@@ -228,7 +228,7 @@
    }
    // 注册事件-添加搜索
    MKEmitter.emit('addSearch', card.uuid, newcard)
    MKEmitter.emit('addSearch', card.uuid, newcard, type)
  }
  addButton = (copy) => {
@@ -501,13 +501,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)
      }
    } else if (type === 'action') {
      if (res.style) {