diff --git a/README.md b/README.md index 59aa593..a97e290 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,8 @@ 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` | + ## Listeners @@ -173,6 +175,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..68e1f64 100644 --- a/README_CN.md +++ b/README_CN.md @@ -154,6 +154,25 @@ import 'vue-json-viewer/style.css' | `expanded` | 默认展开视图 | `false` | | `timeformat` | 自定义时间格式函数 | time => time.toLocaleString() | | `preview-mode` | 不可折叠模式,默认全部展开 | `false` | +| `show-array-index` | 是否显示数组索引 | `true` | + + +## 事件 + +| 事件 | 描述 | 值 | +| ----------- |:------------- | ----------- | +| `copied` | 复制文本后的事件 | | + +## Slots + +| 名称 | 描述 | Scope | +| ----------- |:------------- | ----------- | +| `copy` | 自定义拷贝按钮 | `{copied: boolean}` | + +## 快捷键 +| 名称 | 描述 | +| ----------- |:------------- | +| `alt` + click | 展开当前节点下的所有节点 | ## 主题 diff --git a/example/app.js b/example/app.js index 5500ea1..4409a71 100644 --- a/example/app.js +++ b/example/app.js @@ -40,6 +40,7 @@ new Vue({ align: 'left' }} boxed + show-array-index={false} timeformat={time => new Date(time)} sort>