@hostlink/nuxt-light 1.42.2 → 1.44.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 +3 -3
- package/dist/runtime/components/L/CustomField/Add.d.vue.ts +8 -0
- package/dist/runtime/components/L/CustomField/List.d.vue.ts +13 -0
- package/dist/runtime/components/L/Database/create-table-dialog.d.vue.ts +5 -0
- package/dist/runtime/components/L/Fieldset.d.vue.ts +16 -0
- package/dist/runtime/components/L/ForgetPasswordDialog.d.vue.ts +2 -0
- package/dist/runtime/components/L/Revision.d.vue.ts +9 -0
- package/dist/runtime/components/L/Storage.d.vue.ts +7 -0
- package/dist/runtime/components/L/System/Setting/authentication.d.vue.ts +19 -0
- package/dist/runtime/components/L/System/Setting/developer.d.vue.ts +13 -0
- package/dist/runtime/components/L/System/Setting/forget-password.d.vue.ts +15 -0
- package/dist/runtime/components/L/System/Setting/general.d.vue.ts +17 -0
- package/dist/runtime/components/L/System/Setting/mail.d.vue.ts +20 -0
- package/dist/runtime/components/L/System/Setting/modules.d.vue.ts +9 -0
- package/dist/runtime/components/L/System/Setting/security.d.vue.ts +33 -0
- package/dist/runtime/components/L/User/eventlog.d.vue.ts +6 -0
- package/dist/runtime/components/L/User/overview.d.vue.ts +12 -0
- package/dist/runtime/components/L/User/userlog.d.vue.ts +6 -0
- package/dist/runtime/components/L/ValidationInput.d.vue.ts +7 -0
- package/dist/runtime/components/MyTest.d.vue.ts +7 -0
- package/dist/runtime/components/l-add-btn.d.vue.ts +11 -0
- package/dist/runtime/components/l-alert.d.vue.ts +14 -0
- package/dist/runtime/components/l-app-main.d.vue.ts +18 -0
- package/dist/runtime/components/l-app-main.vue +3 -0
- package/dist/runtime/components/l-app-main.vue.d.ts +3 -1
- package/dist/runtime/components/l-app.d.vue.ts +11 -0
- package/dist/runtime/components/l-app.vue +5 -1
- package/dist/runtime/components/l-app.vue.d.ts +2 -0
- package/dist/runtime/components/l-audit-card.d.vue.ts +24 -0
- package/dist/runtime/components/l-back-btn.d.vue.ts +2 -0
- package/dist/runtime/components/l-banner.d.vue.ts +20 -0
- package/dist/runtime/components/l-bar.d.vue.ts +20 -0
- package/dist/runtime/components/l-btn.d.vue.ts +22 -0
- package/dist/runtime/components/l-card.d.vue.ts +42 -0
- package/dist/runtime/components/l-checkbox.d.vue.ts +13 -0
- package/dist/runtime/components/l-col.d.vue.ts +23 -0
- package/dist/runtime/components/l-customizer.d.vue.ts +20 -0
- package/dist/runtime/components/l-date-picker.d.vue.ts +49 -0
- package/dist/runtime/components/l-delete-btn.d.vue.ts +8 -0
- package/dist/runtime/components/l-dialog-database-field-add.d.vue.ts +5 -0
- package/dist/runtime/components/l-drag-drop-container.d.vue.ts +7 -0
- package/dist/runtime/components/l-drag-drop-group.d.vue.ts +14 -0
- package/dist/runtime/components/l-drag-drop.d.vue.ts +13 -0
- package/dist/runtime/components/l-edit-btn.d.vue.ts +2 -0
- package/dist/runtime/components/l-editor.d.vue.ts +15 -0
- package/dist/runtime/components/l-facebook-button.d.vue.ts +4 -0
- package/dist/runtime/components/l-fav-menu.d.vue.ts +9 -0
- package/dist/runtime/components/l-field.d.vue.ts +23 -0
- package/dist/runtime/components/l-file-manager-labels.d.vue.ts +4 -0
- package/dist/runtime/components/l-file-manager-move.d.vue.ts +8 -0
- package/dist/runtime/components/l-file-manager-preview.d.vue.ts +9 -0
- package/dist/runtime/components/l-file-manager.d.vue.ts +16 -0
- package/dist/runtime/components/l-file-upload.d.vue.ts +45 -0
- package/dist/runtime/components/l-file.d.vue.ts +25 -0
- package/dist/runtime/components/l-form-dialog.d.vue.ts +25 -0
- package/dist/runtime/components/l-form.d.vue.ts +74 -0
- package/dist/runtime/components/l-group-select.d.vue.ts +11 -0
- package/dist/runtime/components/l-icon-picker.d.vue.ts +20 -0
- package/dist/runtime/components/l-input-xlsx.d.vue.ts +10 -0
- package/dist/runtime/components/l-input.d.vue.ts +36 -0
- package/dist/runtime/components/l-item.d.vue.ts +28 -0
- package/dist/runtime/components/l-link.d.vue.ts +16 -0
- package/dist/runtime/components/l-list.d.vue.ts +21 -0
- package/dist/runtime/components/l-login.d.vue.ts +17 -0
- package/dist/runtime/components/l-menu.d.vue.ts +9 -0
- package/dist/runtime/components/l-microsoft-button.d.vue.ts +18 -0
- package/dist/runtime/components/l-page.d.vue.ts +29 -0
- package/dist/runtime/components/l-row.d.vue.ts +17 -0
- package/dist/runtime/components/l-save-btn.d.vue.ts +2 -0
- package/dist/runtime/components/l-select.d.vue.ts +17 -0
- package/dist/runtime/components/l-small-box.d.vue.ts +13 -0
- package/dist/runtime/components/l-statistic.d.vue.ts +9 -0
- package/dist/runtime/components/l-tab.d.vue.ts +13 -0
- package/dist/runtime/components/l-table.d.vue.ts +109 -0
- package/dist/runtime/components/l-table.vue +22 -45
- package/dist/runtime/components/l-table.vue.d.ts +1 -1
- package/dist/runtime/components/l-tabs.d.vue.ts +30 -0
- package/dist/runtime/components/l-test2.d.vue.ts +2 -0
- package/dist/runtime/components/l-time-picker.d.vue.ts +37 -0
- package/dist/runtime/components/l-view-btn.d.vue.ts +2 -0
- package/dist/runtime/composables/list.d.ts +3 -7
- package/dist/runtime/composables/list.js +3 -38
- package/dist/runtime/formkit/Checkbox.d.vue.ts +15 -0
- package/dist/runtime/formkit/DatePicker.d.vue.ts +15 -0
- package/dist/runtime/formkit/Editor.d.vue.ts +14 -0
- package/dist/runtime/formkit/File.d.vue.ts +15 -0
- package/dist/runtime/formkit/FilePicker.d.vue.ts +15 -0
- package/dist/runtime/formkit/FileUpload.d.vue.ts +15 -0
- package/dist/runtime/formkit/Form.d.vue.ts +24 -0
- package/dist/runtime/formkit/GroupSelect.d.vue.ts +15 -0
- package/dist/runtime/formkit/Input.d.vue.ts +22 -0
- package/dist/runtime/formkit/InputXlsx.d.vue.ts +14 -0
- package/dist/runtime/formkit/OptionGroup.d.vue.ts +7 -0
- package/dist/runtime/formkit/Radio.d.vue.ts +14 -0
- package/dist/runtime/formkit/Repeater.d.vue.ts +18 -0
- package/dist/runtime/formkit/Repeater.vue +32 -28
- package/dist/runtime/formkit/Select.d.vue.ts +15 -0
- package/dist/runtime/formkit/Textarea.d.vue.ts +22 -0
- package/dist/runtime/formkit/TimePicker.d.vue.ts +15 -0
- package/dist/runtime/formkit/Toggle.d.vue.ts +16 -0
- package/dist/runtime/pages/CustomField/[custom_field_id]/edit.d.vue.ts +2 -0
- package/dist/runtime/pages/CustomField/index.d.vue.ts +2 -0
- package/dist/runtime/pages/EventLog/_eventlog_id/view.d.vue.ts +2 -0
- package/dist/runtime/pages/EventLog/index.d.vue.ts +2 -0
- package/dist/runtime/pages/FileManager/index.d.vue.ts +2 -0
- package/dist/runtime/pages/MailLog/index.d.vue.ts +2 -0
- package/dist/runtime/pages/Permission/add.d.vue.ts +2 -0
- package/dist/runtime/pages/Permission/all.d.vue.ts +2 -0
- package/dist/runtime/pages/Permission/export.d.vue.ts +2 -0
- package/dist/runtime/pages/Permission/index.d.vue.ts +2 -0
- package/dist/runtime/pages/Role/_name/update-child.d.vue.ts +2 -0
- package/dist/runtime/pages/Role/add.d.vue.ts +2 -0
- package/dist/runtime/pages/Role/add2.d.vue.ts +2 -0
- package/dist/runtime/pages/Role/index.d.vue.ts +2 -0
- package/dist/runtime/pages/System/database/backup.d.vue.ts +2 -0
- package/dist/runtime/pages/System/database/process.d.vue.ts +2 -0
- package/dist/runtime/pages/System/database/restore.d.vue.ts +2 -0
- package/dist/runtime/pages/System/database/table.d.vue.ts +2 -0
- package/dist/runtime/pages/System/fs.d.vue.ts +2 -0
- package/dist/runtime/pages/System/index.d.vue.ts +2 -0
- package/dist/runtime/pages/System/mailtest.d.vue.ts +2 -0
- package/dist/runtime/pages/System/menu/index.d.vue.ts +2 -0
- package/dist/runtime/pages/System/package.d.vue.ts +2 -0
- package/dist/runtime/pages/System/phpinfo.d.vue.ts +2 -0
- package/dist/runtime/pages/System/setting.d.vue.ts +2 -0
- package/dist/runtime/pages/System/test.d.vue.ts +2 -0
- package/dist/runtime/pages/System/view_as.d.vue.ts +2 -0
- package/dist/runtime/pages/System/view_as.vue +14 -4
- package/dist/runtime/pages/SystemValue/_systemvalue_id/edit.d.vue.ts +2 -0
- package/dist/runtime/pages/SystemValue/add.d.vue.ts +2 -0
- package/dist/runtime/pages/SystemValue/index.d.vue.ts +2 -0
- package/dist/runtime/pages/Translate/index.d.vue.ts +2 -0
- package/dist/runtime/pages/User/_user_id/change-password.d.vue.ts +2 -0
- package/dist/runtime/pages/User/_user_id/edit.d.vue.ts +2 -0
- package/dist/runtime/pages/User/_user_id/update-role.d.vue.ts +2 -0
- package/dist/runtime/pages/User/_user_id/view.d.vue.ts +2 -0
- package/dist/runtime/pages/User/_user_id/view.vue +9 -5
- package/dist/runtime/pages/User/add.d.vue.ts +2 -0
- package/dist/runtime/pages/User/index.d.vue.ts +2 -0
- package/dist/runtime/pages/User/profile.d.vue.ts +2 -0
- package/dist/runtime/pages/User/setting/bio-auth.d.vue.ts +2 -0
- package/dist/runtime/pages/User/setting/index.d.vue.ts +2 -0
- package/dist/runtime/pages/User/setting/information.d.vue.ts +2 -0
- package/dist/runtime/pages/User/setting/my_favorite.d.vue.ts +2 -0
- package/dist/runtime/pages/User/setting/open_id.d.vue.ts +2 -0
- package/dist/runtime/pages/User/setting/password.d.vue.ts +2 -0
- package/dist/runtime/pages/User/setting/style.d.vue.ts +2 -0
- package/dist/runtime/pages/User/setting/two-factor-auth.d.vue.ts +2 -0
- package/dist/runtime/pages/User/setting.d.vue.ts +2 -0
- package/dist/runtime/pages/UserLog/index.d.vue.ts +2 -0
- package/dist/runtime/plugin.js +23 -1
- package/package.json +2 -2
- package/dist/runtime/composables/GQLFieldBuilder.d.ts +0 -1
- package/dist/runtime/composables/GQLFieldBuilder.js +0 -28
|
@@ -61,36 +61,40 @@ const cursor = ref("cursor-grab");
|
|
|
61
61
|
</style>
|
|
62
62
|
|
|
63
63
|
<template>
|
|
64
|
-
<
|
|
65
|
-
<
|
|
66
|
-
<
|
|
67
|
-
<
|
|
68
|
-
<q-item
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
<div class="col col-12 ">
|
|
65
|
+
<FormKit type="list" v-model="localValue" dynamic #default="{ items, node }" :name="node.name">
|
|
66
|
+
<q-list bordered separator ref="parent">
|
|
67
|
+
<FormKit type="group" v-for="(item, index) in items" :index="index" :key="item" #default="{ node }">
|
|
68
|
+
<q-item class="q-pa-xs">
|
|
69
|
+
<q-item-section avatar class="">
|
|
70
|
+
<div class="l-repeater-handle" v-if="sortable" :class="cursor"
|
|
71
|
+
@mousedown="cursor = 'cursor-grabbing'" @mouseup="cursor = 'cursor-grab'"
|
|
72
|
+
@mouseleave="cursor = 'cursor-grab'">
|
|
73
|
+
<q-icon name="sym_o_drag_indicator" :color="$light.color" size="sm" />
|
|
74
|
+
</div>
|
|
75
|
+
</q-item-section>
|
|
74
76
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
<q-item-section>
|
|
78
|
+
<slot v-bind="{ value: localValue[index], index: index, node: node }"></slot>
|
|
79
|
+
</q-item-section>
|
|
78
80
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
<q-item-section side>
|
|
82
|
+
<!-- up -->
|
|
83
|
+
<q-btn type="button" @click="onMoveUp(index)" icon="sym_o_arrow_upward"
|
|
84
|
+
:color="$light.color" dense flat :disable="!isAllowMoveUp(index)" />
|
|
83
85
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
<q-btn type="button" @click="onRemove(index)" icon="sym_o_delete" :color="$light.color"
|
|
87
|
+
dense :disable="!isAllowRemove" flat />
|
|
88
|
+
<!-- down -->
|
|
89
|
+
<q-btn type="button" @click="onMoveDown(index)" icon="sym_o_arrow_downward"
|
|
90
|
+
:color="$light.color" dense flat :disable="!isAllowMoveDown(index)" />
|
|
89
91
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
</q-item-section>
|
|
93
|
+
</q-item>
|
|
94
|
+
</FormKit>
|
|
95
|
+
</q-list>
|
|
96
|
+
<q-btn @click="onAdd" :label="addLabel" icon="sym_o_add" :color="$light.color" outline class="q-mt-sm"
|
|
97
|
+
:disable="localValue.length >= max" />
|
|
98
|
+
</FormKit>
|
|
99
|
+
</div>
|
|
96
100
|
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
+
context?: Record<string, any> | undefined;
|
|
8
|
+
$props: {
|
|
9
|
+
readonly context?: Record<string, any> | undefined;
|
|
10
|
+
};
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
type __VLS_Slots = {
|
|
13
|
+
[x: string]: ((props: any) => any) | undefined;
|
|
14
|
+
[x: number]: ((props: any) => any) | undefined;
|
|
15
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare var __VLS_11: string | number, __VLS_12: any;
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
[K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
context: {
|
|
7
|
+
type: ObjectConstructor;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
context: {
|
|
12
|
+
type: ObjectConstructor;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {
|
|
7
|
+
context?: Record<string, any> | undefined;
|
|
8
|
+
$props: {
|
|
9
|
+
readonly context?: Record<string, any> | undefined;
|
|
10
|
+
};
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
type __VLS_Slots = {
|
|
13
|
+
[x: string]: ((props: any) => any) | undefined;
|
|
14
|
+
[x: number]: ((props: any) => any) | undefined;
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare var __VLS_6: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_6) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
context: ObjectConstructor;
|
|
7
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
context: ObjectConstructor;
|
|
9
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -2,25 +2,34 @@
|
|
|
2
2
|
import { list, m, useLight } from "#imports";
|
|
3
3
|
import { ref, computed } from "vue";
|
|
4
4
|
const light = useLight();
|
|
5
|
-
let
|
|
5
|
+
let users = await list("User", {
|
|
6
|
+
user_id: true,
|
|
7
|
+
username: true,
|
|
8
|
+
name: true,
|
|
9
|
+
roles: true,
|
|
10
|
+
email: true
|
|
11
|
+
}).fetch();
|
|
6
12
|
let columns = [
|
|
7
13
|
{
|
|
8
14
|
label: "Username",
|
|
9
15
|
name: "username",
|
|
10
16
|
field: "username",
|
|
11
|
-
align: "left"
|
|
17
|
+
align: "left",
|
|
18
|
+
sortable: true
|
|
12
19
|
},
|
|
13
20
|
{
|
|
14
21
|
name: "name",
|
|
15
22
|
label: "Name",
|
|
16
23
|
field: "name",
|
|
17
|
-
align: "left"
|
|
24
|
+
align: "left",
|
|
25
|
+
sortable: true
|
|
18
26
|
},
|
|
19
27
|
{
|
|
20
28
|
name: "email",
|
|
21
29
|
label: "Email",
|
|
22
30
|
align: "left",
|
|
23
|
-
field: "email"
|
|
31
|
+
field: "email",
|
|
32
|
+
sortable: true
|
|
24
33
|
},
|
|
25
34
|
{
|
|
26
35
|
name: "roles",
|
|
@@ -65,6 +74,7 @@ const filtered = computed(() => {
|
|
|
65
74
|
Use this page to view the system as another user. This is useful for testing permissions.
|
|
66
75
|
</q-banner>
|
|
67
76
|
|
|
77
|
+
|
|
68
78
|
<q-table flat :columns="columns" :rows="filtered" :rows-per-page-options="[0]" dense bordered="">
|
|
69
79
|
<template v-slot:top-right>
|
|
70
80
|
<q-input outlined dense debounce="300" v-model="filter" placeholder="Search" clearable>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useLight, m } from "#imports";
|
|
2
|
+
import { useLight, m, list } from "#imports";
|
|
3
3
|
import { useRoute } from "vue-router";
|
|
4
|
+
import { useAsyncData } from "#imports";
|
|
4
5
|
const route = useRoute();
|
|
5
|
-
const { data: obj } = await useAsyncData(async () => {
|
|
6
|
-
|
|
6
|
+
const { data: obj } = await useAsyncData("user-view-" + route.params.user_id, async () => {
|
|
7
|
+
console.log("fetching user", route.params.user_id);
|
|
8
|
+
return await list("User", {
|
|
7
9
|
canUpdate: true,
|
|
8
10
|
canDelete: true
|
|
9
|
-
}).where("user_id", route.params.user_id).
|
|
11
|
+
}).where("user_id", route.params.user_id).fetchFirst();
|
|
10
12
|
});
|
|
11
13
|
const light = useLight();
|
|
12
14
|
const id = route.params.user_id;
|
|
@@ -35,7 +37,9 @@ const reset2fa = async () => {
|
|
|
35
37
|
</script>
|
|
36
38
|
|
|
37
39
|
<template>
|
|
38
|
-
<l-page :edit-btn="obj.canUpdate">
|
|
40
|
+
<l-page :edit-btn="obj.canUpdate" v-if="obj">
|
|
41
|
+
|
|
42
|
+
|
|
39
43
|
|
|
40
44
|
<template #header>
|
|
41
45
|
<l-btn to="change-password" icon="sym_o_key" permission="user.changePassword"
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import QMarkdownVuePlugin from "@quasar/quasar-ui-qmarkdown";
|
|
2
2
|
import "@quasar/quasar-ui-qmarkdown/dist/index.css";
|
|
3
|
+
import { q } from "#imports";
|
|
3
4
|
import { createI18n } from "vue-i18n";
|
|
4
5
|
import createLight from "./composables/createLight.js";
|
|
5
|
-
import { defineNuxtPlugin, useRoute } from "#app";
|
|
6
|
+
import { addRouteMiddleware, defineNuxtPlugin, navigateTo, useRoute } from "#app";
|
|
6
7
|
import "./assets/main.css";
|
|
7
8
|
import message_en from "./locales/en.json";
|
|
8
9
|
import message_zh from "./locales/zh-hk.json";
|
|
@@ -21,6 +22,27 @@ import TypeEventLog from "./types/EventLog.js";
|
|
|
21
22
|
import TypeCustomerField from "./model/CustomField.js";
|
|
22
23
|
import { zhTW } from "@formkit/i18n";
|
|
23
24
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
25
|
+
addRouteMiddleware("auth", async (to, from) => {
|
|
26
|
+
if (to.path == "/") {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const { my } = await q({
|
|
30
|
+
my: {
|
|
31
|
+
allowedPath: {
|
|
32
|
+
__args: {
|
|
33
|
+
path: to.path
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
if (!my) {
|
|
39
|
+
await navigateTo("/");
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
if (!my.allowedPath) {
|
|
43
|
+
return "/page_not_found?path=" + encodeURIComponent(to.fullPath);
|
|
44
|
+
}
|
|
45
|
+
}, { global: true });
|
|
24
46
|
api.axios.defaults.baseURL = getApiBase();
|
|
25
47
|
api.models.create(TypeCustomerField.name, TypeCustomerField.fields);
|
|
26
48
|
api.models.create("User", TypeUser);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostlink/nuxt-light",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.0",
|
|
4
4
|
"description": "HostLink Nuxt Light Framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@azure/msal-browser": "^3.26.1",
|
|
34
34
|
"@formkit/drag-and-drop": "^0.5.3",
|
|
35
|
-
"@hostlink/light": "^2.
|
|
35
|
+
"@hostlink/light": "^2.11.2",
|
|
36
36
|
"@nuxt/module-builder": "^1.0.1",
|
|
37
37
|
"@quasar/extras": "^1.17.0",
|
|
38
38
|
"@quasar/quasar-ui-qmarkdown": "^2.0.5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function (): any;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { toQuery } from "@hostlink/light";
|
|
2
|
-
import { defu } from "defu";
|
|
3
|
-
export default function() {
|
|
4
|
-
let fields = {};
|
|
5
|
-
return {
|
|
6
|
-
//deep merge
|
|
7
|
-
merge: defu,
|
|
8
|
-
add: (f) => {
|
|
9
|
-
if (typeof f === "string") {
|
|
10
|
-
fields = defu(fields, { [f]: true });
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (Array.isArray(f)) {
|
|
14
|
-
f.forEach((item) => {
|
|
15
|
-
fields = defu(fields, { [item]: true });
|
|
16
|
-
});
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (typeof f === "object") {
|
|
20
|
-
fields = defu(fields, toQuery(f));
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
get() {
|
|
25
|
-
return fields;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|