diff --git a/History.md b/History.md new file mode 100644 index 0000000..f2d408e --- /dev/null +++ b/History.md @@ -0,0 +1,3 @@ +## 2.2.13 2020-07-14 + +- Add timeformat props to support custom time format [pr](https://github.com/chenfengjw163/vue-json-viewer/pull/48) \ No newline at end of file diff --git a/README.md b/README.md index 87b5cda..b6c02c5 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ import 'vue-json-viewer/style.css' | `boxed` | Add a fancy "boxed" style to component | `false` | | `theme` | Add a custom CSS class for theming purposes | `jv-light` | | `expanded` | Default expand the view | `false` | +| `timeformat` | custom time format function | time => time.toLocaleString() | ## Listeners diff --git a/README_CN.md b/README_CN.md index 6fbc4df..803b309 100644 --- a/README_CN.md +++ b/README_CN.md @@ -145,6 +145,8 @@ import 'vue-json-viewer/style.css' | `sort` | 按照key排序展示 | `false` | | `boxed` | 为组件添加一个盒样式 | `false` | | `theme` | 添加一个自定义的样式class用作主题 | `jv-light` | +| `expanded` | 默认展开视图 | `false` | +| `timeformat` | 自定义时间格式函数 | time => time.toLocaleString() | ## 主题 diff --git a/example/app.js b/example/app.js index 8aec4bb..4b53d83 100644 --- a/example/app.js +++ b/example/app.js @@ -27,6 +27,7 @@ new Vue({ copiedText: '复制成功' }} boxed + timeformat={time => new Date(time)} sort>