king
2022-05-19 15acad2194d616b37d85dd6192bc5656403f1a83
src/templates/subtableconfig/index.jsx
@@ -66,7 +66,8 @@
    thawButtons: [],         // 已选择要解冻的按钮
    activeKey: '0',          // 默认展开基本信息
    chartview: null,         // 当前视图
    openEdition: ''          // 编辑版本标记,防止多人操作
    openEdition: '',         // 编辑版本标记,防止多人操作
    modalStatus: false       // 弹窗是否开启,判断ctrl+s是否可用
  }
  /**
@@ -152,6 +153,15 @@
      let _shortcut = `${preKey}+${keyCode}`
      if (_shortcut === 'ctrl+83') {
        if (this.state.modalStatus) {
          notification.warning({
            top: 92,
            message: '请保存' + this.state.modalStatus,
            duration: 5
          })
          return false
        }
        let node = document.getElementById('save-config')
        if (node && node.click) {
          node.click()
@@ -159,6 +169,7 @@
        return false
      }
    }
    MKEmitter.addListener('modalStatus', this.modalStatus)
  }
  /**
@@ -219,6 +230,11 @@
      return
    }
    document.onkeydown = () => {}
    MKEmitter.removeListener('modalStatus', this.modalStatus)
  }
  modalStatus = (val) => {
    this.setState({modalStatus: val})
  }
  // 页面返回