Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 pinia 状态做为表格 data 数据项 实现大数据量 渲染问题 #2783

Open
Yolo-00 opened this issue Feb 19, 2025 · 4 comments

Comments

@Yolo-00
Copy link

Yolo-00 commented Feb 19, 2025

问题描述:

const list = ref([10000])

<vxe-table :data="list"></vxe-table>

//  app > defineStore
export const useAppStore = defineStore('app', () => {
    const list = ref([10000])
    return {list}
})


// vue
cosnt appStore = useAppStore();

<vxe-table :data="appStore.list"></vxe-table>

在同一表格配置下使用 ref 可以正常执行, 使用 pinia 下的 ref 就会导致页面卡死

@kamiponcloud
Copy link

你是不是没有开启虚拟滚动,https://vxetable.cn/#/component/table/scroll/vertical

@Yolo-00
Copy link
Author

Yolo-00 commented Feb 19, 2025

你是不是没有开启虚拟滚动,https://vxetable.cn/#/component/table/scroll/vertical

都已经配置了

<vxe-table :style="{ width: `${width}px` }" align="center" border :height="`${height}`"
                        :scroll-x="{ enabled: true, gt: 0 }" :scroll-y="{ enabled: true, gt: 0 }"
                        :data="appStore.list">

@kamiponcloud
Copy link

可以提供下你的vue,vxe-table和vxe-pc-ui的版本号吗?

@Yolo-00
Copy link
Author

Yolo-00 commented Feb 22, 2025

可以提供下你的vue,vxe-table和vxe-pc-ui的版本号吗?

"vue": "^3.4.21"
"pinia": "^2.3.0",
"vxe-table": "^4.11.1"
未使用 vxe-pc-ui

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants