style.less 4.88 KB
@import '~@qx/ui/src/style/variable.less';

/* stylelint-disable declaration-block-no-redundant-longhand-properties */
.border-none .ant-select:not(.ant-select-customize-input) .ant-select-selector {
  border: none;
  box-shadow: none;
}

.qx-parameter-setting-content {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.tree-wrapper {
  margin-top: 20px;

  .ant-tree-treenode {
    padding-top: 4px !important;
    border-radius: 4px;

    &:hover {
      background-color: @N3;
    }
  }

  .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
    background-color: transparent;
  }

  .ant-tree .ant-tree-node-content-wrapper:hover {
    background-color: transparent;
  }
}

.border-none
  .ant-select-focused:not(.ant-select-disabled).ant-select:not(
    .ant-select-customize-input
  )
  .ant-select-selector {
  border: none;
  box-shadow: none;
}

.hidden-tree {
  .ant-select-tree-switcher-noop {
    display: none;
  }

  .ant-select-tree-treenode {
    text-align: center;
  }
}

.opt-btn {
  display: flex;
  // width: 180px;
  flex-direction: row;
  align-items: center;
  margin-left: 10px;

  .title-btn-del {
    display: none;
    color: #666;

    &:hover {
      color: @E3;
      opacity: 1;
    }
  }

  .title-btn {
    display: none;
    color: #666;

    &:hover {
      color: #91d5ff;
      opacity: 1;
    }
  }

  .select-tree {
    height: 90%;
    background-color: #fff;
    border-radius: 3px;
  }
}

.opt-left {
  display: flex;
  // transition: all 0.5s ease-in-out;
  align-items: center;
  // -webkit-transition: width .4s;
  // transition: width .4s;
  width: 100%;
  margin-top: 2px;
  // min-width: 100px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opt-left-down {
  display: flex;
  // transition: all 0.5s ease-in-out;
  // -webkit-transition: width .4s;
  // transition: width .4s;
  align-items: center;
  width: 100%;
  // min-width: 100px;
  margin-top: 2px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
}

// .ant-tree-node-content-wrapper :hover .select-tree {
//   // display: none;
//   // padding: 2px;
//   // fle
//   height: 90%;
//   border-radius: 3px;
//   background-color: #fff;
// }

.ant-tree-node-content-wrapper :hover .opt-left {
  width: 65%;
  // height: 100%;
  // transform: scale(0.5) translate(-25%, -25%)
}

// .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected .opt-left {
//   // height: 100%;
//   width: 65%;
//   // transform: scale(0.5) translate(-25%, -25%)
// }

.ant-tree-node-content-wrapper :hover .opt-left-down {
  width: 85%;
}

// .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected .opt-left-down {
//   width: 85%;
// }

@keyframes title-btn-del {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.4;
  }

  70% {
    opacity: 0.6;
  }

  100% {
    opacity: 0.8;
  }
}

@keyframes title-btn {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.4;
  }

  70% {
    opacity: 0.6;
  }

  100% {
    opacity: 0.8;
  }
}

.ant-tree-node-content-wrapper :hover .title-btn-del {
  display: block;
  animation-name: title-btn-del;
  animation-duration: 2s;
  animation-iteration-count: 1;
}

.ant-tree-node-content-wrapper :hover .title-btn {
  display: block;
  animation-name: title-btn-del;
  animation-duration: 2s;
  animation-iteration-count: 1;
}

.btn-high-del {
  &:hover {
    color: @E3 !important;
  }
}

.editable-row:hover .editable-cell-value-wrap {
  padding: 4px 11px;
  border: 1px solid @N4;
  border-radius: 2px;
}

.editable-cell {
  position: relative;
}

.editable-center-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.editable-around-cell {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}

.editable-cell-value-wrap {
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.editable-cell-value-wrap-none {
  min-height: 30px;
  padding: 5px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.hidden-select {
  .ant-select-selector {
    visibility: hidden;
  }

  .ant-select-arrow {
    visibility: hidden;
  }

  .ant-select-tree-switcher-noop {
    display: none;
  }

  .ant-select-tree-treenode {
    text-align: center;
  }
}

.dropdown {
  min-width: 80px;
  overflow: auto;
  text-align: center !important;
}


.json-editor {
  width: 90%;
  margin-bottom: 20px;
  padding: 0;
  // 这句是必要的,是要解决一个样式的Bug
  :global(.ace-jsoneditor) {
    min-height: 350px;
    font-size: 12px !important;
  }

  :global(.jsoneditor-menu) {
    display: none;
  }

  :global(.jsoneditor-navigation-bar) {
    display: none;
  }

  :global(.jsoneditor-outer.has-main-menu-bar) {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}