fix: update scroll-x property to use dynamic calculation based on column size

This commit is contained in:
AN 2025-05-21 22:01:53 +08:00
parent 6bae05688e
commit 8c2a0b5886
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,4 @@
#set($scrollX = $columns.size() * 120 + 242)
<script setup lang="tsx">
import { NDivider } from 'naive-ui';
import { jsonClone } from '@sa/utils';
@ -207,7 +208,7 @@ function handleExport() {
size="small"
:indent="32"
:flex-height="!appStore.isMobile"
:scroll-x="962"
:scroll-x="$scrollX"
:loading="loading"
remote
:row-key="row => row.#foreach($column in $columns)#if($column.isPk == '1')$column.javaField#end#end"

View File

@ -1,3 +1,4 @@
#set($scrollX = $columns.size() * 120 + 242)
<script setup lang="tsx">
import { NDivider } from 'naive-ui';
import { fetchBatchDelete${BusinessName}, fetchGet${BusinessName}List } from '@/service/api/${moduleName}/${businessName}';
@ -170,7 +171,7 @@ function handleExport() {
:data="data"
size="small"
:flex-height="!appStore.isMobile"
:scroll-x="962"
:scroll-x="$scrollX"
:loading="loading"
remote
:row-key="row => row.#foreach($column in $columns)#if($column.isPk == '1')$column.javaField#end#end"