v-code-diff icon indicating copy to clipboard operation
v-code-diff copied to clipboard

能否增加一个点击跳到下一处不同功能呢

Open specialYmx opened this issue 1 year ago • 2 comments

大佬,能否增加一个点击跳到下一处不同功能呢,或者我自己实现有啥思路么,操作对比结果里面的dom方面吗

specialYmx avatar Jan 08 '24 05:01 specialYmx

大佬,能否增加一个点击跳到下一处不同功能呢,或者我自己实现有啥思路么,操作对比结果里面的dom方面吗

有点重啊感觉,一般这种就是像 codemirror 之类的组件,内部实现搜索功能来代替浏览器的搜索。 我其实也还没看过类似的实现逻辑,但是我记得 codemirror、monaco-editor 之类的编辑器是有这个功能的

Shimada666 avatar Jan 08 '24 06:01 Shimada666

This would be a very useful feature. It will greatly improve the user experience by eliminating the need to scroll through each difference.

QusaiSabri avatar Apr 02 '24 14:04 QusaiSabri

I have just created a Pull Request to add this feature in.

I use this amazing library in my project and found the need to have a Next & Previous buttons to quickly jump to the next change specially on large files.

QusaiSabri avatar Apr 29 '24 16:04 QusaiSabri

Thanks @QusaiSabri https://github.com/Shimada666/v-code-diff/tree/v1.12.0 add this feature @specialYmx

09473ZH avatar May 05 '24 13:05 09473ZH