style.less 6.38 KB
/* stylelint-disable no-duplicate-selectors */
/* stylelint-disable selector-class-pattern */
@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;
  align-items: center;

  .header-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

.ant-tree-treenode-draggable .ant-tree-draggable-icon {
  padding-top: 6px;
  opacity: 1 !important;
}

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

  .ant-tree .ant-tree-switcher {
    // width: 34px;
    margin-top: 11.5px;
    display: flex;
    // justify-content: flex-end;
  }

  .ant-tree-switcher_open,
  .ant-tree-switcher_close {
    margin-top: 11.5px;
    margin-right: 10px;
    margin-left: 10px;
    display: flex;
    justify-content: flex-end;
  }

  .drop-icon {
    &-child {
      left: -42px !important;
      position: absolute;
      top: 10px;
      opacity: 1;
      display: block;
    }
  }
}

// .ant-tree-treenode-leaf-last {
//   .ant-tree-switcher {
//     // width: 34px;

//   }

//   .drop-icon {
//     position: absolute;
//     top: 10px;
//     left: -42px !important;
//     opacity: 1;
//     display: block;
//   }
// }

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

  .ant-btn.ant-btn-icon-only {
    font-size: 16px;
    color: @N7;

    &:hover {
      color: @B8;
      opacity: 1;

      .anticon {
        color: @B8;

        &.title-btn-del-btn {
          color: @E3;
        }
      }
    }

    &:disabled,
    &.ant-btn-disabled {
      color: @N5;

      &:hover {
        color: @N5;

        .anticon {
          color: @N5;

          &.title-btn-del-btn {
            color: @N5;
          }
        }
      }
    }
  }

  .title-btn-del {
    opacity: 0.01;
  }

  .title-btn {
    opacity: 0.01;
  }

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

.opt-left {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 2px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: width 0.3s cubic-bezier(0.2, 0, 0, 1) 0s;

  .ant-input-affix-wrapper {
    border-color: @N4;
  }

  .sp-input {
    &::placeholder {
      color: red !important;
    }
  }
}

.opt-left-down {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 2px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: #fff;
  border-radius: 4px;

  .qx-field-setter {
    border-width: 1px;
    border-style: solid;
    border-color: #d9d9d9;
    border-radius: 6px;
    // height: 32px;

    .qx-formula-cm {
      padding-left: 10px !important;
    }
  }
}

.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 {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  flex-wrap: nowrap;

  .range-cell {
    display: flex;
    align-content: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
  }

  .ant-input-affix-wrapper,
  .qx-field-setter {
    border-width: 0;
  }
}

.search-selected {
  .ant-input {
    color: #1890ff;
  }
}

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

.qx-parameter-setting--search {
  .anticon {
    font-size: 16px;
    color: @N6;
  }
}

.drop-icon {
  position: absolute;
  top: 10px;
  left: -22px;
  opacity: 1;
  display: block;
}

.qx-parameter-tree-list .ant-tree-list {
  .ant-tree-treenode:not(.ant-tree-treenode-disabled) {
    background-color: transparent !important;
    padding-top: 4px !important;
    border-radius: 4px;
    transition: border-color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
      background 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
      padding 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);

    .drop-icon {
      position: absolute;
      top: 10px;
      left: -22px;
      opacity: 1;
      display: block;
    }

    &:hover {
      background-color: @N3 !important;

      .title-btn-del,
      .title-btn {
        opacity: 1;
      }
    }
  }

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

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

.parameter-setting-table-title {
  font-weight: 500;
  font-size: 14px;
  line-height: 22px;
  color: #7c7e86;
  padding-left: 10px;
}

.parameter-setting-table {
  .code-header {
    display: flex;
  }

  .table-expanded {
    color: #7c7e86;
    margin-left: 8px;
    transition: transform 0.3s;
  }

  .table-expanded-change {
    transform: rotate(-90deg);
    color: #7c7e86;
    margin-left: 8px;
    transition: transform 0.3s;
  }
}

.parameter-setting-table .ant-table-cell {
  height: 40px;
  padding: 4px 16px 0 4px !important;
}