style.less 6.32 KB
/* 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;
  // flex-shrink:0;
  // min-height: 32px;
  // padding: 1px;
  // position: 'relative', display: 'flex', flexWrap: 'wrap'

  // > .ant-tag {
  //   margin: 3px;

  //   &:first-child {
  //     margin-left: 10px;
  //   }

  //   ~ .qx-tags-input__box {
  //     padding-left: 5px;
  //   }
  // }
}

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

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

    &:hover {
      background-color: #f4f4f5;
    }
  }

  .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;
  }
}

// .ant-tree-node-selected:hover ~ .ant-tree-treenode:hover{
// 	background-color: #bae7ff !important;
// }

// .ant-tree-node-content-wrapper :hover ~ .ant-tree-treenode{
// 	// background-color: #F4F4F5;
//   // padding-top: 4px;
// }

// .tree-list :hover{
//   background-color: #ff72;
// }

// .ant-tree .ant-tree-treenode :hover{
//   background-color: #00f;
//   border-radius:4px;
// }

.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: red;
      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: ellipsi;
}

.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: ellipsi;
}

// .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: red !important;
  }
}

.editable-row:hover .editable-cell-value-wrap {
  padding: 4px 11px;
  border: 1px solid #d9d9d9;
  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;
}

//TODO 写法不行
// #root .hidden-select {
//   .ant-select-tree
//     .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected {
//     // background-color: #bae7ff;
//     background-color: @primary-2;
//   }
// }
// .ant-form-item
// .qx-parameter-setting__tree-list {
//   .ant-tree-draggable-icon {
//     line-height: 32px;
//   }

//   &.ant-tree
//     .ant-tree-treenode:not(.ant-tree-treenode-disabled)
//     .ant-tree-node-content-wrapper {
//     border-radius: 4px;

//     &.ant-tree-node-selected {
//       background-color: transparent;
//     }

//     &:hover,
//     &.ant-tree-node-selected:hover {
//       background-color: @N3;
//       // opacity: 1 !important;
//       // background-color: #91d5ff;
//     }
//   }
// }

// .ant-form-item{
//   margin-bottom: 0;
// }

.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;
  }
}