Package Exports
- vue-object-view
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-object-view) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
vue-object-view
Vue.js component for displaying arbitrary JavaScript values (supporting circular references)
See the live demo to try it out. (demo app on github)
About
The main purpose of this component is to display complex JavaScript values that may contain circular references. The component renders the value as a tree that can be manually expanded to display nested values.
The experience is very similar to inspecting JavaScript objects using the browser developer tools. The component was created to build the in-browser JavaScript debugger for the PARAPPLE project.
Usage
# Install the component
npm install --save vue-object-view
Use it just like any other Vue.js component. The value to display is passed as v-model
or :value
:
<VueObjectView v-model="object" />
<VueObjectView :value="anotherObject" />
Properties
Property | Meaning | Default |
---|---|---|
nowrap |
Prevent word wrap (display the unexpanded value on a single line) | true |
expandButtonText |
Content of the expand button | '...' |
Styling
If you wish to change the visual appearance of the component, set the following CSS classes in your application stylesheet:
vue-object-view
- Main component elementvue-object-view-primitive
- Element wrapping primitive valuesvue-object-view-complex
- Element wrapping Objects and Arraysvue-object-view-open
- The open button (chevron right/down)vue-object-view-expand
- The expand button (...)