Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit b920da0

Browse files
committed
chore: modify props name
1 parent 8de583a commit b920da0

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Here is the <a href="https://hoiheart.github.io/vue-diff/demo/index.html" target
3535
* [x] Support split / unified mode
3636
* [x] Support multiple languages and can be extended
3737
* [X] Support two themes (dark / light) and can be customized
38-
* [X] Virtual scroll for large text comparison
38+
* [X] Virtual scroll for large text comparison (*Performance improvements are still needed.*)
3939
* [ ] Support IE11 (IE 11 support for Vue@3 is still pending)
4040

4141
## Install plugin
@@ -92,7 +92,7 @@ Insert the diff component with props.
9292
:prev="prev"
9393
:current="current"
9494
:input-delay="0"
95-
:virtual-scroll="{ height: 500, lineMinHeight: 24, scrollDelay: 250 }"
95+
:virtual-scroll="{ height: 500, lineMinHeight: 24, delay: 100 }"
9696
/>
9797
</template>
9898
```
@@ -107,7 +107,7 @@ Insert the diff component with props.
107107
| prev | `string` | `''` | | Prev code |
108108
| current | `string` | `''` | | Current Code |
109109
| 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, scrollDelay: 250 }`<br>See <a href="#virtual-scroll">virtual scroll</a> |
110+
| virtualScroll | `boolean\|object` | `false` | | *Default value when setting true :*<br>`{ height: 500, lineMinHeight: 24, delay: 100 }`<br>See <a href="#virtual-scroll">virtual scroll</a> |
111111

112112
## Custom theme
113113

@@ -184,5 +184,5 @@ When using virtual scroll, the css of all code lines is changed to the absolute
184184
* height (`number`): Diff box height (Applies only to px values)
185185
* lineMinHeight (`number`): minimum height of line
186186
> 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-
* scrollDelay (`number`): re-rendering delay when scrolling
188-
> Performance problems occur when too often a re-rendering function is invoked based on scrolling<br>This setting applies a delay using throttle.
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.

dev/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
:prev="prev"
4040
:current="current"
4141
:input-delay="0"
42-
:virtual-scroll="{ height: 500, lineMinHeight: 24, scrollDelay: 250 }"
42+
:virtual-scroll="{ height: 500, lineMinHeight: 24, delay: 100 }"
4343
/>
4444
</section>
4545
</div>
@@ -94,7 +94,7 @@ export default defineComponent({
9494
virtualScroll: {
9595
height: 500,
9696
lineMinHeight: 24,
97-
scrollDelay: 250
97+
delay: 100
9898
}
9999
}
100100
])

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"vue": "^3.0.7"
3636
},
3737
"dependencies": {
38-
"@vueuse/core": "^4.6.3",
38+
"@vueuse/core": "^4.7.0",
3939
"diff-match-patch": "^1.0.5",
4040
"highlight.js": "^10.5.0"
4141
},

0 commit comments

Comments
 (0)