@hostlink/nuxt-light 1.49.3 → 1.50.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/dist/module.json +1 -1
- package/dist/module.mjs +11 -14
- package/dist/runtime/components/l-add-btn.d.vue.ts +2 -2
- package/dist/runtime/components/l-add-btn.vue.d.ts +2 -2
- package/dist/runtime/components/l-app-main.vue +2 -2
- package/dist/runtime/components/l-customizer.d.vue.ts +4 -4
- package/dist/runtime/components/l-customizer.vue.d.ts +4 -4
- package/dist/runtime/components/l-date-picker.d.vue.ts +1 -1
- package/dist/runtime/components/l-date-picker.vue.d.ts +1 -1
- package/dist/runtime/components/l-editor.d.vue.ts +1 -1
- package/dist/runtime/components/l-editor.vue.d.ts +1 -1
- package/dist/runtime/components/l-form-dialog.d.vue.ts +2 -2
- package/dist/runtime/components/l-form-dialog.vue.d.ts +2 -2
- package/dist/runtime/components/l-select.d.vue.ts +1 -1
- package/dist/runtime/components/l-select.vue.d.ts +1 -1
- package/dist/runtime/components/l-table.d.vue.ts +7 -5
- package/dist/runtime/components/l-table.vue +105 -42
- package/dist/runtime/components/l-table.vue.d.ts +7 -5
- package/dist/runtime/components/l-time-picker.d.vue.ts +1 -1
- package/dist/runtime/components/l-time-picker.vue.d.ts +1 -1
- package/dist/runtime/composables/useLight.d.ts +8 -26
- package/dist/runtime/models/User.d.ts +0 -1
- package/dist/runtime/models/User.js +0 -1
- package/dist/runtime/pages/User/index.vue +5 -5
- package/package.json +5 -5
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -349,26 +349,23 @@ const module = defineNuxtModule({
|
|
|
349
349
|
addImportsDir(resolver.resolve("./runtime/composables"));
|
|
350
350
|
const files = await resolveFiles(process.cwd() + "/models", ["*"]);
|
|
351
351
|
const files2 = await resolveFiles(process.cwd() + "/app/models", ["*"]);
|
|
352
|
-
|
|
353
|
-
model: []
|
|
354
|
-
};
|
|
352
|
+
let content = "";
|
|
355
353
|
for (const file of [...files, ...files2]) {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
354
|
+
content += `(await import('${file}')).default();
|
|
355
|
+
`;
|
|
356
|
+
}
|
|
357
|
+
addPluginTemplate({
|
|
358
|
+
filename: `light.module.options.mjs`,
|
|
359
|
+
mode: "client",
|
|
360
|
+
getContents: () => `import { defineNuxtPlugin } from '#app/nuxt'
|
|
361
361
|
|
|
362
362
|
export default defineNuxtPlugin({
|
|
363
|
-
name: '
|
|
363
|
+
name: 'light-model-plugin',
|
|
364
364
|
async setup (nuxtApp) {
|
|
365
|
-
|
|
366
|
-
const a=await import('${file}');
|
|
367
|
-
a.default();
|
|
365
|
+
${content}
|
|
368
366
|
}
|
|
369
367
|
})`
|
|
370
|
-
|
|
371
|
-
}
|
|
368
|
+
});
|
|
372
369
|
addPlugin({
|
|
373
370
|
src: resolver.resolve("./runtime/plugin"),
|
|
374
371
|
mode: "client"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
label: string;
|
|
3
|
-
color?: string | undefined;
|
|
4
3
|
to?: string | undefined;
|
|
4
|
+
color?: string | undefined;
|
|
5
5
|
$props: {
|
|
6
6
|
readonly label?: string | undefined;
|
|
7
|
-
readonly color?: string | undefined;
|
|
8
7
|
readonly to?: string | undefined;
|
|
8
|
+
readonly color?: string | undefined;
|
|
9
9
|
};
|
|
10
10
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
11
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
label: string;
|
|
3
|
-
color?: string | undefined;
|
|
4
3
|
to?: string | undefined;
|
|
4
|
+
color?: string | undefined;
|
|
5
5
|
$props: {
|
|
6
6
|
readonly label?: string | undefined;
|
|
7
|
-
readonly color?: string | undefined;
|
|
8
7
|
readonly to?: string | undefined;
|
|
8
|
+
readonly color?: string | undefined;
|
|
9
9
|
};
|
|
10
10
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
11
|
export default _default;
|
|
@@ -292,7 +292,7 @@ const onLogout = async () => {
|
|
|
292
292
|
|
|
293
293
|
<q-btn flat round dense icon="sym_o_person" class="q-mr-sm">
|
|
294
294
|
<q-menu max-width="250px">
|
|
295
|
-
<q-list>
|
|
295
|
+
<q-list :dense="style.dense">
|
|
296
296
|
<q-item v-close-popup to="/User/profile">
|
|
297
297
|
<q-item-section avatar>
|
|
298
298
|
<q-icon name="sym_o_person" />
|
|
@@ -302,7 +302,7 @@ const onLogout = async () => {
|
|
|
302
302
|
|
|
303
303
|
<q-item v-close-popup to="/User/setting">
|
|
304
304
|
<q-item-section avatar>
|
|
305
|
-
<q-icon name="
|
|
305
|
+
<q-icon name="sym_o_settings_account_box" />
|
|
306
306
|
</q-item-section>
|
|
307
307
|
<q-item-section>{{ $t("Setting") }}</q-item-section>
|
|
308
308
|
</q-item>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
$emit: (event: "update:theme" | "update:menuOverlayHeader" | "update:dense" | "update:color" | "update:miniState" | "update:footer", ...args: any[]) => void;
|
|
3
|
-
time: string;
|
|
4
3
|
color: string;
|
|
4
|
+
time: string;
|
|
5
5
|
theme: string;
|
|
6
6
|
dense: boolean;
|
|
7
|
-
footer: boolean;
|
|
8
7
|
miniState: boolean;
|
|
8
|
+
footer: boolean;
|
|
9
9
|
menuOverlayHeader: boolean;
|
|
10
10
|
$props: {
|
|
11
|
-
readonly time?: string | undefined;
|
|
12
11
|
readonly color?: string | undefined;
|
|
12
|
+
readonly time?: string | undefined;
|
|
13
13
|
readonly theme?: string | undefined;
|
|
14
14
|
readonly dense?: boolean | undefined;
|
|
15
|
-
readonly footer?: boolean | undefined;
|
|
16
15
|
readonly miniState?: boolean | undefined;
|
|
16
|
+
readonly footer?: boolean | undefined;
|
|
17
17
|
readonly menuOverlayHeader?: boolean | undefined;
|
|
18
18
|
};
|
|
19
19
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
2
|
$emit: (event: "update:theme" | "update:menuOverlayHeader" | "update:dense" | "update:color" | "update:miniState" | "update:footer", ...args: any[]) => void;
|
|
3
|
-
time: string;
|
|
4
3
|
color: string;
|
|
4
|
+
time: string;
|
|
5
5
|
theme: string;
|
|
6
6
|
dense: boolean;
|
|
7
|
-
footer: boolean;
|
|
8
7
|
miniState: boolean;
|
|
8
|
+
footer: boolean;
|
|
9
9
|
menuOverlayHeader: boolean;
|
|
10
10
|
$props: {
|
|
11
|
-
readonly time?: string | undefined;
|
|
12
11
|
readonly color?: string | undefined;
|
|
12
|
+
readonly time?: string | undefined;
|
|
13
13
|
readonly theme?: string | undefined;
|
|
14
14
|
readonly dense?: boolean | undefined;
|
|
15
|
-
readonly footer?: boolean | undefined;
|
|
16
15
|
readonly miniState?: boolean | undefined;
|
|
16
|
+
readonly footer?: boolean | undefined;
|
|
17
17
|
readonly menuOverlayHeader?: boolean | undefined;
|
|
18
18
|
};
|
|
19
19
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -13,11 +13,11 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
14
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
-
disable: boolean;
|
|
17
16
|
dark: boolean | null;
|
|
18
17
|
rounded: boolean;
|
|
19
18
|
square: boolean;
|
|
20
19
|
dense: boolean;
|
|
20
|
+
disable: boolean;
|
|
21
21
|
outlined: boolean;
|
|
22
22
|
filled: boolean;
|
|
23
23
|
stackLabel: boolean;
|
|
@@ -13,11 +13,11 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
14
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
-
disable: boolean;
|
|
17
16
|
dark: boolean | null;
|
|
18
17
|
rounded: boolean;
|
|
19
18
|
square: boolean;
|
|
20
19
|
dense: boolean;
|
|
20
|
+
disable: boolean;
|
|
21
21
|
outlined: boolean;
|
|
22
22
|
filled: boolean;
|
|
23
23
|
stackLabel: boolean;
|
|
@@ -6,9 +6,9 @@ declare const _default: import("vue").DefineComponent<LEditorProps, {}, {}, {},
|
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<LEditorProps> & Readonly<{
|
|
7
7
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
|
-
modelValue: string;
|
|
10
9
|
dense: boolean;
|
|
11
10
|
placeholder: string;
|
|
11
|
+
modelValue: string;
|
|
12
12
|
fonts: any | undefined;
|
|
13
13
|
toolbar: readonly any[];
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -6,9 +6,9 @@ declare const _default: import("vue").DefineComponent<LEditorProps, {}, {}, {},
|
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<LEditorProps> & Readonly<{
|
|
7
7
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
|
-
modelValue: string;
|
|
10
9
|
dense: boolean;
|
|
11
10
|
placeholder: string;
|
|
11
|
+
modelValue: string;
|
|
12
12
|
fonts: any | undefined;
|
|
13
13
|
toolbar: readonly any[];
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -5,15 +5,15 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
7
|
$emit: (event: "submit", ...args: any[]) => void;
|
|
8
|
-
value: Record<string, any>;
|
|
9
8
|
cancel: Function;
|
|
9
|
+
value: Record<string, any>;
|
|
10
10
|
width: string;
|
|
11
11
|
title: string;
|
|
12
12
|
save: Function;
|
|
13
13
|
showNotification: boolean;
|
|
14
14
|
$props: {
|
|
15
|
-
readonly value?: Record<string, any> | undefined;
|
|
16
15
|
readonly cancel?: Function | undefined;
|
|
16
|
+
readonly value?: Record<string, any> | undefined;
|
|
17
17
|
readonly width?: string | undefined;
|
|
18
18
|
readonly title?: string | undefined;
|
|
19
19
|
readonly save?: Function | undefined;
|
|
@@ -5,15 +5,15 @@ type __VLS_WithSlots<T, S> = T & (new () => {
|
|
|
5
5
|
});
|
|
6
6
|
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
7
|
$emit: (event: "submit", ...args: any[]) => void;
|
|
8
|
-
value: Record<string, any>;
|
|
9
8
|
cancel: Function;
|
|
9
|
+
value: Record<string, any>;
|
|
10
10
|
width: string;
|
|
11
11
|
title: string;
|
|
12
12
|
save: Function;
|
|
13
13
|
showNotification: boolean;
|
|
14
14
|
$props: {
|
|
15
|
-
readonly value?: Record<string, any> | undefined;
|
|
16
15
|
readonly cancel?: Function | undefined;
|
|
16
|
+
readonly value?: Record<string, any> | undefined;
|
|
17
17
|
readonly width?: string | undefined;
|
|
18
18
|
readonly title?: string | undefined;
|
|
19
19
|
readonly save?: Function | undefined;
|
|
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<QSelectProps, {}, {}, {},
|
|
|
5
5
|
square: boolean;
|
|
6
6
|
dense: boolean;
|
|
7
7
|
outlined: boolean;
|
|
8
|
+
optionValue: string | ((option: string | any) => any);
|
|
8
9
|
filled: boolean;
|
|
9
10
|
stackLabel: boolean;
|
|
10
11
|
standout: string | boolean;
|
|
@@ -12,7 +13,6 @@ declare const _default: import("vue").DefineComponent<QSelectProps, {}, {}, {},
|
|
|
12
13
|
emitValue: boolean;
|
|
13
14
|
mapOptions: boolean;
|
|
14
15
|
inputDebounce: string | number;
|
|
15
|
-
optionValue: string | ((option: string | any) => any);
|
|
16
16
|
optionLabel: string | ((option: string | any) => string);
|
|
17
17
|
optionsDark: boolean | null;
|
|
18
18
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<QSelectProps, {}, {}, {},
|
|
|
5
5
|
square: boolean;
|
|
6
6
|
dense: boolean;
|
|
7
7
|
outlined: boolean;
|
|
8
|
+
optionValue: string | ((option: string | any) => any);
|
|
8
9
|
filled: boolean;
|
|
9
10
|
stackLabel: boolean;
|
|
10
11
|
standout: string | boolean;
|
|
@@ -12,7 +13,6 @@ declare const _default: import("vue").DefineComponent<QSelectProps, {}, {}, {},
|
|
|
12
13
|
emitValue: boolean;
|
|
13
14
|
mapOptions: boolean;
|
|
14
15
|
inputDebounce: string | number;
|
|
15
|
-
optionValue: string | ((option: string | any) => any);
|
|
16
16
|
optionLabel: string | ((option: string | any) => string);
|
|
17
17
|
optionsDark: boolean | null;
|
|
18
18
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,13 +2,13 @@ import type { Component } from "vue";
|
|
|
2
2
|
import { Dialog } from 'quasar';
|
|
3
3
|
import type { QTableColumn, QTableProps } from 'quasar';
|
|
4
4
|
export type LTableColumn = QTableColumn & {
|
|
5
|
-
searchType?: "date" | "text" | "number" | "select";
|
|
5
|
+
searchType?: "date" | "text" | "number" | "select" | "boolean";
|
|
6
6
|
searchable?: boolean;
|
|
7
7
|
searchOptions?: Record<string, any>[] | Function;
|
|
8
8
|
searchMultiple?: boolean;
|
|
9
9
|
searchIndex?: string;
|
|
10
10
|
component?: Component;
|
|
11
|
-
componentProps?: any;
|
|
11
|
+
componentProps?: ((row: any) => Record<string, any>);
|
|
12
12
|
to?: (row: any) => string | null;
|
|
13
13
|
gql?: Record<string, any>;
|
|
14
14
|
/**
|
|
@@ -22,7 +22,7 @@ export type LTableColumn = QTableColumn & {
|
|
|
22
22
|
export type LTableProps = QTableProps & {
|
|
23
23
|
columns?: Array<LTableColumn>;
|
|
24
24
|
actions?: Array<'view' | 'edit' | 'delete' | 'update'>;
|
|
25
|
-
sortBy?:
|
|
25
|
+
sortBy?: string;
|
|
26
26
|
rowKey?: string;
|
|
27
27
|
modelName?: any;
|
|
28
28
|
searchable?: boolean;
|
|
@@ -70,15 +70,17 @@ export interface LTableRequest {
|
|
|
70
70
|
}) => void;
|
|
71
71
|
}
|
|
72
72
|
declare function requestServerInteraction(): void;
|
|
73
|
-
declare var __VLS_91: any, __VLS_94: string, __VLS_95: any, __VLS_117: any,
|
|
73
|
+
declare var __VLS_91: any, __VLS_94: string, __VLS_95: any, __VLS_117: any, __VLS_119: any, __VLS_248: string, __VLS_249: any;
|
|
74
74
|
type __VLS_Slots = {} & {
|
|
75
75
|
[K in NonNullable<typeof __VLS_94>]?: (props: typeof __VLS_95) => any;
|
|
76
76
|
} & {
|
|
77
|
-
[K in NonNullable<typeof
|
|
77
|
+
[K in NonNullable<typeof __VLS_248>]?: (props: typeof __VLS_249) => any;
|
|
78
78
|
} & {
|
|
79
79
|
actions?: (props: typeof __VLS_91) => any;
|
|
80
80
|
} & {
|
|
81
81
|
'row-expand'?: (props: typeof __VLS_117) => any;
|
|
82
|
+
} & {
|
|
83
|
+
'top-right'?: (props: typeof __VLS_119) => any;
|
|
82
84
|
};
|
|
83
85
|
declare const __VLS_component: import("vue").DefineComponent<LTableProps, {
|
|
84
86
|
requestServerInteraction: typeof requestServerInteraction;
|
|
@@ -7,7 +7,7 @@ import model from "../composables/model";
|
|
|
7
7
|
import { toQuery } from "@hostlink/light";
|
|
8
8
|
import { list } from "#imports";
|
|
9
9
|
import { useI18n } from "vue-i18n";
|
|
10
|
-
import { useStorage } from "@vueuse/core";
|
|
10
|
+
import { useStorage, useSessionStorage } from "@vueuse/core";
|
|
11
11
|
import { useRoute } from "#imports";
|
|
12
12
|
const $q = useQuasar();
|
|
13
13
|
const { t } = useI18n();
|
|
@@ -98,7 +98,7 @@ const props = defineProps({
|
|
|
98
98
|
"onUpdate:expanded": { type: Function, required: false },
|
|
99
99
|
onVirtualScroll: { type: Function, required: false },
|
|
100
100
|
actions: { type: Array, required: false, default: () => [] },
|
|
101
|
-
sortBy: { type:
|
|
101
|
+
sortBy: { type: String, required: false },
|
|
102
102
|
modelName: { type: null, required: false },
|
|
103
103
|
searchable: { type: Boolean, required: false, default: false },
|
|
104
104
|
onRequestData: { type: Function, required: false },
|
|
@@ -108,6 +108,31 @@ const props = defineProps({
|
|
|
108
108
|
searchStyle: { type: String, required: false }
|
|
109
109
|
});
|
|
110
110
|
const isServerSide = props.rows == void 0;
|
|
111
|
+
const simpleRouteName = computed(() => {
|
|
112
|
+
if ($route.name && typeof $route.name == "string") {
|
|
113
|
+
return $route.name;
|
|
114
|
+
}
|
|
115
|
+
return "";
|
|
116
|
+
});
|
|
117
|
+
const storageKey = computed(() => {
|
|
118
|
+
if (!props.name) return "l-table-storage-default";
|
|
119
|
+
return "l-table-storage-" + simpleRouteName.value + "-" + props.name;
|
|
120
|
+
});
|
|
121
|
+
const saveFilters = computed({
|
|
122
|
+
get() {
|
|
123
|
+
if (!props.name) return false;
|
|
124
|
+
return useStorage(storageKey.value, false).value;
|
|
125
|
+
},
|
|
126
|
+
set(value) {
|
|
127
|
+
if (!props.name) return;
|
|
128
|
+
const storage = useStorage(storageKey.value, false);
|
|
129
|
+
storage.value = value;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
const filters = useSessionStorage(storageKey.value, {});
|
|
133
|
+
if (!saveFilters.value) {
|
|
134
|
+
filters.value = {};
|
|
135
|
+
}
|
|
111
136
|
const light = useLight();
|
|
112
137
|
const pagination = ref(props.pagination);
|
|
113
138
|
if (props.rowsPerPageOptions[0] == 0) {
|
|
@@ -124,8 +149,8 @@ props.columns?.forEach((col) => {
|
|
|
124
149
|
});
|
|
125
150
|
if (props.columns) {
|
|
126
151
|
for (let i = 0; i < props.columns.length; i++) {
|
|
127
|
-
if (props.columns[i]
|
|
128
|
-
let opts = props.columns[i]
|
|
152
|
+
if (props.columns[i]?.searchOptions) {
|
|
153
|
+
let opts = props.columns[i]?.searchOptions;
|
|
129
154
|
if (typeof opts == "function") {
|
|
130
155
|
props.columns[i].searchOptions = await opts();
|
|
131
156
|
}
|
|
@@ -153,7 +178,6 @@ const hasSearch = computed(() => {
|
|
|
153
178
|
});
|
|
154
179
|
});
|
|
155
180
|
const table = ref();
|
|
156
|
-
const filters = reactive({});
|
|
157
181
|
const rows = ref(props.rows);
|
|
158
182
|
if (rows.value == void 0) {
|
|
159
183
|
rows.value = [];
|
|
@@ -307,26 +331,28 @@ const getFilterValue = () => {
|
|
|
307
331
|
let f = {};
|
|
308
332
|
props.columns?.forEach((col) => {
|
|
309
333
|
if (col.searchable) {
|
|
310
|
-
if (filters[col.name] !== null && filters[col.name] !== "" && filters[col.name] !== void 0) {
|
|
334
|
+
if (filters.value[col.name] !== null && filters.value[col.name] !== "" && filters.value[col.name] !== void 0) {
|
|
311
335
|
const k = col.searchIndex ?? col.name;
|
|
312
|
-
if (col.searchType == "
|
|
313
|
-
f[k] = filters[col.name];
|
|
336
|
+
if (col.searchType == "boolean") {
|
|
337
|
+
f[k] = filters.value[col.name];
|
|
338
|
+
} else if (col.searchType == "number") {
|
|
339
|
+
f[k] = filters.value[col.name];
|
|
314
340
|
} else if (col.searchType == "date") {
|
|
315
|
-
if (filters[k].from) {
|
|
341
|
+
if (filters.value[k].from) {
|
|
316
342
|
f[k] = {
|
|
317
|
-
|
|
343
|
+
_between: [filters.value[col.name].from, filters.value[col.name].to]
|
|
318
344
|
};
|
|
319
345
|
} else {
|
|
320
|
-
f[k] = filters[k];
|
|
346
|
+
f[k] = filters.value[k];
|
|
321
347
|
}
|
|
322
348
|
} else if (col.searchType == "select") {
|
|
323
|
-
f[k] = filters[col.name];
|
|
349
|
+
f[k] = filters.value[col.name];
|
|
324
350
|
} else {
|
|
325
351
|
if (col.searchMethod == "equals") {
|
|
326
|
-
f[k] = filters[col.name];
|
|
352
|
+
f[k] = filters.value[col.name];
|
|
327
353
|
} else {
|
|
328
354
|
f[k] = {
|
|
329
|
-
contains: filters[col.name]
|
|
355
|
+
contains: filters.value[col.name]
|
|
330
356
|
};
|
|
331
357
|
}
|
|
332
358
|
}
|
|
@@ -467,21 +493,21 @@ const searchSelectFilter = (val, update, name) => {
|
|
|
467
493
|
}
|
|
468
494
|
};
|
|
469
495
|
const showTopRight = computed(() => {
|
|
470
|
-
return props.searchable || props.name && (props.columns && props.columns.length > 0);
|
|
496
|
+
return props.name && hasFilters.value || props.searchable || props.name && (props.columns && props.columns.length > 0);
|
|
471
497
|
});
|
|
472
498
|
const hidableColumns = computed(() => {
|
|
473
499
|
return props.columns?.filter((c) => !c.required) || [];
|
|
474
500
|
});
|
|
475
|
-
const simpleRouteName = computed(() => {
|
|
476
|
-
if ($route.name && typeof $route.name == "string") {
|
|
477
|
-
return $route.name;
|
|
478
|
-
}
|
|
479
|
-
return "";
|
|
480
|
-
});
|
|
481
501
|
const visibleColumns = props.name ? useStorage("l-table-visible-columns-" + simpleRouteName.value + "-" + props.name, hidableColumns.value.map((c) => c.name)) : ref(hidableColumns.value.map((c) => c.name));
|
|
482
502
|
watch(filters, () => {
|
|
503
|
+
console.log("filters changed", filters.value);
|
|
483
504
|
onFilters();
|
|
484
505
|
}, { deep: true });
|
|
506
|
+
const tempFilters = ref({});
|
|
507
|
+
tempFilters.value = { ...filters.value };
|
|
508
|
+
const hasFilters = computed(() => {
|
|
509
|
+
return Object.keys(filters.value).length > 0;
|
|
510
|
+
});
|
|
485
511
|
</script>
|
|
486
512
|
|
|
487
513
|
<template>
|
|
@@ -491,7 +517,7 @@ watch(filters, () => {
|
|
|
491
517
|
<template #header="props">
|
|
492
518
|
<q-tr :props="props">
|
|
493
519
|
<q-td v-if="selection != 'none'" auto-width>
|
|
494
|
-
<q-checkbox v-model="props.selected" />
|
|
520
|
+
<q-checkbox v-model="props.selected" :color="$light.color" />
|
|
495
521
|
</q-td>
|
|
496
522
|
<q-th v-if="hasRowExpand" auto-width></q-th>
|
|
497
523
|
<q-th v-if="hasActions" auto-width></q-th>
|
|
@@ -517,7 +543,7 @@ watch(filters, () => {
|
|
|
517
543
|
<template #body="props">
|
|
518
544
|
<q-tr :props="props">
|
|
519
545
|
<q-td v-if="selection != 'none'" auto-width>
|
|
520
|
-
<q-checkbox v-model="props.selected" />
|
|
546
|
+
<q-checkbox v-model="props.selected" :color="$light.color" />
|
|
521
547
|
</q-td>
|
|
522
548
|
<q-td v-if="hasRowExpand" auto-width>
|
|
523
549
|
<q-btn flat round size="sm" :icon="props.expand ? 'sym_o_expand_more' : 'sym_o_expand_less'"
|
|
@@ -542,7 +568,6 @@ watch(filters, () => {
|
|
|
542
568
|
</q-td>
|
|
543
569
|
|
|
544
570
|
|
|
545
|
-
|
|
546
571
|
<template v-for="col in props.cols">
|
|
547
572
|
<template v-if="ss.indexOf('body-cell-' + col.name) >= 0">
|
|
548
573
|
<slot :name="'body-cell-' + col.name" v-bind="props"></slot>
|
|
@@ -573,6 +598,15 @@ watch(filters, () => {
|
|
|
573
598
|
|
|
574
599
|
|
|
575
600
|
<template #top-right="props" v-if="showTopRight">
|
|
601
|
+
<slot name="top-right" v-bind="props"></slot>
|
|
602
|
+
|
|
603
|
+
<q-btn v-if="$props.name" :disable="!hasFilters" dense flat icon="sym_o_filter_alt_off"
|
|
604
|
+
:color="$light.color" @click="filters = {};
|
|
605
|
+
tempFilters = {}">
|
|
606
|
+
<q-tooltip>{{ $t("Clear Filters") }}</q-tooltip>
|
|
607
|
+
</q-btn>
|
|
608
|
+
|
|
609
|
+
|
|
576
610
|
<q-input outlined dense debounce="300" v-model="filter" :placeholder="$t('Search')" :color="$light.color"
|
|
577
611
|
v-if="searchable">
|
|
578
612
|
<template v-slot:append>
|
|
@@ -580,18 +614,32 @@ watch(filters, () => {
|
|
|
580
614
|
</template>
|
|
581
615
|
</q-input>
|
|
582
616
|
|
|
583
|
-
<q-icon
|
|
617
|
+
<q-btn icon="sym_o_settings" flat dense :color="$light.color" v-if="$props.name">
|
|
584
618
|
<q-popup-proxy>
|
|
585
619
|
<q-card>
|
|
586
620
|
<q-card-section>
|
|
587
|
-
<
|
|
588
|
-
<q-checkbox v-model="visibleColumns" :val="column.name" :label="column.label"
|
|
589
|
-
:color="$light.color" dense />
|
|
590
|
-
</div>
|
|
621
|
+
<q-checkbox label="Save filters" v-model="saveFilters" :color="$light.color" />
|
|
591
622
|
</q-card-section>
|
|
592
623
|
</q-card>
|
|
593
624
|
</q-popup-proxy>
|
|
594
|
-
</q-
|
|
625
|
+
</q-btn>
|
|
626
|
+
|
|
627
|
+
<q-btn icon="sym_o_view_column" flat dense :color="$light.color" v-if="$props.name">
|
|
628
|
+
<q-popup-proxy>
|
|
629
|
+
<q-card>
|
|
630
|
+
<q-card-section>
|
|
631
|
+
<q-option-group :color="$light.color" type="checkbox" v-model="visibleColumns"
|
|
632
|
+
:options="hidableColumns" option-value="name">
|
|
633
|
+
</q-option-group>
|
|
634
|
+
</q-card-section>
|
|
635
|
+
</q-card>
|
|
636
|
+
</q-popup-proxy>
|
|
637
|
+
</q-btn>
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
<q-btn icon="sym_o_refresh" flat dense :color="$light.color" @click="requestServerInteraction()">
|
|
641
|
+
<q-tooltip>{{ $t("Refresh") }}</q-tooltip>
|
|
642
|
+
</q-btn>
|
|
595
643
|
</template>
|
|
596
644
|
|
|
597
645
|
|
|
@@ -614,29 +662,40 @@ watch(filters, () => {
|
|
|
614
662
|
|
|
615
663
|
<template v-if="col.searchType == 'number'">
|
|
616
664
|
<q-input style="min-width: 80px;" dense clearable filled square
|
|
617
|
-
v-model.number="
|
|
618
|
-
|
|
665
|
+
v-model.number="tempFilters[col.name]"
|
|
666
|
+
@keydown.enter.prevent="filters[col.name] = tempFilters[col.name]"
|
|
667
|
+
@clear="delete filters[col.name]" mask="##########" :enterkeyhint="$t('search')"
|
|
668
|
+
:style="col.searchStyle"></q-input>
|
|
619
669
|
</template>
|
|
620
670
|
|
|
621
671
|
<template v-if="col.searchType == 'select'">
|
|
622
|
-
<q-select dense clearable filled square v-model="filters[col.name]"
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
672
|
+
<q-select dense clearable filled square v-model="filters[col.name]" options-dense
|
|
673
|
+
:options="localSearchOptions[col.name]" emit-value map-options
|
|
674
|
+
:multiple="col.searchMultiple" :color="$light.color" use-input input-debounce="0"
|
|
675
|
+
@filter="(val, update) => {
|
|
626
676
|
searchSelectFilter(val, update, col.name);
|
|
627
677
|
}" :style="col.searchStyle" />
|
|
628
678
|
</template>
|
|
629
679
|
|
|
630
680
|
<template v-if="col.searchType == 'date'">
|
|
631
681
|
<l-date-picker dense clearable filled square :outlined="false" hide-bottom-space
|
|
632
|
-
v-model="filters[col.name]" range
|
|
633
|
-
|
|
682
|
+
v-model="filters[col.name]" range :style="col.searchStyle" />
|
|
683
|
+
</template>
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
<template v-if="col.searchType == 'boolean'">
|
|
687
|
+
<q-select dense clearable filled square v-model="filters[col.name]" :options="[
|
|
688
|
+
{ label: $t('Yes'), value: true },
|
|
689
|
+
{ label: $t('No'), value: false }
|
|
690
|
+
]" :color="$light.color" :style="col.searchStyle" emit-value map-options options-dense />
|
|
691
|
+
|
|
692
|
+
|
|
634
693
|
</template>
|
|
635
694
|
|
|
636
695
|
<template v-if="!col.searchType || col.searchType == 'text'">
|
|
637
|
-
<q-input style="min-width: 80px;" dense clearable filled square
|
|
638
|
-
@keydown.enter.prevent="
|
|
639
|
-
:
|
|
696
|
+
<q-input style="min-width: 80px;" dense clearable filled square
|
|
697
|
+
v-model="tempFilters[col.name]" @keydown.enter.prevent="filters[col.name] = tempFilters[col.name]" @clear="delete filters[col.name]" :enterkeyhint="$t('search')" :color="$light.color"
|
|
698
|
+
:style="col.searchStyle"></q-input>
|
|
640
699
|
|
|
641
700
|
</template>
|
|
642
701
|
|
|
@@ -645,8 +704,12 @@ watch(filters, () => {
|
|
|
645
704
|
</q-tr>
|
|
646
705
|
</template>
|
|
647
706
|
|
|
648
|
-
<template v-for="slot of
|
|
707
|
+
<template v-for="slot of Object.keys($slots)" v-slot:[slot]="props">
|
|
649
708
|
<slot :name="slot" v-bind="props"></slot>
|
|
650
709
|
</template>
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
|
|
651
714
|
</q-table>
|
|
652
715
|
</template>
|
|
@@ -2,13 +2,13 @@ import type { Component } from "vue";
|
|
|
2
2
|
import { Dialog } from 'quasar';
|
|
3
3
|
import type { QTableColumn, QTableProps } from 'quasar';
|
|
4
4
|
export type LTableColumn = QTableColumn & {
|
|
5
|
-
searchType?: "date" | "text" | "number" | "select";
|
|
5
|
+
searchType?: "date" | "text" | "number" | "select" | "boolean";
|
|
6
6
|
searchable?: boolean;
|
|
7
7
|
searchOptions?: Record<string, any>[] | Function;
|
|
8
8
|
searchMultiple?: boolean;
|
|
9
9
|
searchIndex?: string;
|
|
10
10
|
component?: Component;
|
|
11
|
-
componentProps?: any;
|
|
11
|
+
componentProps?: ((row: any) => Record<string, any>);
|
|
12
12
|
to?: (row: any) => string | null;
|
|
13
13
|
gql?: Record<string, any>;
|
|
14
14
|
/**
|
|
@@ -22,7 +22,7 @@ export type LTableColumn = QTableColumn & {
|
|
|
22
22
|
export type LTableProps = QTableProps & {
|
|
23
23
|
columns?: Array<LTableColumn>;
|
|
24
24
|
actions?: Array<'view' | 'edit' | 'delete' | 'update'>;
|
|
25
|
-
sortBy?:
|
|
25
|
+
sortBy?: string;
|
|
26
26
|
rowKey?: string;
|
|
27
27
|
modelName?: any;
|
|
28
28
|
searchable?: boolean;
|
|
@@ -70,15 +70,17 @@ export interface LTableRequest {
|
|
|
70
70
|
}) => void;
|
|
71
71
|
}
|
|
72
72
|
declare function requestServerInteraction(): void;
|
|
73
|
-
declare var __VLS_91: any, __VLS_94: string, __VLS_95: any, __VLS_117: any,
|
|
73
|
+
declare var __VLS_91: any, __VLS_94: string, __VLS_95: any, __VLS_117: any, __VLS_119: any, __VLS_248: string, __VLS_249: any;
|
|
74
74
|
type __VLS_Slots = {} & {
|
|
75
75
|
[K in NonNullable<typeof __VLS_94>]?: (props: typeof __VLS_95) => any;
|
|
76
76
|
} & {
|
|
77
|
-
[K in NonNullable<typeof
|
|
77
|
+
[K in NonNullable<typeof __VLS_248>]?: (props: typeof __VLS_249) => any;
|
|
78
78
|
} & {
|
|
79
79
|
actions?: (props: typeof __VLS_91) => any;
|
|
80
80
|
} & {
|
|
81
81
|
'row-expand'?: (props: typeof __VLS_117) => any;
|
|
82
|
+
} & {
|
|
83
|
+
'top-right'?: (props: typeof __VLS_119) => any;
|
|
82
84
|
};
|
|
83
85
|
declare const __VLS_component: import("vue").DefineComponent<LTableProps, {
|
|
84
86
|
requestServerInteraction: typeof requestServerInteraction;
|
|
@@ -23,8 +23,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
23
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
24
24
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
|
-
required: boolean;
|
|
27
26
|
format24h: boolean;
|
|
27
|
+
required: boolean;
|
|
28
28
|
mask: string;
|
|
29
29
|
hideBottomSpace: boolean;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -23,8 +23,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
23
23
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
24
24
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
|
-
required: boolean;
|
|
27
26
|
format24h: boolean;
|
|
27
|
+
required: boolean;
|
|
28
28
|
mask: string;
|
|
29
29
|
hideBottomSpace: boolean;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -224,8 +224,6 @@ declare const light: {
|
|
|
224
224
|
isoName: string;
|
|
225
225
|
nativeName: string;
|
|
226
226
|
label: {
|
|
227
|
-
create: string;
|
|
228
|
-
set: string;
|
|
229
227
|
cancel: string;
|
|
230
228
|
close: string;
|
|
231
229
|
reset: string;
|
|
@@ -233,9 +231,11 @@ declare const light: {
|
|
|
233
231
|
filter: string;
|
|
234
232
|
update: string;
|
|
235
233
|
remove: string;
|
|
234
|
+
set: string;
|
|
236
235
|
clear: string;
|
|
237
236
|
ok: string;
|
|
238
237
|
search: string;
|
|
238
|
+
create: string;
|
|
239
239
|
refresh: string;
|
|
240
240
|
expand: (label?: string | undefined) => string;
|
|
241
241
|
collapse: (label?: string | undefined) => string;
|
|
@@ -319,9 +319,9 @@ declare const light: {
|
|
|
319
319
|
name: string;
|
|
320
320
|
type: {
|
|
321
321
|
info: string;
|
|
322
|
-
positive: string;
|
|
323
|
-
negative: string;
|
|
324
322
|
warning: string;
|
|
323
|
+
negative: string;
|
|
324
|
+
positive: string;
|
|
325
325
|
};
|
|
326
326
|
arrow: {
|
|
327
327
|
left: string;
|
|
@@ -525,9 +525,6 @@ declare const light: {
|
|
|
525
525
|
readonly datetimeFormats: {};
|
|
526
526
|
readonly numberFormats: {};
|
|
527
527
|
readonly modifiers: import("vue-i18n").LinkedModifiers<import("vue-i18n").VueMessageType>;
|
|
528
|
-
formatter: {
|
|
529
|
-
interpolate: (message: string, values: any, path: string) => Array<any> | null;
|
|
530
|
-
};
|
|
531
528
|
missing: import("vue-i18n").MissingHandler | null;
|
|
532
529
|
postTranslation: import("vue-i18n").PostTranslationHandler<import("vue-i18n").VueMessageType> | null;
|
|
533
530
|
silentTranslationWarn: boolean | RegExp;
|
|
@@ -536,15 +533,11 @@ declare const light: {
|
|
|
536
533
|
sync: boolean;
|
|
537
534
|
warnHtmlInMessage: import("vue-i18n").WarnHtmlInMessageLevel;
|
|
538
535
|
escapeParameterHtml: boolean;
|
|
539
|
-
preserveDirectiveContent: boolean;
|
|
540
536
|
pluralizationRules: import("@intlify/core-base").PluralizationRules;
|
|
541
537
|
t: import("vue-i18n").VueI18nTranslation<{}, string, import("@intlify/core-base").RemoveIndexSignature<{
|
|
542
538
|
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
543
539
|
}>, never, never, never>;
|
|
544
540
|
rt: import("vue-i18n").VueI18nResolveLocaleMessageTranslation<string>;
|
|
545
|
-
tc: import("vue-i18n").VueI18nTranslationChoice<{}, string, import("@intlify/core-base").RemoveIndexSignature<{
|
|
546
|
-
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
547
|
-
}>, never, never, never>;
|
|
548
541
|
te: <Str extends string, Key extends never = never>(key: Str | Key, locale?: string | undefined) => boolean;
|
|
549
542
|
tm: <Key extends string, ResourceKeys extends never = never, Locale extends never = never, Target = import("@intlify/core-base").RemoveIndexSignature<{
|
|
550
543
|
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
@@ -576,9 +569,7 @@ declare const light: {
|
|
|
576
569
|
[x: string]: import("@intlify/core-base").NumberFormatOptions;
|
|
577
570
|
}> : NumberSchema, Formats extends FormatsType = FormatsType>(locale: LocaleSchema | Locale, format: Formats) => void;
|
|
578
571
|
mergeNumberFormat: <NumberSchema extends Record<string, any> = never, LocaleSchema extends string = string, Locale extends never = never, Formats = import("vue-i18n").IsNever<NumberSchema> extends true ? Record<string, any> : NumberSchema>(locale: LocaleSchema | Locale, format: Formats) => void;
|
|
579
|
-
getChoiceIndex: (choice: import("vue-i18n").Choice, choicesLength: number) => number;
|
|
580
572
|
};
|
|
581
|
-
readonly allowComposition: boolean;
|
|
582
573
|
install: (app: import("vue").App, ...options: unknown[]) => void;
|
|
583
574
|
dispose: () => void;
|
|
584
575
|
} | null;
|
|
@@ -830,8 +821,6 @@ declare const _default: () => {
|
|
|
830
821
|
isoName: string;
|
|
831
822
|
nativeName: string;
|
|
832
823
|
label: {
|
|
833
|
-
create: string;
|
|
834
|
-
set: string;
|
|
835
824
|
cancel: string;
|
|
836
825
|
close: string;
|
|
837
826
|
reset: string;
|
|
@@ -839,9 +828,11 @@ declare const _default: () => {
|
|
|
839
828
|
filter: string;
|
|
840
829
|
update: string;
|
|
841
830
|
remove: string;
|
|
831
|
+
set: string;
|
|
842
832
|
clear: string;
|
|
843
833
|
ok: string;
|
|
844
834
|
search: string;
|
|
835
|
+
create: string;
|
|
845
836
|
refresh: string;
|
|
846
837
|
expand: (label?: string | undefined) => string;
|
|
847
838
|
collapse: (label?: string | undefined) => string;
|
|
@@ -925,9 +916,9 @@ declare const _default: () => {
|
|
|
925
916
|
name: string;
|
|
926
917
|
type: {
|
|
927
918
|
info: string;
|
|
928
|
-
positive: string;
|
|
929
|
-
negative: string;
|
|
930
919
|
warning: string;
|
|
920
|
+
negative: string;
|
|
921
|
+
positive: string;
|
|
931
922
|
};
|
|
932
923
|
arrow: {
|
|
933
924
|
left: string;
|
|
@@ -1131,9 +1122,6 @@ declare const _default: () => {
|
|
|
1131
1122
|
readonly datetimeFormats: {};
|
|
1132
1123
|
readonly numberFormats: {};
|
|
1133
1124
|
readonly modifiers: import("vue-i18n").LinkedModifiers<import("vue-i18n").VueMessageType>;
|
|
1134
|
-
formatter: {
|
|
1135
|
-
interpolate: (message: string, values: any, path: string) => Array<any> | null;
|
|
1136
|
-
};
|
|
1137
1125
|
missing: import("vue-i18n").MissingHandler | null;
|
|
1138
1126
|
postTranslation: import("vue-i18n").PostTranslationHandler<import("vue-i18n").VueMessageType> | null;
|
|
1139
1127
|
silentTranslationWarn: boolean | RegExp;
|
|
@@ -1142,15 +1130,11 @@ declare const _default: () => {
|
|
|
1142
1130
|
sync: boolean;
|
|
1143
1131
|
warnHtmlInMessage: import("vue-i18n").WarnHtmlInMessageLevel;
|
|
1144
1132
|
escapeParameterHtml: boolean;
|
|
1145
|
-
preserveDirectiveContent: boolean;
|
|
1146
1133
|
pluralizationRules: import("@intlify/core-base").PluralizationRules;
|
|
1147
1134
|
t: import("vue-i18n").VueI18nTranslation<{}, string, import("@intlify/core-base").RemoveIndexSignature<{
|
|
1148
1135
|
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
1149
1136
|
}>, never, never, never>;
|
|
1150
1137
|
rt: import("vue-i18n").VueI18nResolveLocaleMessageTranslation<string>;
|
|
1151
|
-
tc: import("vue-i18n").VueI18nTranslationChoice<{}, string, import("@intlify/core-base").RemoveIndexSignature<{
|
|
1152
|
-
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
1153
|
-
}>, never, never, never>;
|
|
1154
1138
|
te: <Str extends string, Key extends never = never>(key: Str | Key, locale?: string | undefined) => boolean;
|
|
1155
1139
|
tm: <Key extends string, ResourceKeys extends never = never, Locale extends never = never, Target = import("@intlify/core-base").RemoveIndexSignature<{
|
|
1156
1140
|
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
@@ -1182,9 +1166,7 @@ declare const _default: () => {
|
|
|
1182
1166
|
[x: string]: import("@intlify/core-base").NumberFormatOptions;
|
|
1183
1167
|
}> : NumberSchema, Formats extends FormatsType = FormatsType>(locale: LocaleSchema | Locale, format: Formats) => void;
|
|
1184
1168
|
mergeNumberFormat: <NumberSchema extends Record<string, any> = never, LocaleSchema extends string = string, Locale extends never = never, Formats = import("vue-i18n").IsNever<NumberSchema> extends true ? Record<string, any> : NumberSchema>(locale: LocaleSchema | Locale, format: Formats) => void;
|
|
1185
|
-
getChoiceIndex: (choice: import("vue-i18n").Choice, choicesLength: number) => number;
|
|
1186
1169
|
};
|
|
1187
|
-
readonly allowComposition: boolean;
|
|
1188
1170
|
install: (app: import("vue").App, ...options: unknown[]) => void;
|
|
1189
1171
|
dispose: () => void;
|
|
1190
1172
|
} | null;
|
|
@@ -18,21 +18,21 @@ const columns = model("User").columns({
|
|
|
18
18
|
email: true,
|
|
19
19
|
phone: true,
|
|
20
20
|
join_date: true,
|
|
21
|
-
//status: true,
|
|
22
21
|
has2FA: true
|
|
23
|
-
//_test: true,
|
|
24
22
|
});
|
|
23
|
+
const selectedRows = ref([]);
|
|
25
24
|
</script>
|
|
26
25
|
|
|
27
26
|
<template>
|
|
28
27
|
<l-page>
|
|
29
28
|
<l-tabs route v-model="status">
|
|
30
29
|
<l-tab label="Active" name="active">
|
|
31
|
-
<l-table ref="table" row-key="user_id" @request-data="onRequest" :columns="columns"
|
|
32
|
-
:actions="['view', 'update', 'delete']"
|
|
30
|
+
<l-table ref="table" row-key="user_id" @request-data="onRequest" :columns="columns" name="user-active"
|
|
31
|
+
:actions="['view', 'update', 'delete']">
|
|
32
|
+
</l-table>
|
|
33
33
|
</l-tab>
|
|
34
34
|
<l-tab label="Inactive" name="inactive">
|
|
35
|
-
<l-table row-key="user_id" @request-data="onRequest" :columns="columns"
|
|
35
|
+
<l-table row-key="user_id" @request-data="onRequest" :columns="columns" name="user-inactive"
|
|
36
36
|
:actions="['view', 'update', 'delete']">
|
|
37
37
|
</l-table>
|
|
38
38
|
</l-tab>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostlink/nuxt-light",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.50.0",
|
|
4
4
|
"description": "HostLink Nuxt Light Framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
"json-to-graphql-query": "^2.3.0",
|
|
45
45
|
"nuxt-quasar-ui": "^2.1.12",
|
|
46
46
|
"quasar": "^2.18.5",
|
|
47
|
-
"vue-i18n": "^
|
|
47
|
+
"vue-i18n": "^11.1.12",
|
|
48
48
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@nuxt/devtools": "latest",
|
|
52
52
|
"@nuxt/eslint-config": "^0.2.0",
|
|
53
|
-
"@nuxt/kit": "^4.2.
|
|
54
|
-
"@nuxt/schema": "^4.2.
|
|
53
|
+
"@nuxt/kit": "^4.2.1",
|
|
54
|
+
"@nuxt/schema": "^4.2.1",
|
|
55
55
|
"@nuxt/test-utils": "^3.17.2",
|
|
56
56
|
"@types/node": "^22.5.0",
|
|
57
57
|
"changelogen": "^0.5.4",
|
|
58
58
|
"eslint": "^8.46.0",
|
|
59
|
-
"nuxt": "^4.2.
|
|
59
|
+
"nuxt": "^4.2.1",
|
|
60
60
|
"typescript": "^5.9.2",
|
|
61
61
|
"vue-tsc": "^2.2.8"
|
|
62
62
|
}
|