vue-json-pretty
Advanced tools
Comparing version
{ | ||
"name": "vue-json-pretty", | ||
"version": "1.6.7", | ||
"version": "1.7.0-rc.0", | ||
"description": "A JSON tree view component that is easy to use and also supports data selection.", | ||
"author": "leezng <im.leezng@gmail.com>", | ||
"main": "vue-json-pretty.js", | ||
"main": "lib/vue-json-pretty.js", | ||
"scripts": { | ||
"dev": "node build/dev-server.js", | ||
"build": "node build/build.js", | ||
"dist": "cross-env DIST_ENV=true node build/build.js", | ||
"build:example": "cross-env EXAMPLE_ENV=true node build/build.js", | ||
"e2e": "node test/e2e/runner.js", | ||
@@ -83,5 +83,8 @@ "test": "npm run e2e", | ||
"last 5 versions", | ||
"not ie <= 10" | ||
"not ie <= 11" | ||
], | ||
"files": [ | ||
"lib" | ||
], | ||
"dependencies": {} | ||
} |
@@ -21,4 +21,4 @@ # vue-json-pretty | ||
```js | ||
npm install vue-json-pretty | ||
```bash | ||
npm install vue-json-pretty --save | ||
``` | ||
@@ -28,3 +28,5 @@ | ||
```html | ||
The CSS file is included separately and needs to be imported manually. You can either import CSS globally in your app (if supported by your framework) or directly from the component. | ||
```vue | ||
<template> | ||
@@ -40,6 +42,6 @@ <div> | ||
</template> | ||
``` | ||
```js | ||
<script> | ||
import VueJsonPretty from 'vue-json-pretty' | ||
import 'vue-json-pretty/styles.css'; | ||
@@ -51,4 +53,27 @@ export default { | ||
} | ||
</script> | ||
``` | ||
## Nuxt.js | ||
1. In `plugins/vue-json-pretty.js` | ||
``` | ||
import Vue from 'vue' | ||
import VueJsonPretty from 'vue-json-pretty' | ||
Vue.component("vue-json-pretty", VueJsonPretty); | ||
``` | ||
2. In `nuxt.config.js` | ||
```js | ||
css: [ | ||
'vue-json-pretty/styles.css' | ||
], | ||
plugins: [ | ||
'@/plugins/vue-json-pretty' | ||
], | ||
``` | ||
## Props | ||
@@ -75,2 +100,3 @@ | ||
| highlightSelectedNode | higher | highlight current node when selected | boolean | true | | ||
| collapsedOnClickBrackets | higher | collapsed control | boolean | true | | ||
| customValueFormatter | higher | a function that can return different html or strings to display for values in the data. | Function(data, key, parent, defaultFormatted) | - | | ||
@@ -84,1 +110,6 @@ | ||
| change | triggered when the selected value changed (only the selectableType not null) | (newVal, oldVal) | | ||
## Major Contributors | ||
[](https://github.com/rchl) | ||
[](https://github.com/blackmad) |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
40126
11.48%6
100%110
39.24%1
-50%1
Infinity%0
-100%