diff --git a/admin/src/assets/style/custom.less b/admin/src/assets/style/custom.less index 2658c9e3d..e9338d808 100644 --- a/admin/src/assets/style/custom.less +++ b/admin/src/assets/style/custom.less @@ -1,5 +1,7 @@ .container { - padding: 10px; + /* padding: 10px; */ + margin: 10px; + background-color: var(--color-bg-1); .container-header { display: flex; @@ -17,6 +19,21 @@ .container-main { padding: 10px; overflow: auto; - background-color: var(--color-bg-1); + + &::-webkit-scrollbar-track-piece { + background: var(--color-neutral-3); + } + + &::-webkit-scrollbar { + width: 6px; + } + + &::-webkit-scrollbar-thumb { + background: var(--color-neutral-4); + + /* border-radius: 20px; */ + } + + /* background-color: var(--color-bg-1); */ } } \ No newline at end of file diff --git a/admin/src/auto-imports.d.ts b/admin/src/auto-imports.d.ts index db19b7704..89fb0e3a4 100644 --- a/admin/src/auto-imports.d.ts +++ b/admin/src/auto-imports.d.ts @@ -39,7 +39,7 @@ declare global { const getUserInfo: typeof import('./api/user')['getUserInfo'] const h: typeof import('vue')['h'] const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] - const index: typeof import('./store/modules/tab-bar/index')['default'] + const index: typeof import('./store/modules/user/index')['default'] const inject: typeof import('vue')['inject'] const isAnyBlank: typeof import('./composables/index')['isAnyBlank'] const isBlank: typeof import('./composables/index')['isBlank'] @@ -342,7 +342,7 @@ declare module 'vue' { readonly getUserInfo: UnwrapRef readonly h: UnwrapRef readonly ignorableWatch: UnwrapRef - readonly index: UnwrapRef + readonly index: UnwrapRef readonly inject: UnwrapRef readonly isAnyBlank: UnwrapRef readonly isBlank: UnwrapRef @@ -638,7 +638,7 @@ declare module '@vue/runtime-core' { readonly getUserInfo: UnwrapRef readonly h: UnwrapRef readonly ignorableWatch: UnwrapRef - readonly index: UnwrapRef + readonly index: UnwrapRef readonly inject: UnwrapRef readonly isAnyBlank: UnwrapRef readonly isBlank: UnwrapRef diff --git a/admin/src/composables/index.ts b/admin/src/composables/index.ts index 89ca5a5cd..1973d1d5c 100644 --- a/admin/src/composables/index.ts +++ b/admin/src/composables/index.ts @@ -81,6 +81,8 @@ export function useTableHeight() { proxy.$el.getElementsByClassName('container-header')[0]; const containerMainRef = proxy.$el.getElementsByClassName('container-main')[0]; + const containerFooterRef = + proxy.$el.getElementsByClassName('container-footer')[0]; if (!containerMainRef) { return; @@ -94,6 +96,10 @@ export function useTableHeight() { if (containerHeaderRef) { height -= containerHeaderRef.clientHeight; } + if (containerFooterRef) { + height -= containerFooterRef.clientHeight; + } + // height -= 32; containerMainRef.style.height = `${Math.max(height, minHeight)}px`; } diff --git a/admin/src/views/pages/topic/index.vue b/admin/src/views/pages/topic/index.vue index ec1ccff04..82010a883 100644 --- a/admin/src/views/pages/topic/index.vue +++ b/admin/src/views/pages/topic/index.vue @@ -43,23 +43,24 @@
-
+
-
- -
+
@@ -93,6 +94,10 @@ }; }); + onMounted(() => { + useTableHeight(); + }); + const list = async () => { loading.value = true; try { @@ -121,8 +126,9 @@