You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 10, 2025. It is now read-only.
@@ -85,6 +106,8 @@ Insert the diff component with props.
85
106
| language | `string` | `plaintext` | | See <ahref="#extend-languages">Extend languages</a>
86
107
| prev |`string`|`''`|| Prev code |
87
108
| current |`string`|`''`|| Current Code |
109
+
| inputDelay |`number`|`0`|| Setting up rendering debounce for changes for performance benefit (mode, prev, curr) |
110
+
| virtualScroll |`boolean\|object`|`false`||*Default value when setting true :*<br>`{ height: 500, lineMinHeight: 24, delay: 100 }`<br>See <ahref="#virtual-scroll">virtual scroll</a> |
88
111
89
112
## Custom theme
90
113
@@ -149,6 +172,17 @@ app.use(VueDiff)
149
172
150
173
> <ahref="https://github.com/highlightjs/highlight.js/blob/master/SUPPORTED_LANGUAGES.md">Check supported languages of Highlight.js</a>
151
174
152
-
## Large text comparison
175
+
## Virtual scroll
176
+
177
+
Comparing text from many lines can slow down performance.<br>
178
+
With virtualScroll props, virtualScroll applies. (Self-made for this plug-in.)
179
+
180
+
#### Object property value
181
+
182
+
When using virtual scroll, the css of all code lines is changed to the absolute position, which requires detailed settings.
153
183
154
-
⚠️ It's still hard to compare large texts. Virtual scroll for Vue3 must be created or found.
184
+
* height (`number`): Diff box height (Applies only to px values)
185
+
* lineMinHeight (`number`): minimum height of line
186
+
> Minimum height value of line is required for visible area calculation.<br>The default is 24, but you can set it yourself if you need to adjust it according to the page's front-size, line-height, etc.
187
+
* delay (`number`): re-rendering delay when scrolling or resizing
188
+
> Performance problems occur when too often a re-rendering function is invoked based on scrolling or resizing<br>This setting applies a delay using throttle.
0 commit comments