v-code-diff 1.1.0 → 1.3.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 +9 -5
- package/dist/v2/index.cjs.js +16 -9
- package/dist/v2/index.es.js +1983 -1288
- package/dist/v2.7/index.cjs.js +16 -9
- package/dist/v2.7/index.es.js +2052 -1377
- package/dist/v3/index.cjs.js +16 -9
- package/dist/v3/index.es.js +1998 -1311
- package/package.json +5 -1
- package/scripts/postinstall.js +2 -2
- package/src/CodeDiff.vue +13 -2
- package/src/split/SplitLine.vue +2 -2
- package/src/style.scss +36 -0
- package/src/types.ts +13 -2
- package/src/unified/UnifiedLine.vue +3 -3
- package/src/utils.ts +94 -46
package/README.md
CHANGED
|
@@ -107,11 +107,13 @@ Not recommended, but the relevant capabilities are retained to facilitate migrat
|
|
|
107
107
|
| 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 |
|
|
108
108
|
| oldString | Old string | string | - | - |
|
|
109
109
|
| newString | New string | string | - | - |
|
|
110
|
-
| context | The number of lines to separate different parts so that they are not hidden | number | - |
|
|
110
|
+
| context | The number of lines to separate different parts so that they are not hidden | number | - | 10 |
|
|
111
111
|
| outputFormat | Display mode | string | line-by-line,side-by-side | line-by-line |
|
|
112
112
|
| diffStyle | Difference style, word-level differences or letter-level differences | string | word, char | word |
|
|
113
113
|
| trim | Remove blank characters at the beginning and end of the string | boolean | - | false |
|
|
114
114
|
| noDiffLineFeed | Don't diff Windows line feed (CRLF) and Linux line feed (LF) | boolean | - | false |
|
|
115
|
+
| maxHeight | Maximum height of component, for example: 300px | string | - | undefined |
|
|
116
|
+
| filename | Filename | string | - | undefined |
|
|
115
117
|
|
|
116
118
|
## Extend languages
|
|
117
119
|
|
|
@@ -155,9 +157,10 @@ Key points:
|
|
|
155
157
|
* In the 1.x version, due to the fact that rendering and highlighting are performed at the same time, the component
|
|
156
158
|
events
|
|
157
159
|
have been removed.
|
|
158
|
-
* In the 1.x version, the following component properties (Prop) have been
|
|
159
|
-
* highlight
|
|
160
|
-
* drawFileList
|
|
160
|
+
* In the 1.x version, the following component properties (Prop) have been changed:
|
|
161
|
+
* highlight - removed
|
|
162
|
+
* drawFileList - removed
|
|
163
|
+
* fileName - rename to "filename"
|
|
161
164
|
|
|
162
165
|
Below is a detailed comparison of the two versions, you can refer to it to complete the migration.
|
|
163
166
|
|
|
@@ -193,7 +196,8 @@ simultaneously.
|
|
|
193
196
|
|
|
194
197
|
### 1.0.0-alpha.0
|
|
195
198
|
|
|
196
|
-
1. Remove the diff2html dependency and draw the UI by self. By getting rid of the diff2html dependency, many styling
|
|
199
|
+
1. Remove the diff2html dependency and draw the UI by self. By getting rid of the diff2html dependency, many styling
|
|
200
|
+
problems have been resolved.
|
|
197
201
|
2. More accurate syntax highlighting and faster highlighting speed.
|
|
198
202
|
|
|
199
203
|
### 0.3.12
|