Skip to content

Commit

Permalink
fix(projects): fix table x-scroll. fixed #324
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Feb 23, 2024
1 parent 0a3efe3 commit c7e2c55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/views/manage/menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import MenuOperateDrawer, { type OperateType } from './modules/menu-operate-draw
const appStore = useAppStore();
const { bool: drawerVisible, setTrue: openDrawer } = useBoolean();
const wrapperRef = ref<HTMLElement | null>(null);
const { columns, filteredColumns, data, loading, pagination, getData } = useTable<
Api.SystemManage.Menu,
typeof fetchGetMenuList,
Expand Down Expand Up @@ -224,7 +226,7 @@ async function handleDelete(id: number) {
</script>

<template>
<div class="flex-vertical-stretch gap-16px overflow-hidden <sm:overflow-auto">
<div ref="wrapperRef" class="flex-vertical-stretch gap-16px overflow-hidden <sm:overflow-auto">
<NCard :title="$t('page.manage.menu.title')" :bordered="false" size="small" class="card-wrapper sm:flex-1-hidden">
<template #header-extra>
<TableHeaderOperation
Expand All @@ -242,7 +244,7 @@ async function handleDelete(id: number) {
:data="data"
size="small"
:flex-height="!appStore.isMobile"
:scroll-x="640"
:scroll-x="1088"
:loading="loading"
:pagination="pagination"
:row-key="item => item.id"
Expand Down
2 changes: 1 addition & 1 deletion src/views/manage/role/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function getIndex(index: number) {
:data="data"
size="small"
:flex-height="!appStore.isMobile"
:scroll-x="640"
:scroll-x="702"
:loading="loading"
:pagination="pagination"
:row-key="item => item.id"
Expand Down
2 changes: 1 addition & 1 deletion src/views/manage/user/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function getIndex(index: number) {
:data="data"
size="small"
:flex-height="!appStore.isMobile"
:scroll-x="640"
:scroll-x="962"
:loading="loading"
:pagination="pagination"
:row-key="item => item.id"
Expand Down

0 comments on commit c7e2c55

Please sign in to comment.