diff --git a/orion-ops-ui/src/assets/style/arco-extends.less b/orion-ops-ui/src/assets/style/arco-extends.less new file mode 100644 index 00000000..5750af30 --- /dev/null +++ b/orion-ops-ui/src/assets/style/arco-extends.less @@ -0,0 +1,143 @@ +// 内联菜单 +.arco-menu-inner::-webkit-scrollbar { + display: none; +} + +// 吸顶列表 +.sticky-list { + .arco-list-header { + position: sticky; + background: var(--color-fill-2); + border-bottom: none; + top: 0; + } +} + +// 表头 +.arco-table-td-content { + color: rgba(var(--gray-9), .95); + font-size: 13px; +} + +// 表格 +.arco-table-cell { + .circle { + display: inline-block; + margin-right: 4px; + margin-bottom: 2px; + width: 6px; + height: 6px; + border-radius: 50%; + background-color: rgb(var(--blue-6)); + + &.pass { + background-color: rgb(var(--green-6)); + } + } +} + +// 垂直滚动 +.arco-scrollbar-track-direction-vertical { + width: 9px; + + .arco-scrollbar-thumb-bar { + margin: 0; + } +} + +// 水平滚动 +.arco-scrollbar-track-direction-horizontal { + height: 9px; + + .arco-scrollbar-thumb-bar { + margin: 0; + } +} + +// 表头 +.a-query-header-grid { + .arco-grid-item { + &:last-child { + display: flex !important; + } + } +} + +// 标准卡片 +.general-card { + border-radius: 4px; + border: none; + + & > .arco-card-header { + height: auto; + padding: 16px; + border: none; + } + + & > .arco-card-body { + padding: 0 16px 16px 16px; + } +} + +// 块状树 +.block-tree { + .arco-tree-node { + cursor: unset; + + &-switcher { + margin-left: 8px; + } + + &:hover { + background-color: var(--color-fill-1); + } + + &-selected { + background-color: var(--color-fill-2); + + &:hover { + background-color: var(--color-fill-1); + } + } + + &-title { + padding: 0; + height: 32px; + + &:hover { + background-color: var(--color-fill-1); + } + + &-text { + width: 100%; + height: 100%; + display: flex; + align-items: center; + cursor: pointer; + } + } + } +} + +// 抽屉 +.arco-drawer { + &-header { + border-bottom: unset; + } + + &-footer { + border-top: unset; + } + + &-body { + padding: 0; + } +} + +.arco-trigger-menu { + user-select: none; +} + +.arco-dropdown-option-content { + user-select: none; +} diff --git a/orion-ops-ui/src/assets/style/global.less b/orion-ops-ui/src/assets/style/global.less index 0e10d19f..b70e1436 100644 --- a/orion-ops-ui/src/assets/style/global.less +++ b/orion-ops-ui/src/assets/style/global.less @@ -12,8 +12,6 @@ body { background-color: var(--color-bg-1); -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; - --color-scrollbar-track: var(--color-neutral-1); - --color-scrollbar-thumb: var(--color-neutral-5); } // -- echarts @@ -68,103 +66,6 @@ body { } } -// -- arco -.arco-menu-inner::-webkit-scrollbar { - display: none; -} - -.sticky-list { - .arco-list-header { - position: sticky; - background: var(--color-fill-2); - border-bottom: none; - top: 0; - } -} - -.arco-table-td-content { - color: rgba(var(--gray-9), .95); - font-size: 13px; -} - -.arco-table-cell { - .circle { - display: inline-block; - margin-right: 4px; - margin-bottom: 2px; - width: 6px; - height: 6px; - border-radius: 50%; - background-color: rgb(var(--blue-6)); - - &.pass { - background-color: rgb(var(--green-6)); - } - } -} - -.arco-trigger-menu { - user-select: none; -} - -.arco-dropdown-option-content { - user-select: none; -} - -.arco-drawer-header { - border-bottom: unset; -} - -.arco-drawer-footer { - border-top: unset; -} - -.arco-drawer-container.drawer-body-padding-0 { - .arco-drawer-body { - padding: 0 !important; - } -} - -.arco-scrollbar-track-direction-vertical { - width: 9px; - - .arco-scrollbar-thumb-bar { - margin: 0; - } -} - -.arco-scrollbar-track-direction-horizontal { - height: 9px; - - .arco-scrollbar-thumb-bar { - margin: 0; - } -} - -.a-query-header-grid { - .arco-grid-item { - &:last-child { - display: flex !important; - } - } -} - -// -- card -.general-card { - border-radius: 4px; - border: none; - - & > .arco-card-header { - height: auto; - padding: 16px; - border: none; - } - - & > .arco-card-body { - padding: 0 16px 16px 16px; - } -} - // -- click-icon .click-icon-wrapper { display: flex; @@ -309,20 +210,24 @@ body { -moz-osx-font-smoothing: grayscale; } -::-webkit-scrollbar-track { - background-color: var(--color-scrollbar-track); - border-radius: 8px; -} - ::-webkit-scrollbar { -webkit-appearance: none; - width: 5px; - height: 5px; + width: 6px; + height: 4px; +} + +::-webkit-scrollbar-track { + background-color: var(--color-neutral-1); + border-radius: 8px; } ::-webkit-scrollbar-thumb { - cursor: pointer; + border: 1px solid transparent; + background-clip: padding-box; border-radius: 8px; - background-color: var(--color-scrollbar-thumb); - transition: color .2s ease; + background-color: var(--color-neutral-5); + + &:hover { + background-color: var(--color-neutral-6); + } } diff --git a/orion-ops-ui/src/components/app/setting/index.vue b/orion-ops-ui/src/components/app/setting/index.vue index 4f737941..134b670e 100644 --- a/orion-ops-ui/src/components/app/setting/index.vue +++ b/orion-ops-ui/src/components/app/setting/index.vue @@ -1,4 +1,5 @@ @@ -151,4 +155,9 @@ vertical-align: -4px; } } + + .preference-containers{ + padding: 0 16px; + } + diff --git a/orion-ops-ui/src/components/asset/host-group/host-group-tree.vue b/orion-ops-ui/src/components/asset/host-group/host-group-tree.vue index a0e0dd5e..4c69f26a 100644 --- a/orion-ops-ui/src/components/asset/host-group/host-group-tree.vue +++ b/orion-ops-ui/src/components/asset/host-group/host-group-tree.vue @@ -3,7 +3,7 @@ - + @@ -159,24 +159,6 @@ height: 100%; overflow: auto; overflow-x: hidden; - - :deep(.arco-menu) { - ::-webkit-scrollbar { - width: 12px; - height: 4px; - } - - ::-webkit-scrollbar-thumb { - border: 4px solid transparent; - background-clip: padding-box; - border-radius: 7px; - background-color: var(--color-text-4); - } - - ::-webkit-scrollbar-thumb:hover { - background-color: var(--color-text-3); - } - } } .layout-content { diff --git a/orion-ops-ui/src/main.ts b/orion-ops-ui/src/main.ts index eceac854..4a9a55f5 100644 --- a/orion-ops-ui/src/main.ts +++ b/orion-ops-ui/src/main.ts @@ -11,6 +11,7 @@ import App from './App.vue'; // 样式通过 arco-plugin 插件导入 详见目录文件 config/plugin/arcoStyleImport.ts import '@/assets/style/global.less'; import '@/assets/style/layout.less'; +import '@/assets/style/arco-extends.less'; import '@/api/interceptor'; const app = createApp(App); diff --git a/orion-ops-ui/src/views/asset/grant/components/router-roles.vue b/orion-ops-ui/src/views/asset/grant/components/router-roles.vue index d2382496..d1fdc1f2 100644 --- a/orion-ops-ui/src/views/asset/grant/components/router-roles.vue +++ b/orion-ops-ui/src/views/asset/grant/components/router-roles.vue @@ -8,7 +8,9 @@ :items="rolesRouter" @change="(key, item) => emits('change', key, item)" /> - + diff --git a/orion-ops-ui/src/views/asset/grant/components/router-users.vue b/orion-ops-ui/src/views/asset/grant/components/router-users.vue index 00179d5b..e425150c 100644 --- a/orion-ops-ui/src/views/asset/grant/components/router-users.vue +++ b/orion-ops-ui/src/views/asset/grant/components/router-users.vue @@ -8,7 +8,9 @@ :items="usersRouter" @change="(key, item) => emits('change', key, item)" /> - + diff --git a/orion-ops-ui/src/views/asset/host-key/components/host-key-form-drawer.vue b/orion-ops-ui/src/views/asset/host-key/components/host-key-form-drawer.vue index 71446ea9..d2e446ae 100644 --- a/orion-ops-ui/src/views/asset/host-key/components/host-key-form-drawer.vue +++ b/orion-ops-ui/src/views/asset/host-key/components/host-key-form-drawer.vue @@ -1,6 +1,5 @@