Skip to content

Commit

Permalink
fix(DataGrid): 修复列数据为空时报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderTongxin committed Apr 11, 2024
1 parent ce15306 commit f75c3d8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export function useDataGrid(props: DataGridProps, ctx: SetupContext) {
scrollRef.value?.addEventListener('scroll', onScroll);
if (typeof window !== 'undefined' && scrollRef.value) {
resizeObserver = new ResizeObserver(() => {
if (scrollRef.value) {
if (scrollRef.value && sliceColumns.value.length) {
let distance = 0;
initOriginColumnData();
distance = scrollRef.value!.scrollLeft;
Expand Down

0 comments on commit f75c3d8

Please sign in to comment.