diff --git a/orion-ops-ui/src/assets/style/layout.less b/orion-ops-ui/src/assets/style/layout.less index 1ca7cf25..ff62d46e 100644 --- a/orion-ops-ui/src/assets/style/layout.less +++ b/orion-ops-ui/src/assets/style/layout.less @@ -1,7 +1,6 @@ .layout-container { background-color: var(--color-fill-2); - // fixme - // padding: 16px 16px 0 16px; + padding: 16px 16px 0 16px; display: flex; flex-direction: column; } @@ -67,6 +66,15 @@ } } +.card-list-item { + transition-property: all; +} + +.card-list-item:hover { + transform: translateY(-4px); + box-shadow: 2px 2px 12px rgba(0, 0, 0, .15); +} + .usn { user-select: none; } diff --git a/orion-ops-ui/src/types/table.ts b/orion-ops-ui/src/types/table.ts index 840c20e4..22811fd7 100644 --- a/orion-ops-ui/src/types/table.ts +++ b/orion-ops-ui/src/types/table.ts @@ -1,4 +1,5 @@ import { PaginationProps, TableRowSelection } from '@arco-design/web-vue'; +import { reactive } from 'vue'; /** * 默认分页 @@ -23,3 +24,43 @@ export const defaultRowSelection = (): TableRowSelection => { onlyCurrent: true, }; }; + +/** + * 创建列表分页 + */ +export const usePagination = (): PaginationProps => { + return reactive({ + total: 0, + current: 1, + pageSize: 10, + showTotal: true, + showPageSize: true, + pageSizeOptions: [10, 20, 30, 50, 100] + }); +}; + +/** + * 创建卡片列表分页 + */ +export const useCardPagination = (): PaginationProps => { + return reactive({ + total: 0, + current: 1, + pageSize: 18, + showTotal: true, + showPageSize: true, + pageSizeOptions: [12, 18, 36, 48, 96] + }); +}; + + +/** + * 创建行选择器 + */ +export const useRowSelection = (type = 'checkbox'): TableRowSelection => { + return { + type: type as any, + showCheckedAll: true, + onlyCurrent: true, + }; +}; diff --git a/orion-ops-ui/src/views/asset/host/components/host-card-list.vue b/orion-ops-ui/src/views/asset/host/components/host-card-list.vue index 549e5338..7c1a08a2 100644 --- a/orion-ops-ui/src/views/asset/host/components/host-card-list.vue +++ b/orion-ops-ui/src/views/asset/host/components/host-card-list.vue @@ -1,53 +1,73 @@