@modeltables/fontawesome-vuetify 2.8.0 → 3.0.0
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 +58 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,70 +1,77 @@
|
|
|
1
|
-
@modeltables/fontawesome-vuetify
|
|
1
|
+
@modeltables/fontawesome-vuetify
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Why use @modeltables/fontawesome-vuetify?
|
|
6
|
-
|
|
7
|
-
- Easy to use: helpful wrappers for headers, filters and table views so your grids look intentional from the start.
|
|
8
|
-
- Reactive by design: components update predictably with Vue reactivity as your data or form state changes.
|
|
9
|
-
- Lightweight: small surface area and minimal runtime overhead so your bundle stays lean.
|
|
10
|
-
- Customizable: swap icons, change sizes, or theme with your existing Vuetify setup without touching core logic.
|
|
11
|
-
- Accessibility-minded: uses clear affordances and aria-friendly patterns to improve form and table clarity.
|
|
12
|
-
|
|
13
|
-
Install
|
|
3
|
+
--Install
|
|
14
4
|
|
|
15
5
|
```bash
|
|
16
6
|
pnpm add @modeltables/fontawesome-vuetify
|
|
17
7
|
```
|
|
18
8
|
|
|
19
|
-
Quick start
|
|
9
|
+
--Quick start
|
|
20
10
|
|
|
21
|
-
|
|
11
|
+
1. Create Header and DataItem Model
|
|
22
12
|
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
```ts
|
|
14
|
+
import { HeaderModel } from "@modeltables/fontawesome-vuetify";
|
|
15
|
+
|
|
16
|
+
export const header: HeaderModel[] = [
|
|
17
|
+
{
|
|
18
|
+
title: 'Order Number'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
title: 'Price'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: 'Order Name'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
title: 'Order Description'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: 'PaymentDate'
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
export const header: ExampleModel[] = [
|
|
35
|
+
OrderNumber: number = 0;
|
|
36
|
+
Price?: number;
|
|
37
|
+
OrderName?: string;
|
|
38
|
+
OrderDescription?: string;
|
|
39
|
+
PaymentDate?: Date;
|
|
40
|
+
];
|
|
34
41
|
```
|
|
35
42
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
The package includes a small TypeScript models module (see `components/models/tablemodels.ts`) that the components use and that you can reuse in your services:
|
|
39
|
-
|
|
40
|
-
- HeaderModel — column metadata (title, key, sort).
|
|
41
|
-
- PaginatonModel — pagination state (PageCount, PerPage, CurrentPage, TotalCount).
|
|
42
|
-
- PaginatedResponse<T> — generic paged response with `Items: T[]`.
|
|
43
|
-
- Options — a simple option shape (`Key`, `ShowKey`, `Name`, `Active`).
|
|
44
|
-
|
|
45
|
-
Example TypeScript snippet
|
|
43
|
+
2. Import table component
|
|
46
44
|
|
|
47
45
|
```ts
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
<Table
|
|
47
|
+
v-if="dataItems.length"
|
|
48
|
+
:options="{
|
|
49
|
+
Key: 'OrderNumber',
|
|
50
|
+
Active: false,
|
|
51
|
+
ShowKey: true
|
|
52
|
+
}"
|
|
53
|
+
:dataheader="dataheader"
|
|
54
|
+
:showFilters="true"
|
|
55
|
+
:loading="loading"
|
|
56
|
+
:pagination="pagination"
|
|
57
|
+
v-bind:currentItem="currentItem"
|
|
58
|
+
:dataItems="dataItems"
|
|
59
|
+
:crud="false"
|
|
60
|
+
@load="load($event)"
|
|
61
|
+
@search="search($event)"
|
|
62
|
+
@rowClick="rowClick($event)">
|
|
63
|
+
```
|
|
51
64
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
CurrentPage: 1,
|
|
56
|
-
TotalCount: 25,
|
|
57
|
-
Items: []
|
|
58
|
-
}
|
|
65
|
+
--Documentation
|
|
66
|
+
|
|
67
|
+
You should probably import main component and make a quick look at model table in your database.
|
|
59
68
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
col.key = 'name'
|
|
63
|
-
```
|
|
69
|
+
Before populating table, think about right types and order of models.
|
|
70
|
+
Table should exsist with at least one virtual element at runtime with filter option enabled.
|
|
64
71
|
|
|
65
|
-
|
|
72
|
+
Default events for coordinated items are load and search with accompanying events for follow table data.
|
|
66
73
|
|
|
67
|
-
|
|
74
|
+
Loading is mandatory while data items are retreving with option to use crud operation and right tool.
|
|
68
75
|
|
|
69
76
|
License
|
|
70
77
|
|