v-code-diff 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -18
- package/dist/v2/index.cjs.js +14 -14
- package/dist/v2/index.es.js +742 -736
- package/dist/v2/index.umd.js +14 -14
- package/dist/v2.7/index.cjs.js +10 -10
- package/dist/v2.7/index.es.js +599 -598
- package/dist/v2.7/index.umd.js +10 -10
- package/dist/v3/index.cjs.js +14 -14
- package/dist/v3/index.es.js +809 -808
- package/dist/v3/index.umd.js +13 -13
- package/package.json +3 -2
- package/src/CodeDiff.vue +4 -2
- package/src/utils.ts +6 -4
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ then
|
|
|
101
101
|
### Vue2
|
|
102
102
|
|
|
103
103
|
#### Register locally
|
|
104
|
-
>
|
|
104
|
+
> Recommend using local registration for better tree-shaking support.
|
|
105
105
|
```vue
|
|
106
106
|
<script>
|
|
107
107
|
import { CodeDiff } from 'v-code-diff'
|
|
@@ -140,23 +140,24 @@ Vue.use(CodeDiff)
|
|
|
140
140
|
|
|
141
141
|
## Props
|
|
142
142
|
|
|
143
|
-
| Prop
|
|
144
|
-
|
|
145
|
-
| language
|
|
146
|
-
| oldString
|
|
147
|
-
| newString
|
|
148
|
-
| context
|
|
149
|
-
| outputFormat
|
|
150
|
-
| diffStyle
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
143
|
+
| Prop | Description | Type | Optional Values | Default Value |
|
|
144
|
+
|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|---------------------------|---------------|
|
|
145
|
+
| language | Code language, such as typescript, defaults to plain text. [View all supported languages](https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md) | string | - | plaintext |
|
|
146
|
+
| oldString | Old string | string | - | - |
|
|
147
|
+
| newString | New string | string | - | - |
|
|
148
|
+
| context | The number of lines to separate different parts so that they are not hidden | number | - | 10 |
|
|
149
|
+
| outputFormat | Display mode | string | line-by-line,side-by-side | line-by-line |
|
|
150
|
+
| diffStyle | Difference style, word-level differences or letter-level differences | string | word, char | word |
|
|
151
|
+
|forceInlineComparison| Force inline comparison (word or char level) | boolean | - | false |
|
|
152
|
+
| trim | Remove blank characters at the beginning and end of the string | boolean | - | false |
|
|
153
|
+
| noDiffLineFeed | Don't diff Windows line feed (CRLF) and Linux line feed (LF) | boolean | - | false |
|
|
154
|
+
| maxHeight | Maximum height of component, for example: 300px | string | - | undefined |
|
|
155
|
+
| filename | Filename | string | - | undefined |
|
|
156
|
+
| newFilename | New filename | string | - | undefined |
|
|
157
|
+
| hideHeader | Hide header bar | boolean | - | false |
|
|
158
|
+
| hideStat | Hide statistical part in the header bar | boolean | - | false |
|
|
159
|
+
| theme | Add dark mode | ThemeType | light , dark | light |
|
|
160
|
+
| ignoreMatchingLines | Give a pattern to ignore matching lines eg: '(time\|token)' | string | - | undefined |
|
|
160
161
|
|
|
161
162
|
## Events
|
|
162
163
|
|