v-nuxt-ui 0.1.2 → 0.1.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/dist/module.json +1 -1
- package/dist/runtime/components/DeleteModal.d.vue.ts +2 -1
- package/dist/runtime/components/DeleteModal.vue.d.ts +2 -1
- package/dist/runtime/components/form/index.vue +1 -0
- package/dist/runtime/components/layout/ModuleMenu.vue +1 -0
- package/dist/runtime/components/layout/UserMenu.vue +1 -0
- package/dist/runtime/components/layout/default.vue +1 -0
- package/dist/runtime/components/table/query/order/Item.d.vue.ts +28 -0
- package/dist/runtime/components/table/query/order/Item.vue.d.ts +28 -0
- package/dist/runtime/components/table/query/order/Newer.d.vue.ts +25 -0
- package/dist/runtime/components/table/query/order/Newer.vue.d.ts +25 -0
- package/dist/runtime/composables/useAuth.d.ts +5 -5
- package/dist/runtime/composables/useAuth.js +1 -0
- package/dist/runtime/composables/usePermission.js +1 -0
- package/dist/runtime/composables/useSidebarMenu.d.ts +0 -36
- package/dist/runtime/composables/useSidebarMenu.js +1 -0
- package/dist/runtime/plugins/03.theme.js +1 -1
- package/dist/runtime/utils/request.d.ts +1 -1
- package/package.json +7 -3
- package/dist/runtime/components/table/query/order/item.d.vue.ts +0 -0
- package/dist/runtime/components/table/query/order/item.vue.d.ts +0 -0
- package/dist/runtime/components/table/query/order/newer.d.vue.ts +0 -0
- package/dist/runtime/components/table/query/order/newer.vue.d.ts +0 -0
- /package/dist/runtime/components/table/query/order/{item.vue → Item.vue} +0 -0
- /package/dist/runtime/components/table/query/order/{newer.vue → Newer.vue} +0 -0
package/dist/module.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { RequestResult } from '#v/types';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
ids: number[];
|
|
4
5
|
onDelete: ((ids: number[]) => Promise<{
|
|
5
|
-
data:
|
|
6
|
+
data: Ref<RequestResult<any>>;
|
|
6
7
|
}> | undefined) | undefined | null;
|
|
7
8
|
};
|
|
8
9
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { RequestResult } from '#v/types';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
2
3
|
type __VLS_Props = {
|
|
3
4
|
ids: number[];
|
|
4
5
|
onDelete: ((ids: number[]) => Promise<{
|
|
5
|
-
data:
|
|
6
|
+
data: Ref<RequestResult<any>>;
|
|
6
7
|
}> | undefined) | undefined | null;
|
|
7
8
|
};
|
|
8
9
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { useAuth, useApp } from "#v/composables";
|
|
3
3
|
import { useRoute } from "vue-router";
|
|
4
4
|
import { getEmojiFlag } from "#v/utils";
|
|
5
|
+
import { computed } from "vue";
|
|
5
6
|
defineProps({
|
|
6
7
|
collapsed: { type: Boolean, required: false },
|
|
7
8
|
headerMode: { type: Boolean, required: false }
|
|
@@ -10,6 +10,7 @@ import LayoutModuleMenu from "#v/components/layout/ModuleMenu.vue";
|
|
|
10
10
|
import LayoutThemePicker from "#v/components/layout/ThemePicker.vue";
|
|
11
11
|
import LayoutUserMenu from "#v/components/layout/UserMenu.vue";
|
|
12
12
|
import Watermark from "#v/components/Watermark.vue";
|
|
13
|
+
import { ref, watch } from "vue";
|
|
13
14
|
const open = ref(false);
|
|
14
15
|
const app = useApp();
|
|
15
16
|
const loginUser = useAuth().loginUser;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { OrderQueryOpr, OrderQueryOption, VColumn } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
|
+
field: string;
|
|
5
|
+
bizColumns: VColumn<T>[];
|
|
6
|
+
opr: OrderQueryOpr;
|
|
7
|
+
orderOptions: OrderQueryOption<any>[];
|
|
8
|
+
unselectedFields: string[];
|
|
9
|
+
} & {
|
|
10
|
+
onChange?: ((args_0: string, args_1: OrderQueryOpr) => any) | undefined;
|
|
11
|
+
onRemove?: (() => any) | undefined;
|
|
12
|
+
}> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: {}) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {};
|
|
18
|
+
emit: ((evt: "change", args_0: string, args_1: OrderQueryOpr) => void) & ((evt: "remove") => void);
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} : {
|
|
27
|
+
[K in keyof T as K]: T[K];
|
|
28
|
+
}) & {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { OrderQueryOpr, OrderQueryOption, VColumn } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
|
+
field: string;
|
|
5
|
+
bizColumns: VColumn<T>[];
|
|
6
|
+
opr: OrderQueryOpr;
|
|
7
|
+
orderOptions: OrderQueryOption<any>[];
|
|
8
|
+
unselectedFields: string[];
|
|
9
|
+
} & {
|
|
10
|
+
onChange?: ((args_0: string, args_1: OrderQueryOpr) => any) | undefined;
|
|
11
|
+
onRemove?: (() => any) | undefined;
|
|
12
|
+
}> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: {}) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {};
|
|
18
|
+
emit: ((evt: "change", args_0: string, args_1: OrderQueryOpr) => void) & ((evt: "remove") => void);
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} : {
|
|
27
|
+
[K in keyof T as K]: T[K];
|
|
28
|
+
}) & {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { OrderQueryOption, VColumn } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
|
+
options: OrderQueryOption<T>[];
|
|
5
|
+
unselectedFields: string[];
|
|
6
|
+
bizColumns: VColumn<T>[];
|
|
7
|
+
} & {
|
|
8
|
+
onNew?: ((args_0: string) => any) | undefined;
|
|
9
|
+
}> & (typeof globalThis extends {
|
|
10
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
11
|
+
} ? P : {});
|
|
12
|
+
expose: (exposed: {}) => void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {};
|
|
15
|
+
emit: (evt: "new", args_0: string) => void;
|
|
16
|
+
}>) => import("vue").VNode & {
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
22
|
+
[K in keyof T]: T[K];
|
|
23
|
+
} : {
|
|
24
|
+
[K in keyof T as K]: T[K];
|
|
25
|
+
}) & {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { OrderQueryOption, VColumn } from '#v/types';
|
|
2
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
|
+
options: OrderQueryOption<T>[];
|
|
5
|
+
unselectedFields: string[];
|
|
6
|
+
bizColumns: VColumn<T>[];
|
|
7
|
+
} & {
|
|
8
|
+
onNew?: ((args_0: string) => any) | undefined;
|
|
9
|
+
}> & (typeof globalThis extends {
|
|
10
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
11
|
+
} ? P : {});
|
|
12
|
+
expose: (exposed: {}) => void;
|
|
13
|
+
attrs: any;
|
|
14
|
+
slots: {};
|
|
15
|
+
emit: (evt: "new", args_0: string) => void;
|
|
16
|
+
}>) => import("vue").VNode & {
|
|
17
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
22
|
+
[K in keyof T]: T[K];
|
|
23
|
+
} : {
|
|
24
|
+
[K in keyof T as K]: T[K];
|
|
25
|
+
}) & {};
|
|
@@ -2,11 +2,11 @@ import type { UseFetchOptions } from 'nuxt/app';
|
|
|
2
2
|
import type { RouteLocationNormalizedLoadedGeneric } from 'vue-router';
|
|
3
3
|
export declare const useAuth: () => {
|
|
4
4
|
loginLoading: import("vue").Ref<boolean, boolean>;
|
|
5
|
-
isLoggedIn:
|
|
6
|
-
isUserInfoFetched: any
|
|
7
|
-
loginUser: any
|
|
8
|
-
loginUserRoles: any
|
|
9
|
-
loginUserMenus: any
|
|
5
|
+
isLoggedIn: import("vue").ComputedRef<boolean>;
|
|
6
|
+
isUserInfoFetched: import("vue").ComputedRef<any>;
|
|
7
|
+
loginUser: import("vue").Ref<any, any>;
|
|
8
|
+
loginUserRoles: import("vue").Ref<any, any>;
|
|
9
|
+
loginUserMenus: import("vue").Ref<any, any>;
|
|
10
10
|
logout: (route: RouteLocationNormalizedLoadedGeneric) => Promise<void>;
|
|
11
11
|
loginByUsernameAndPassword: (route: RouteLocationNormalizedLoadedGeneric, payload: Cmd.UsernamePasswordLoginPayload, redirect?: boolean) => Promise<void>;
|
|
12
12
|
initUserInfo: () => Promise<boolean>;
|
|
@@ -3,6 +3,7 @@ import { isEmptyString } from "#v/utils";
|
|
|
3
3
|
import { useLocalStorage, createSharedComposable } from "@vueuse/core";
|
|
4
4
|
import { useAuthApi, useLoading, useLoginApi, useRouterPush } from "./index.js";
|
|
5
5
|
import { useToast } from "@nuxt/ui/runtime/composables/useToast.js";
|
|
6
|
+
import { computed, ref } from "vue";
|
|
6
7
|
const _useAuth = () => {
|
|
7
8
|
const { loading: loginLoading, startLoading: startLoginLoading, endLoading: endLoginLoading } = useLoading();
|
|
8
9
|
const { toLogin, redirectFromLogin, toSecuritySettings } = useRouterPush();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSharedComposable } from "@vueuse/core";
|
|
2
2
|
import { useAuth } from "./useAuth.js";
|
|
3
|
+
import { ref, watch } from "vue";
|
|
3
4
|
export const _usePermission = () => {
|
|
4
5
|
const { loginUserRoles, loginUserMenus } = useAuth();
|
|
5
6
|
const permissions = ref(/* @__PURE__ */ new Set());
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { BreadcrumbItem, NavigationMenuItem } from '@nuxt/ui';
|
|
2
|
-
export declare function setGlobalSidebarMenus(opts: {
|
|
3
|
-
constantMenus?: NavigationMenuItem[];
|
|
4
|
-
bizMenus?: NavigationMenuItem[];
|
|
5
|
-
menuMode?: 'static' | 'dynamic';
|
|
6
|
-
}): void;
|
|
7
|
-
export declare const _useSidebarMenus: () => {
|
|
8
|
-
constantMenus: any;
|
|
9
|
-
constantMenuPathSet: any;
|
|
10
|
-
bizMenus: any;
|
|
11
|
-
flattenBizMenus: any;
|
|
12
|
-
bizMenuPathSet: any;
|
|
13
|
-
menusFromUser: any;
|
|
14
|
-
sidebarMenus: any;
|
|
15
|
-
sidebarMenuPathSet: any;
|
|
16
|
-
expandSidebarMenu: (path: string) => void;
|
|
17
|
-
setUserDynamicMenus: (newRolesFromUser: Model.Role[], newMenusFromUser: Model.Menu[]) => void;
|
|
18
|
-
disabledMenuPathSet: any;
|
|
19
|
-
breadcrumbs: any;
|
|
20
|
-
getBreadcrumbs: (current: string, menus?: NavigationMenuItem[]) => BreadcrumbItem[];
|
|
21
|
-
};
|
|
22
|
-
export declare const useSidebarMenus: () => {
|
|
23
|
-
constantMenus: any;
|
|
24
|
-
constantMenuPathSet: any;
|
|
25
|
-
bizMenus: any;
|
|
26
|
-
flattenBizMenus: any;
|
|
27
|
-
bizMenuPathSet: any;
|
|
28
|
-
menusFromUser: any;
|
|
29
|
-
sidebarMenus: any;
|
|
30
|
-
sidebarMenuPathSet: any;
|
|
31
|
-
expandSidebarMenu: (path: string) => void;
|
|
32
|
-
setUserDynamicMenus: (newRolesFromUser: Model.Role[], newMenusFromUser: Model.Menu[]) => void;
|
|
33
|
-
disabledMenuPathSet: any;
|
|
34
|
-
breadcrumbs: any;
|
|
35
|
-
getBreadcrumbs: (current: string, menus?: NavigationMenuItem[]) => BreadcrumbItem[];
|
|
36
|
-
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { flattenTree } from "#v/utils";
|
|
2
2
|
import { createSharedComposable } from "@vueuse/core";
|
|
3
3
|
import { useAuth } from "./useAuth.js";
|
|
4
|
+
import { ref, computed, watch } from "vue";
|
|
4
5
|
const constantMenus = ref([]);
|
|
5
6
|
const bizMenus = ref([]);
|
|
6
7
|
const menuMode = ref("static");
|
|
@@ -9,7 +9,7 @@ export default defineNuxtPlugin({
|
|
|
9
9
|
const customAppConfig = useLocalStorage(StorageKey.APP, defaultAppSettings);
|
|
10
10
|
function updateColor(type) {
|
|
11
11
|
const color = customAppConfig.value[type];
|
|
12
|
-
if (color) {
|
|
12
|
+
if (color && appConfig.ui?.colors) {
|
|
13
13
|
appConfig.ui.colors[type] = color;
|
|
14
14
|
}
|
|
15
15
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "v-nuxt-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Veken UI Component Library - Reusable Nuxt UI components, composables, and utilities for enterprise applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"style": "./dist/runtime/index.css",
|
|
@@ -32,19 +32,23 @@
|
|
|
32
32
|
"@nuxt/kit": "^4.3.1",
|
|
33
33
|
"dayjs": "^1.11.19",
|
|
34
34
|
"defu": "^6.1.4",
|
|
35
|
-
"maska": "^3.2.0"
|
|
36
|
-
"vue-router": "^5.0.4"
|
|
35
|
+
"maska": "^3.2.0"
|
|
37
36
|
},
|
|
38
37
|
"peerDependencies": {
|
|
39
38
|
"@nuxt/ui": "^4.5.0",
|
|
40
39
|
"@nuxtjs/i18n": "^10.2.3",
|
|
41
40
|
"@vueuse/nuxt": "^14.2.1",
|
|
42
41
|
"nuxt": "^4.3.1",
|
|
42
|
+
"tailwindcss": "^4.0.0",
|
|
43
|
+
"vue-router": "^4.5.0 || ^5.0.0",
|
|
43
44
|
"zod": "^4.3.6"
|
|
44
45
|
},
|
|
45
46
|
"peerDependenciesMeta": {
|
|
46
47
|
"zod": {
|
|
47
48
|
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"tailwindcss": {
|
|
51
|
+
"optional": true
|
|
48
52
|
}
|
|
49
53
|
},
|
|
50
54
|
"optionalDependencies": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|