3 |
4 |
5 |
61 |
--------------------------------------------------------------------------------
/dist/utils.d.ts:
--------------------------------------------------------------------------------
1 | import type { Ref } from 'vue';
2 | import type { Diffs, Lines, Mode } from './types';
3 | declare const MODIFIED_START_TAG = "
26 |
48 | 60 | inputDelay and virtualScroll option are set for large text diff. 61 |
62 |
26 |
27 | You can see the difference between the two codes with the `vue-diff` plugin.
28 | This plugin dependent on diff-match-patch and highlight.js, shows similar results to other diff viewers (e.g., Github Desktop).
29 | Here is the demo
30 |
31 | ## Features
32 |
33 | - Support split / unified mode
34 | - Support multiple languages and can be extended
35 | - Support two themes (dark / light) and can be customized
36 | - Virtual scroll for large text comparison
37 | - Folding view (_Partial folding is not supported_)
38 | - Support typescript
39 |
40 | ## Install plugin
41 |
42 | ```bash
43 | npm install vue-diff
44 | ```
45 |
46 | And install plugin in vue application
47 |
48 | ```ts
49 | import VueDiff from 'vue-diff';
50 |
51 | import 'vue-diff/dist/index.css';
52 |
53 | app.use(VueDiff);
54 | ```
55 |
56 | ### Options
57 |
58 | ```ts
59 | app.use(VueDiff, {
60 | componentName: 'VueDiff',
61 | });
62 | ```
63 |
64 | | name | type | detault | description |
65 | | ------------- | -------- | ------- | -------------------------- |
66 | | componentName | `string` | `Diff` | Global diff component name |
67 |
68 | ## Usage diff viewer
69 |
70 | Insert the diff component with props.
71 |
72 | ### Settings with default props
73 |
74 | ```vue
75 |
76 |
79 | a)D+=2;else if(Z>o)A+=2;else if(!w){var C=f+_-U;if(C>=0&&C