It is not only a fully functional graph visualization library, but also an explorer of data relationships.
!!!###!!!title=Vue-VTable——VisActor/VTable tutorial documents!!!###!!!!!!###!!!description=The `@visactor/vue-vtable` package is a Vue wrapper designed to facilitate the use of VTable in a Vue 3.x environment. This component mainly encapsulates the VTable table into a Vue component, and the related configuration items are consistent with VTable.!!!###!!!
Vue-VTable
The @visactor/vue-vtable package is a Vue wrapper designed to facilitate the use of VTable in a Vue 3.x environment. This component mainly encapsulates the VTable table into a Vue component, and the related configuration items are consistent with VTable.
Quick Start
Environment Requirements
Ensure that node, npm, and Vue are installed in your environment, and meet the following version requirements:
node 10.12.0+
npm 6.4.0+
vue 3.2+
Installation
Install using a package manager
Import Vue-VTable
It is recommended to use the npm package import
Draw a Simple List
You can use the ListTable component imported through @visactor/vue-vtable just like using a standard Vue component.
Here is a simple list example code (refer to demo):
Usage
Vue-VTable provides two styles of components for developers to use: unified tags and grammatical tags.
Unified Tags
Unified tags refer to using a single Table tag that accepts a complete option configuration. If VTable is already used in the project, this method can quickly use Vue-VTable. The example above is a demo using unified tags.
Similar to VTable, Vue-VTable provides three types of tables:
ListTable: List table, used to display list data demo
PivotTable: Pivot table, used to display cross-pivot data demo
PivotChart: Pivot chart, used to display cross-pivot data in a chart format demo
The props definitions for these three Vue components are as follows:
Refer to the event binding section for the definition of EventsProps.
The unified tags of Vue-VTable are almost equivalent to the functions of VTable, allowing developers to easily migrate to the Vue version. Options obtained from the community or example center can be directly used in this way, with almost no additional learning cost for developers.
Grammatical Tags
Grammatical tags refer to Vue-VTable encapsulating some components in the table as Vue components and exporting them to developers. Developers can define tables in a more semantic and native Vue declarative way. It should be noted that the definition content of grammatical tags can be converted with the table description option in most scenarios.
It should be noted that although the chart is declared in the form of a Vue component, it is not rendered as a DOM in the actual implementation. Therefore, if you use the inspect element, you cannot see the DOM corresponding to each chart component.
ListTable
The props attributes accepted by ListTable are consistent with the option. The subcomponents in ListTable are as follows:
ListColumn: List column, consistent with the definition of columns in the option api
Of course, you can also make full use of Vue's syntactic sugar to make the code more concise and readable.
In VTable, components such as charts and editors need to be registered through the register method to be used normally; in React-VTable, the corresponding register method is exposed and can be used directly.
Custom Components
To facilitate Vue developers in quickly implementing custom cell content, Vue-VTable provides the capability to encapsulate components and use them within cells.