vi-grid-builder 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -2
- package/package.json +1 -1
- package/src/fields/ViGridBadge.scss +3 -0
- package/src/fields/ViGridBadge.vue +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
|
|
2
2
|
# Grid builder plugin for Vue 3
|
|
3
3
|
|
|
4
|
+
The grid builder component dynamically generates tables based on the provided `rows` data and a JSON `columns` configuration.
|
|
5
|
+
|
|
6
|
+
## Key Features
|
|
7
|
+
|
|
8
|
+
### 1. Column Types
|
|
9
|
+
- **Predefined Types**:
|
|
10
|
+
- `text`: Displays plain text.
|
|
11
|
+
- `image`: Renders an image.
|
|
12
|
+
- `link`: Displays hyperlinks (with customizable text and URL behavior).
|
|
13
|
+
- `badge`: Displays styled labels or badges.
|
|
14
|
+
- `date`: Formats and displays dates.
|
|
15
|
+
- `actions`: Includes buttons or action elements.
|
|
16
|
+
- **Custom Types**:
|
|
17
|
+
- Register custom field types for unique cell content rendering.
|
|
18
|
+
|
|
19
|
+
### 2. Data Handling
|
|
20
|
+
- Accepts data in the `rows` prop to populate the table.
|
|
21
|
+
- Supports cell-level customization for data formatting.
|
|
22
|
+
|
|
23
|
+
### 3. Pagination
|
|
24
|
+
- Built-in pagination for handling large datasets.
|
|
25
|
+
- Configurable to match specific requirements (e.g., rows per page).
|
|
26
|
+
|
|
27
|
+
### 4. Customizable Styles
|
|
28
|
+
- Provides options to style the table (e.g., striped rows, borders).
|
|
29
|
+
- Supports global configs and per-instance overrides.
|
|
30
|
+
|
|
4
31
|
|
|
5
32
|
## Installation
|
|
6
33
|
|
|
@@ -18,6 +45,15 @@ import App from './App.vue'
|
|
|
18
45
|
const app = createApp(App).use(ViGridBuilder)
|
|
19
46
|
```
|
|
20
47
|
|
|
48
|
+
## Examples
|
|
49
|
+
If you want to see usage examples download the project and run
|
|
50
|
+
```sh
|
|
51
|
+
cd playgorund
|
|
52
|
+
```
|
|
53
|
+
```sh
|
|
54
|
+
npm run dev
|
|
55
|
+
```
|
|
56
|
+
|
|
21
57
|
## Table options
|
|
22
58
|
|
|
23
59
|
| option | type | description | default value |
|
|
@@ -63,7 +99,7 @@ const app = createApp(App).use(ViGridBuilder)
|
|
|
63
99
|
| align | centre, left, right | How to align the content in the cells for this column | / |
|
|
64
100
|
| sort | Function | Compare function for sorting data in this column | / |
|
|
65
101
|
|
|
66
|
-
|
|
102
|
+
## Aditional columsn options for sepcific fields
|
|
67
103
|
|
|
68
104
|
field type| option | type | description | default value |
|
|
69
105
|
|------------|------------|-----------------------------|--------------------------------------------------------|---------------|
|
|
@@ -75,7 +111,7 @@ field type| option | type | description
|
|
|
75
111
|
|
|
76
112
|
|
|
77
113
|
|
|
78
|
-
|
|
114
|
+
## Example config for columns
|
|
79
115
|
|
|
80
116
|
```js
|
|
81
117
|
columns: [
|
package/package.json
CHANGED