diff --git a/README.md b/README.md
index 886de1a..ff05db2 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,11 @@ export default {
| new-string| 新的字符串| string | — | — |
| context| 不同地方上下间隔多少行不隐藏 | number | — | — |
| outputFormat| 展示的方式 | string | line-by-line,side-by-side | line-by-line |
+| drawFileList | 展示对比文件列表 | boolean | - | false |
+| renderNothingWhenEmpty | 当无对比时不渲染 | boolean | - | false |
+| diffStyle | 每行中对比差异级别 | string | word, char | word |
+| fileName | 文件名 | string | - | |
+| isShowNoChange | 当无对比时展示源代码 | boolean | - | false |
## 效果展示
diff --git a/package.json b/package.json
index 428ac6d..2605681 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
},
"dependencies": {
"diff": "^3.5.0",
- "diff2html": "^2.3.3",
+ "diff2html": "^3.1.8",
"highlight.js": "^9.12.0",
"vue": "^2.5.2"
},
diff --git a/src/App.vue b/src/App.vue
index cbde529..069d5a7 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -44,6 +44,31 @@
清除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{diffStyle}}
+
+
+
+
+
+
+
@@ -67,7 +97,12 @@ export default {
oldStr: '',
newStr: '',
fotmat: false,
- context: 10
+ context: 10,
+ diffStyle: 'word',
+ fileName: '',
+ isShowNoChange: true,
+ drawFileList: true,
+ renderNothingWhenEmpty: false
}
},
computed: {
diff --git a/src/lib/code-diff/index.vue b/src/lib/code-diff/index.vue
index 67cc509..9e8fd62 100644
--- a/src/lib/code-diff/index.vue
+++ b/src/lib/code-diff/index.vue
@@ -6,10 +6,10 @@