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

「TreeTable」开启懒加载后,通过 insertNextAt 对懒加载的数据插入新行会同时插入两行(_X_ROW_KEY 相同) #2320

Open
Clover-You opened this issue Feb 26, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@Clover-You
Copy link

可复现的链接:

https://github.com/Clover-You/vxe-table-bug-example

问题描述与截图:

以下两个位置为写入 children 相关数据相关操作源码。在调试时发现, 173 行写入后,188 行的 child 存在 173 写入的数据,导致在 188 行重复写入!猜测 children 和 child 地址可能相同,但是奇怪的是,当第二次插入新行时一切都恢复正常!!

image image

复现项目启动后访问:http://localhost:5173/two-rows-of-the-same-data-when-a-new-row-is-insertee-when-layz-enable

期望的结果:

No response

操作系统:

MacOS/Windows

浏览器版本:

Chrome 121.0.6167.139

vue 版本:

^3.4.19

vxe-table 版本:

4.5.20

@Clover-You Clover-You added the bug Something isn't working label Feb 26, 2024
@Clover-You
Copy link
Author

2024-02-26.5.05.04.mov

@headwww
Copy link

headwww commented Apr 27, 2024

我也遇到一样的情况

@YUAN-C-J
Copy link

YUAN-C-J commented May 6, 2024

我也遇到了,开启懒加载之后,第一次插入重复插入了一条,第二次就正常了,博主现在解决了吗?困扰我好久了,收到了麻烦回复一下,或者联系我微信:helloxy0

@Clover-You
Copy link
Author

我也遇到了,开启懒加载之后,第一次插入重复插入了一条,第二次就正常了,博主现在解决了吗?困扰我好久了,收到了麻烦回复一下,或者联系我微信:helloxy0

我提了个修复 PR 作者没合并。我把我修复后的版本上传到 npm 了,vxe-table-cfc。你下载后在 vite.config 添加别名映射就好,等正式版修复后再移除 cfc 版本转到正式版。注意在使用时应该引入 vxe-table 而不是 vxe-table-cfc

// vite.config.ts

export default () => {
  return defineConfig({
    resolve: {
      alias: {
        'vxe-table': 'vxe-table-cfc',
      },
    },
  })
})

@Clover-You
Copy link
Author

我也遇到了,开启懒加载之后,第一次插入重复插入了一条,第二次就正常了,博主现在解决了吗?困扰我好久了,收到了麻烦回复一下,或者联系我微信:helloxy0

我提了个修复 PR 作者没合并。我把我修复后的版本上传到 npm 了,vxe-table-cfc。你下载后在 vite.config 添加别名映射就好,等正式版修复后再移除 cfc 版本转到正式版。注意在使用时应该引入 vxe-table 而不是 vxe-table-cfc

// vite.config.ts

export default () => {
  return defineConfig({
    resolve: {
      alias: {
        'vxe-table': 'vxe-table-cfc',
      },
    },
  })
})

@headwww

@YUAN-C-J
Copy link

YUAN-C-J commented May 6, 2024

我也遇到了,开启懒加载之后,第一次插入重复插入了一条,第二次就正常了,博主现在解决了吗?困扰我好久了,收到了麻烦回复一下,或者联系我微信:helloxy0

我提了个修复 PR 作者没合并。我把我修复后的版本上传到 npm 了,vxe-table-cfc。你下载后在 vite.config 添加别名映射就好,等正式版修复后再移除 cfc 版本转到正式版。注意在使用时应该引入 vxe-table 而不是 vxe-table-cfc

// vite.config.ts

export default () => {
  return defineConfig({
    resolve: {
      alias: {
        'vxe-table': 'vxe-table-cfc',
      },
    },
  })
})

可以了,多谢多谢,对了你是直接改的源码吗,能看一下是咋改的吗?还有就是我应该用你的哪个版本呢?

@Clover-You
Copy link
Author

我也遇到了,开启懒加载之后,第一次插入重复插入了一条,第二次就正常了,博主现在解决了吗?困扰我好久了,收到了麻烦回复一下,或者联系我微信:helloxy0

我提了个修复 PR 作者没合并。我把我修复后的版本上传到 npm 了,vxe-table-cfc。你下载后在 vite.config 添加别名映射就好,等正式版修复后再移除 cfc 版本转到正式版。注意在使用时应该引入 vxe-table 而不是 vxe-table-cfc

// vite.config.ts

export default () => {
  return defineConfig({
    resolve: {
      alias: {
        'vxe-table': 'vxe-table-cfc',
      },
    },
  })
})

可以了,多谢多谢,对了你是直接改的源码吗,能看一下是咋改的吗?还有就是我应该用你的哪个版本呢?

#2321

@Clover-You
Copy link
Author

还有就是我应该用你的哪个版本呢?

用最新的就好

@YUAN-C-J
Copy link

YUAN-C-J commented May 6, 2024

还有就是我应该用你的哪个版本呢?

用最新的就好

兄弟,1个小时前可以用,但是刚刚又报错了
微信图片_20240506145849

@Clover-You
Copy link
Author

还有就是我应该用你的哪个版本呢?

用最新的就好

兄弟,1个小时前可以用,但是刚刚又报错了 微信图片_20240506145849

0c679c2a32ee1fc2000e1e593be3ff4d

@YUAN-C-J
Copy link

YUAN-C-J commented May 6, 2024

还有就是我应该用你的哪个版本呢?

用最新的就好

兄弟,1个小时前可以用,但是刚刚又报错了 微信图片_20240506145849

0c679c2a32ee1fc2000e1e593be3ff4d

加下微信单独聊吧,helloxy0

@YUAN-C-J
Copy link

YUAN-C-J commented May 6, 2024

还有就是我应该用你的哪个版本呢?

用最新的就好

兄弟,1个小时前可以用,但是刚刚又报错了 微信图片_20240506145849

0c679c2a32ee1fc2000e1e593be3ff4d

我用的是vue2 vxe-table3的版本,估计是版本问题

Clover-You added a commit to Clover-You/vxe-table that referenced this issue Jun 12, 2024
Clover-You added a commit to Clover-You/vxe-table that referenced this issue Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants