diff --git a/README.md b/README.md index 59aa593..0acbc66 100644 --- a/README.md +++ b/README.md @@ -160,12 +160,16 @@ import 'vue-json-viewer/style.css' | `expanded` | Default expand the view | `false` | | `timeformat` | custom time format function | time => time.toLocaleString() | | `preview-mode` | no expand mode | `false` | +| `show-array-index` | array show index | `true` | +| `show-double-quotes` | show double quotes | `false` | + ## Listeners | Listener | Description | Value | | ----------- |:------------- | ----------- | | `copied` | Emits copyEvent after text copied | Clipboard success event | +| `keyclick` | click key event | | ## Slots @@ -173,6 +177,11 @@ import 'vue-json-viewer/style.css' | ----------- |:------------- | ----------- | | `copy` | Custom content for copy button | `{copied: boolean}` | +## shortcut keys +| Name | Description | Scope | +| ----------- |:------------- | ----------- | +| `alt` + click | expand all node | | + ## Theming To create custom theme, (e.g. `my-awesome-json-theme`), in two easy steps: diff --git a/README_CN.md b/README_CN.md index 48811bf..9244dc3 100644 --- a/README_CN.md +++ b/README_CN.md @@ -154,6 +154,27 @@ import 'vue-json-viewer/style.css' | `expanded` | 默认展开视图 | `false` | | `timeformat` | 自定义时间格式函数 | time => time.toLocaleString() | | `preview-mode` | 不可折叠模式,默认全部展开 | `false` | +| `show-array-index` | 是否显示数组索引 | `true` | +| `show-double-quotes` | 展示key双引号 | `false` | + + +## 事件 + +| 事件 | 描述 | 值 | +| ----------- |:------------- | ----------- | +| `copied` | 复制文本后的事件 | | +| `keyclick` | 点击key的事件 | | + +## Slots + +| 名称 | 描述 | Scope | +| ----------- |:------------- | ----------- | +| `copy` | 自定义拷贝按钮 | `{copied: boolean}` | + +## 快捷键 +| 名称 | 描述 | +| ----------- |:------------- | +| `alt` + click | 展开当前节点下的所有节点 | ## 主题 diff --git a/example/App.vue b/example/App.vue index 95bbf37..3f407cd 100644 --- a/example/App.vue +++ b/example/App.vue @@ -13,6 +13,9 @@ boxed :timeformat="(time) => new Date(time)" sort + show-double-quotes + :show-array-index="false" + :onKeyclick="onKeyclick" >