@yeepay/yee-boss-ui 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -59
- package/dist/PlatformConfigProvider-BwqlDDcK.js +34 -0
- package/dist/YeeDescriptions-BZ33odSs.js +128 -0
- package/dist/YeeEllipsisText-CR94Jym2.js +100 -0
- package/dist/YeeFileUpload-DvRN1D-j.js +196 -0
- package/dist/YeePage-Dbvn1TNi.js +99 -0
- package/dist/YeeTabs-BPzlkZy6.js +891 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-shell.d.ts +2 -0
- package/dist/app-shell.js +20 -0
- package/dist/components/app-shell/YeeAppShell.vue.d.ts +28 -0
- package/dist/components/app-shell/YeeHeader.vue.d.ts +40 -0
- package/dist/components/app-shell/YeeMenu.vue.d.ts +32 -0
- package/dist/components/app-shell/YeeSidebar.vue.d.ts +35 -0
- package/dist/components/app-shell/YeeTabs.vue.d.ts +69 -0
- package/dist/components/app-shell/index.d.ts +6 -0
- package/dist/components/app-shell/types.d.ts +258 -0
- package/dist/components/app-shell/use-tabs-drag.d.ts +7 -0
- package/dist/components/app-shell/use-tabs-scroll.d.ts +15 -0
- package/dist/components/grid/types.d.ts +1 -4
- package/dist/components/grid/vxe-init.d.ts +1 -1
- package/dist/components/modal/YeeModal.vue.d.ts +3 -3
- package/dist/context-C5gszWl6.js +4 -0
- package/dist/context-DJQ4f46a.js +12 -0
- package/dist/core.d.ts +8 -0
- package/dist/core.js +14 -0
- package/dist/descriptions.d.ts +1 -0
- package/dist/descriptions.js +4 -0
- package/dist/ellipsis-text.d.ts +1 -0
- package/dist/ellipsis-text.js +4 -0
- package/dist/file-upload.d.ts +1 -0
- package/dist/file-upload.js +4 -0
- package/dist/form-api-DbIL_dvg.js +201 -0
- package/dist/form.d.ts +1 -0
- package/dist/form.js +5 -0
- package/dist/grid.d.ts +1 -0
- package/dist/grid.js +5 -0
- package/dist/index-DZP16zRG.js +261 -0
- package/dist/index-kF3hvw2Z.js +132 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +36 -2206
- package/dist/modal.d.ts +1 -0
- package/dist/modal.js +4 -0
- package/dist/page.d.ts +1 -0
- package/dist/page.js +4 -0
- package/dist/platform-message-BgD7E-34.js +22 -0
- package/dist/select.d.ts +1 -0
- package/dist/select.js +4 -0
- package/dist/style.css +1 -1
- package/dist/use-yee-grid-rYoenViE.js +464 -0
- package/package.json +68 -24
- package/dist/components/file-preview/YeeFilePreview.vue.d.ts +0 -23
- package/dist/components/file-preview/index.d.ts +0 -2
- package/dist/components/file-preview/source.d.ts +0 -8
- package/dist/components/file-preview/types.d.ts +0 -70
- package/dist/components/file-preview/useFilePreview.d.ts +0 -31
- package/dist/docx-preview.min-lCFRKxYn.js +0 -4852
- package/dist/marked.esm-DaHdfxOj.js +0 -1563
- package/dist/postal-mime-CPJ2QXsD.js +0 -3219
- package/dist/purify.es-HJ4qIUVZ.js +0 -869
- package/dist/xlsx-CF422ARu.js +0 -24728
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { C as s, P as r } from "./PlatformConfigProvider-BwqlDDcK.js";
|
|
2
|
+
import { d as m, l as t, r as T, t as l, a as f } from "./tokens-Dw6w0SSs.js";
|
|
3
|
+
import { p, u as Y } from "./context-DJQ4f46a.js";
|
|
4
|
+
import { Y as i, a as n, b as P, c as A, d as C } from "./YeeTabs-BPzlkZy6.js";
|
|
5
|
+
export {
|
|
6
|
+
s as CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT,
|
|
7
|
+
r as PlatformConfigProvider,
|
|
8
|
+
i as YeeAppShell,
|
|
9
|
+
n as YeeHeader,
|
|
10
|
+
P as YeeMenu,
|
|
11
|
+
A as YeeSidebar,
|
|
12
|
+
C as YeeTabs,
|
|
13
|
+
m as darkThemeTokens,
|
|
14
|
+
t as lightThemeTokens,
|
|
15
|
+
p as platformThemeKey,
|
|
16
|
+
T as resolvePlatformTheme,
|
|
17
|
+
l as toAntDesignTheme,
|
|
18
|
+
f as toPlatformCssVariables,
|
|
19
|
+
Y as usePlatformTheme
|
|
20
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { YeeAppShellProps, YeeAppShellSlots } from './types';
|
|
2
|
+
type __VLS_Props = YeeAppShellProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'sidebarCollapsed'?: boolean;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Readonly<YeeAppShellSlots> & YeeAppShellSlots;
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLDivElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
"update:sidebarCollapsed": (value: boolean) => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:sidebarCollapsed"?: (value: boolean) => any;
|
|
17
|
+
}>, {
|
|
18
|
+
headerHeight: import('./types').YeeLayoutSize;
|
|
19
|
+
sidebarWidth: import('./types').YeeLayoutSize;
|
|
20
|
+
sidebarCollapsedWidth: import('./types').YeeLayoutSize;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { YeeHeaderProps, YeeHeaderSlots } from './types';
|
|
2
|
+
type __VLS_Props = YeeHeaderProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'sidebarCollapsed'?: boolean;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Readonly<YeeHeaderSlots> & YeeHeaderSlots;
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
refresh: () => any;
|
|
15
|
+
"update:sidebarCollapsed": (value: boolean) => any;
|
|
16
|
+
themeChange: (mode: import('../..').PlatformThemeMode) => any;
|
|
17
|
+
fullscreenChange: (isFullscreen: boolean) => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
|
+
onRefresh?: () => any;
|
|
20
|
+
"onUpdate:sidebarCollapsed"?: (value: boolean) => any;
|
|
21
|
+
onThemeChange?: (mode: import('../..').PlatformThemeMode) => any;
|
|
22
|
+
onFullscreenChange?: (isFullscreen: boolean) => any;
|
|
23
|
+
}>, {
|
|
24
|
+
headerHeight: import('./types').YeeLayoutSize;
|
|
25
|
+
sidebarWidth: import('./types').YeeLayoutSize;
|
|
26
|
+
sidebarCollapsedWidth: import('./types').YeeLayoutSize;
|
|
27
|
+
showSidebarToggle: boolean;
|
|
28
|
+
showRefresh: boolean;
|
|
29
|
+
showThemeToggle: boolean;
|
|
30
|
+
showFullscreen: boolean;
|
|
31
|
+
logo: string;
|
|
32
|
+
logoAlt: string;
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
34
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { YeeMenuItem, YeeMenuProps, YeeMenuSlots } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<YeeMenuSlots> & YeeMenuSlots;
|
|
5
|
+
refs: {};
|
|
6
|
+
rootEl: any;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<YeeMenuProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
select: (key: string) => any;
|
|
11
|
+
click: (key: string) => any;
|
|
12
|
+
openChange: (keys: string[]) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<YeeMenuProps> & Readonly<{
|
|
14
|
+
onSelect?: (key: string) => any;
|
|
15
|
+
onClick?: (key: string) => any;
|
|
16
|
+
onOpenChange?: (keys: string[]) => any;
|
|
17
|
+
}>, {
|
|
18
|
+
mode: "inline" | "vertical" | "horizontal";
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
items: readonly YeeMenuItem[];
|
|
21
|
+
collapsed: boolean;
|
|
22
|
+
inlineIndent: number;
|
|
23
|
+
selectable: boolean;
|
|
24
|
+
multiple: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { YeeSidebarProps, YeeSidebarSlots } from './types';
|
|
2
|
+
type __VLS_Props = YeeSidebarProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'collapsed'?: boolean;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Readonly<YeeSidebarSlots> & YeeSidebarSlots;
|
|
9
|
+
refs: {};
|
|
10
|
+
rootEl: HTMLElement;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
select: (key: string) => any;
|
|
15
|
+
click: (key: string) => any;
|
|
16
|
+
openChange: (keys: string[]) => any;
|
|
17
|
+
"update:collapsed": (value: boolean) => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
19
|
+
onSelect?: (key: string) => any;
|
|
20
|
+
onClick?: (key: string) => any;
|
|
21
|
+
onOpenChange?: (keys: string[]) => any;
|
|
22
|
+
"onUpdate:collapsed"?: (value: boolean) => any;
|
|
23
|
+
}>, {
|
|
24
|
+
width: import('./types').YeeLayoutSize;
|
|
25
|
+
items: readonly import('./types').YeeMenuItem[];
|
|
26
|
+
collapsedWidth: import('./types').YeeLayoutSize;
|
|
27
|
+
ariaLabel: string;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
29
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { YeeTabItem, YeeTabsProps, YeeTabsSlots } from './types';
|
|
2
|
+
type __VLS_Props = YeeTabsProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
'activeKey'?: string | undefined;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Readonly<YeeTabsSlots> & YeeTabsSlots;
|
|
9
|
+
refs: {
|
|
10
|
+
tabsList: HTMLDivElement;
|
|
11
|
+
};
|
|
12
|
+
rootEl: HTMLDivElement;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
16
|
+
activateTab: (key: string) => boolean;
|
|
17
|
+
closeTab: (key: string) => boolean;
|
|
18
|
+
closeLeftTabs: (key?: string) => boolean;
|
|
19
|
+
closeRightTabs: (key?: string) => boolean;
|
|
20
|
+
closeOtherTabs: (key?: string) => boolean;
|
|
21
|
+
closeAllTabs: () => boolean;
|
|
22
|
+
getTabs: () => readonly YeeTabItem[];
|
|
23
|
+
getTab: (key: string) => YeeTabItem | undefined;
|
|
24
|
+
pinTab: (key: string, pinned?: boolean) => boolean;
|
|
25
|
+
refreshTab: (key?: string) => boolean;
|
|
26
|
+
openTabInNewWindow: (key?: string) => boolean;
|
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
+
close: (key: string) => any;
|
|
29
|
+
pin: (payload: import('./types').YeeTabsPinPayload) => any;
|
|
30
|
+
refresh: (key: string) => any;
|
|
31
|
+
change: (key: string) => any;
|
|
32
|
+
closeAll: () => any;
|
|
33
|
+
closeLeft: (key: string) => any;
|
|
34
|
+
closeOthers: (key: string) => any;
|
|
35
|
+
closeRight: (key: string) => any;
|
|
36
|
+
openInNewWindow: (key: string) => any;
|
|
37
|
+
sortTabs: (oldIndex: number, newIndex: number) => any;
|
|
38
|
+
"update:activeKey": (value: string | undefined) => any;
|
|
39
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
40
|
+
onClose?: (key: string) => any;
|
|
41
|
+
onPin?: (payload: import('./types').YeeTabsPinPayload) => any;
|
|
42
|
+
onRefresh?: (key: string) => any;
|
|
43
|
+
onChange?: (key: string) => any;
|
|
44
|
+
onCloseAll?: () => any;
|
|
45
|
+
onCloseLeft?: (key: string) => any;
|
|
46
|
+
onCloseOthers?: (key: string) => any;
|
|
47
|
+
onCloseRight?: (key: string) => any;
|
|
48
|
+
onOpenInNewWindow?: (key: string) => any;
|
|
49
|
+
onSortTabs?: (oldIndex: number, newIndex: number) => any;
|
|
50
|
+
"onUpdate:activeKey"?: (value: string | undefined) => any;
|
|
51
|
+
}>, {
|
|
52
|
+
items: readonly YeeTabItem[];
|
|
53
|
+
draggable: boolean;
|
|
54
|
+
closable: boolean;
|
|
55
|
+
middleClickToClose: boolean;
|
|
56
|
+
showClose: boolean;
|
|
57
|
+
showIcon: boolean;
|
|
58
|
+
showActions: boolean;
|
|
59
|
+
wheelable: boolean;
|
|
60
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
61
|
+
tabsList: HTMLDivElement;
|
|
62
|
+
}, HTMLDivElement>;
|
|
63
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
64
|
+
export default _default;
|
|
65
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$slots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as YeeAppShell } from './YeeAppShell.vue';
|
|
2
|
+
export { default as YeeHeader } from './YeeHeader.vue';
|
|
3
|
+
export { default as YeeMenu } from './YeeMenu.vue';
|
|
4
|
+
export { default as YeeSidebar } from './YeeSidebar.vue';
|
|
5
|
+
export { default as YeeTabs } from './YeeTabs.vue';
|
|
6
|
+
export type { YeeAppShellProps, YeeAppShellSlots, YeeHeaderProps, YeeHeaderEmits, YeeHeaderSlots, YeeMenuEmits, YeeLayoutSize, YeeMenuItem, YeeMenuProps, YeeMenuSlots, YeeSidebarEmits, YeeSidebarProps, YeeSidebarSlots, YeeTabsAction, YeeTabsEmits, YeeTabsExpose, YeeTabsMenuContext, YeeTabsMenuItem, YeeTabsMenuResolver, YeeTabsPinPayload, YeeTabItem, YeeTabsProps, YeeTabsSlots, } from './types';
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { Component, VNodeChild } from 'vue';
|
|
2
|
+
import { PlatformThemeMode } from '../../theme/types';
|
|
3
|
+
/** Layout 尺寸,数字会按 px 处理,字符串可以传入任意合法 CSS 尺寸。 */
|
|
4
|
+
export type YeeLayoutSize = number | string;
|
|
5
|
+
/** Sidebar 使用的通用菜单项,不包含路由或权限行为。 */
|
|
6
|
+
export interface YeeMenuItem {
|
|
7
|
+
/** 菜单稳定键。 */
|
|
8
|
+
key: string;
|
|
9
|
+
/** 菜单展示文本。 */
|
|
10
|
+
label: string;
|
|
11
|
+
/** 菜单图标组件;一级菜单未传时默认使用 MenuOutlined。 */
|
|
12
|
+
icon?: Component;
|
|
13
|
+
/** 是否禁用当前菜单。 */
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/** 子菜单项。 */
|
|
16
|
+
children?: readonly YeeMenuItem[];
|
|
17
|
+
}
|
|
18
|
+
/** YeeAppShell 的公开属性。 */
|
|
19
|
+
export interface YeeAppShellProps {
|
|
20
|
+
/** 顶部区域高度。 */
|
|
21
|
+
headerHeight?: YeeLayoutSize;
|
|
22
|
+
/** Sidebar 展开宽度,默认 224px。 */
|
|
23
|
+
sidebarWidth?: YeeLayoutSize;
|
|
24
|
+
/** Sidebar 收起宽度,默认 64px。 */
|
|
25
|
+
sidebarCollapsedWidth?: YeeLayoutSize;
|
|
26
|
+
}
|
|
27
|
+
/** YeeAppShell 的公开插槽。 */
|
|
28
|
+
export interface YeeAppShellSlots {
|
|
29
|
+
/** 顶部区域。 */
|
|
30
|
+
header?: () => VNodeChild;
|
|
31
|
+
/** 左侧区域。 */
|
|
32
|
+
sidebar?: () => VNodeChild;
|
|
33
|
+
/** 业务内容区域。 */
|
|
34
|
+
default?: () => VNodeChild;
|
|
35
|
+
}
|
|
36
|
+
/** YeeHeader 的公开属性。 */
|
|
37
|
+
export interface YeeHeaderProps {
|
|
38
|
+
/** 顶部区域高度,默认 50px。 */
|
|
39
|
+
headerHeight?: YeeLayoutSize;
|
|
40
|
+
/** Sidebar 展开宽度,默认 224px。 */
|
|
41
|
+
sidebarWidth?: YeeLayoutSize;
|
|
42
|
+
/** Sidebar 收起宽度,默认 64px。 */
|
|
43
|
+
sidebarCollapsedWidth?: YeeLayoutSize;
|
|
44
|
+
/** 是否展示 Sidebar 收起/展开按钮。 */
|
|
45
|
+
showSidebarToggle?: boolean;
|
|
46
|
+
/** 是否展示刷新按钮,默认展示。 */
|
|
47
|
+
showRefresh?: boolean;
|
|
48
|
+
/** 是否展示主题切换按钮,默认展示。 */
|
|
49
|
+
showThemeToggle?: boolean;
|
|
50
|
+
/** 是否展示全屏切换按钮,默认展示。 */
|
|
51
|
+
showFullscreen?: boolean;
|
|
52
|
+
/** 当前主题模式;未传时读取 PlatformConfigProvider 的主题。 */
|
|
53
|
+
themeMode?: PlatformThemeMode;
|
|
54
|
+
/** 默认品牌 Logo 地址;需要自定义内容时使用 logo 插槽。 */
|
|
55
|
+
logo?: string;
|
|
56
|
+
/** 默认品牌标题;需要自定义内容时使用 title 插槽。 */
|
|
57
|
+
title?: string;
|
|
58
|
+
/** Logo 的替代文本。 */
|
|
59
|
+
logoAlt?: string;
|
|
60
|
+
}
|
|
61
|
+
/** YeeHeader 的公开插槽。 */
|
|
62
|
+
export interface YeeHeaderSlots {
|
|
63
|
+
/** 完整替换左侧品牌区域;使用后 logo/title 插槽不再参与渲染。 */
|
|
64
|
+
brand?: () => VNodeChild;
|
|
65
|
+
/** 左侧 Logo 区域,默认展示 logo 属性。 */
|
|
66
|
+
logo?: () => VNodeChild;
|
|
67
|
+
/** 左侧标题区域,默认展示 title 属性。 */
|
|
68
|
+
title?: () => VNodeChild;
|
|
69
|
+
/** 位于 Sidebar 按钮右侧的自定义内容区域。 */
|
|
70
|
+
content?: () => VNodeChild;
|
|
71
|
+
/** 右侧操作区域。 */
|
|
72
|
+
actions?: () => VNodeChild;
|
|
73
|
+
}
|
|
74
|
+
/** YeeHeader 的公开事件。 */
|
|
75
|
+
export interface YeeHeaderEmits {
|
|
76
|
+
refresh: [];
|
|
77
|
+
themeChange: [mode: PlatformThemeMode];
|
|
78
|
+
fullscreenChange: [isFullscreen: boolean];
|
|
79
|
+
}
|
|
80
|
+
/** YeeSidebar 的公开属性。 */
|
|
81
|
+
export interface YeeSidebarProps {
|
|
82
|
+
/** 通用菜单项。 */
|
|
83
|
+
items?: readonly YeeMenuItem[];
|
|
84
|
+
/** 当前选中的菜单键。 */
|
|
85
|
+
selectedKeys?: readonly string[];
|
|
86
|
+
/** 当前展开的菜单键;同一时间只保留当前父级菜单。 */
|
|
87
|
+
openKeys?: readonly string[];
|
|
88
|
+
/** Sidebar 展开宽度,默认 224px。 */
|
|
89
|
+
width?: YeeLayoutSize;
|
|
90
|
+
/** Sidebar 收起宽度,默认 64px。 */
|
|
91
|
+
collapsedWidth?: YeeLayoutSize;
|
|
92
|
+
/** Sidebar 导航区域的无障碍标签。 */
|
|
93
|
+
ariaLabel?: string;
|
|
94
|
+
}
|
|
95
|
+
/** YeeSidebar 的公开事件。 */
|
|
96
|
+
export interface YeeSidebarEmits {
|
|
97
|
+
click: [key: string];
|
|
98
|
+
select: [key: string];
|
|
99
|
+
openChange: [keys: string[]];
|
|
100
|
+
}
|
|
101
|
+
/** YeeSidebar 的公开插槽。 */
|
|
102
|
+
export interface YeeSidebarSlots {
|
|
103
|
+
/** 菜单区域;未提供时默认渲染 YeeMenu。 */
|
|
104
|
+
default?: () => VNodeChild;
|
|
105
|
+
/** 固定在菜单区域底部的扩展内容。 */
|
|
106
|
+
extra?: () => VNodeChild;
|
|
107
|
+
}
|
|
108
|
+
/** YeeMenu 的公开属性。 */
|
|
109
|
+
export interface YeeMenuProps {
|
|
110
|
+
/** 通用菜单项。 */
|
|
111
|
+
items?: readonly YeeMenuItem[];
|
|
112
|
+
/** 当前选中的菜单键。 */
|
|
113
|
+
selectedKeys?: readonly string[];
|
|
114
|
+
/** 当前展开的菜单键;同一时间只保留当前父级菜单。 */
|
|
115
|
+
openKeys?: readonly string[];
|
|
116
|
+
/** 是否使用收起后的菜单展示。 */
|
|
117
|
+
collapsed?: boolean;
|
|
118
|
+
/** 菜单模式。 */
|
|
119
|
+
mode?: 'inline' | 'vertical' | 'horizontal';
|
|
120
|
+
/** 菜单项内容的左侧缩进,单位 px。 */
|
|
121
|
+
inlineIndent?: number;
|
|
122
|
+
/** 是否允许选择菜单项。 */
|
|
123
|
+
selectable?: boolean;
|
|
124
|
+
/** 是否允许同时选择多个菜单项。 */
|
|
125
|
+
multiple?: boolean;
|
|
126
|
+
/** 是否禁用整个菜单。 */
|
|
127
|
+
disabled?: boolean;
|
|
128
|
+
}
|
|
129
|
+
/** YeeMenu 的公开事件。 */
|
|
130
|
+
export interface YeeMenuEmits {
|
|
131
|
+
click: [key: string];
|
|
132
|
+
select: [key: string];
|
|
133
|
+
openChange: [keys: string[]];
|
|
134
|
+
}
|
|
135
|
+
/** YeeMenu 的公开插槽。 */
|
|
136
|
+
export interface YeeMenuSlots {
|
|
137
|
+
/** 自定义菜单项内容。 */
|
|
138
|
+
item?: (props: {
|
|
139
|
+
item: YeeMenuItem;
|
|
140
|
+
}) => VNodeChild;
|
|
141
|
+
}
|
|
142
|
+
/** YeeTabs 的标签项。 */
|
|
143
|
+
export interface YeeTabItem {
|
|
144
|
+
/** 标签稳定键。 */
|
|
145
|
+
key: string;
|
|
146
|
+
/** 标签展示文本。 */
|
|
147
|
+
label: string;
|
|
148
|
+
/** 标签图标组件。 */
|
|
149
|
+
icon?: Component;
|
|
150
|
+
/** 是否允许关闭,默认允许。 */
|
|
151
|
+
closable?: boolean;
|
|
152
|
+
/** 是否固定在标签列表中;固定标签不能关闭或拖拽。 */
|
|
153
|
+
pinned?: boolean;
|
|
154
|
+
/** 是否禁用标签。 */
|
|
155
|
+
disabled?: boolean;
|
|
156
|
+
}
|
|
157
|
+
/** YeeTabs 标签操作。 */
|
|
158
|
+
export type YeeTabsAction = 'close' | 'close-all' | 'close-left' | 'close-others' | 'close-right' | 'open-new-window' | 'pin' | 'refresh';
|
|
159
|
+
/** 标签菜单解析时可用的上下文。 */
|
|
160
|
+
export interface YeeTabsMenuContext {
|
|
161
|
+
/** 当前标签在列表中的索引。 */
|
|
162
|
+
index: number;
|
|
163
|
+
/** 当前标签是否激活。 */
|
|
164
|
+
active: boolean;
|
|
165
|
+
/** 当前标签总数。 */
|
|
166
|
+
tabCount: number;
|
|
167
|
+
}
|
|
168
|
+
/** 标签操作菜单项。 */
|
|
169
|
+
export interface YeeTabsMenuItem {
|
|
170
|
+
/** 对应的标签操作。 */
|
|
171
|
+
action: YeeTabsAction;
|
|
172
|
+
/** 菜单展示文本。 */
|
|
173
|
+
label: string;
|
|
174
|
+
/** 菜单图标组件。 */
|
|
175
|
+
icon?: Component;
|
|
176
|
+
/** 是否禁用菜单项。 */
|
|
177
|
+
disabled?: boolean;
|
|
178
|
+
/** 是否隐藏菜单项。 */
|
|
179
|
+
hidden?: boolean;
|
|
180
|
+
/** 是否在当前菜单项后显示分隔线。 */
|
|
181
|
+
separator?: boolean;
|
|
182
|
+
}
|
|
183
|
+
/** 标签操作菜单解析器;未传入时使用 YeeTabs 的默认菜单。 */
|
|
184
|
+
export type YeeTabsMenuResolver = (item: YeeTabItem, context: YeeTabsMenuContext) => readonly YeeTabsMenuItem[];
|
|
185
|
+
/** YeeTabs 固定状态变更事件参数。 */
|
|
186
|
+
export interface YeeTabsPinPayload {
|
|
187
|
+
key: string;
|
|
188
|
+
pinned: boolean;
|
|
189
|
+
}
|
|
190
|
+
/** YeeTabs 的公开属性。 */
|
|
191
|
+
export interface YeeTabsProps {
|
|
192
|
+
/** 标签列表。 */
|
|
193
|
+
items?: readonly YeeTabItem[];
|
|
194
|
+
/** 当前激活标签键。 */
|
|
195
|
+
activeKey?: string;
|
|
196
|
+
/** 是否允许关闭标签,默认允许。 */
|
|
197
|
+
closable?: boolean;
|
|
198
|
+
/** 是否允许桌面端拖拽排序,默认允许。 */
|
|
199
|
+
draggable?: boolean;
|
|
200
|
+
/** 是否允许点击中键关闭标签,默认关闭。 */
|
|
201
|
+
middleClickToClose?: boolean;
|
|
202
|
+
/** 是否显示标签关闭按钮。 */
|
|
203
|
+
showClose?: boolean;
|
|
204
|
+
/** 是否显示标签图标,默认显示。 */
|
|
205
|
+
showIcon?: boolean;
|
|
206
|
+
/** 是否显示标签操作菜单,默认显示。 */
|
|
207
|
+
showActions?: boolean;
|
|
208
|
+
/** 是否响应鼠标滚轮横向滚动,默认允许。 */
|
|
209
|
+
wheelable?: boolean;
|
|
210
|
+
/** 自定义标签右键和更多操作菜单。 */
|
|
211
|
+
contextMenus?: YeeTabsMenuResolver;
|
|
212
|
+
}
|
|
213
|
+
/** YeeTabs 的公开插槽。 */
|
|
214
|
+
export interface YeeTabsSlots {
|
|
215
|
+
/** 自定义标签内容。 */
|
|
216
|
+
tab?: (props: {
|
|
217
|
+
item: YeeTabItem;
|
|
218
|
+
active: boolean;
|
|
219
|
+
}) => VNodeChild;
|
|
220
|
+
}
|
|
221
|
+
/** 通过组件 ref 调用的标签管理方法。 */
|
|
222
|
+
export interface YeeTabsExpose {
|
|
223
|
+
/** 激活指定标签;返回标签是否存在且可激活。 */
|
|
224
|
+
activateTab: (key: string) => boolean;
|
|
225
|
+
/** 关闭指定标签;实际列表删除由调用方响应 close 事件完成。 */
|
|
226
|
+
closeTab: (key: string) => boolean;
|
|
227
|
+
/** 关闭当前标签左侧的标签。 */
|
|
228
|
+
closeLeftTabs: (key?: string) => boolean;
|
|
229
|
+
/** 关闭当前标签右侧的标签。 */
|
|
230
|
+
closeRightTabs: (key?: string) => boolean;
|
|
231
|
+
/** 关闭除当前标签外的其它标签。 */
|
|
232
|
+
closeOtherTabs: (key?: string) => boolean;
|
|
233
|
+
/** 关闭全部标签。 */
|
|
234
|
+
closeAllTabs: () => boolean;
|
|
235
|
+
/** 读取当前标签快照。 */
|
|
236
|
+
getTabs: () => readonly YeeTabItem[];
|
|
237
|
+
/** 读取指定标签。 */
|
|
238
|
+
getTab: (key: string) => YeeTabItem | undefined;
|
|
239
|
+
/** 固定或取消固定指定标签。 */
|
|
240
|
+
pinTab: (key: string, pinned?: boolean) => boolean;
|
|
241
|
+
/** 刷新指定标签,未传 key 时使用当前激活标签。 */
|
|
242
|
+
refreshTab: (key?: string) => boolean;
|
|
243
|
+
/** 在新窗口打开指定标签,未传 key 时使用当前激活标签。 */
|
|
244
|
+
openTabInNewWindow: (key?: string) => boolean;
|
|
245
|
+
}
|
|
246
|
+
/** YeeTabs 的公开事件。 */
|
|
247
|
+
export interface YeeTabsEmits {
|
|
248
|
+
change: [key: string];
|
|
249
|
+
close: [key: string];
|
|
250
|
+
closeAll: [];
|
|
251
|
+
closeLeft: [key: string];
|
|
252
|
+
closeOthers: [key: string];
|
|
253
|
+
closeRight: [key: string];
|
|
254
|
+
openInNewWindow: [key: string];
|
|
255
|
+
pin: [payload: YeeTabsPinPayload];
|
|
256
|
+
refresh: [key: string];
|
|
257
|
+
sortTabs: [oldIndex: number, newIndex: number];
|
|
258
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseTabsDragOptions {
|
|
3
|
+
enabled: () => boolean;
|
|
4
|
+
onSort: (oldIndex: number, newIndex: number) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function useYeeTabsDrag(listRef: Readonly<Ref<HTMLElement | null>>, options: UseTabsDragOptions): void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
interface UseTabsScrollOptions {
|
|
3
|
+
activeKey: Readonly<Ref<string | undefined>>;
|
|
4
|
+
itemsVersion: () => string;
|
|
5
|
+
wheelable: () => boolean;
|
|
6
|
+
}
|
|
7
|
+
interface UseTabsScrollResult {
|
|
8
|
+
canScrollLeft: Readonly<Ref<boolean>>;
|
|
9
|
+
canScrollRight: Readonly<Ref<boolean>>;
|
|
10
|
+
handleWheel: (event: WheelEvent) => void;
|
|
11
|
+
scrollTabs: (direction: -1 | 1) => void;
|
|
12
|
+
showScrollButtons: Readonly<Ref<boolean>>;
|
|
13
|
+
}
|
|
14
|
+
export declare function useYeeTabsScroll(listRef: Readonly<Ref<HTMLElement | null>>, options: UseTabsScrollOptions): UseTabsScrollResult;
|
|
15
|
+
export {};
|
|
@@ -24,10 +24,7 @@ type YeeGridProxyConfig<T, TFormValues extends object> = Omit<NativeProxyConfig<
|
|
|
24
24
|
};
|
|
25
25
|
type NativeToolbarConfig<T> = NonNullable<NativeVxeGridProps<T>['toolbarConfig']>;
|
|
26
26
|
/** YeeGrid 工具栏配置,继承 VXE Grid ToolbarConfig。 */
|
|
27
|
-
export type YeeGridToolbarConfig<T> = NativeToolbarConfig<T
|
|
28
|
-
/** 是否在工具栏预留查询表单控制能力。 */
|
|
29
|
-
search?: boolean;
|
|
30
|
-
};
|
|
27
|
+
export type YeeGridToolbarConfig<T> = NativeToolbarConfig<T>;
|
|
31
28
|
/** YeeGrid 表格配置,完整继承 VXE Grid 并收紧查询返回值。 */
|
|
32
29
|
export type YeeGridOptions<T = Record<string, unknown>, TFormValues extends object = YeeFormValues> = Omit<NativeVxeGridProps<T>, 'proxyConfig' | 'toolbarConfig'> & {
|
|
33
30
|
proxyConfig?: YeeGridProxyConfig<T, TFormValues>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { VxeUI } from 'vxe-table';
|
|
1
|
+
import { default as VxeUI } from 'vxe-table/es/ui';
|
|
2
2
|
export declare function registerVxeRestoreConfirm(handler: (content: string) => Promise<Awaited<ReturnType<typeof VxeUI.modal.confirm>>>): () => void;
|
|
3
3
|
export declare function initializeVxeTable(): void;
|
|
@@ -12,22 +12,22 @@ declare function __VLS_template(): {
|
|
|
12
12
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
13
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
14
|
close: () => any;
|
|
15
|
-
confirm: (event: Event) => any;
|
|
16
15
|
cancel: (event: Event) => any;
|
|
16
|
+
confirm: (event: Event) => any;
|
|
17
17
|
"update:fullscreen": (fullscreen: boolean) => any;
|
|
18
18
|
"update:open": (value: boolean) => any;
|
|
19
19
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
20
|
onClose?: () => any;
|
|
21
|
-
onConfirm?: (event: Event) => any;
|
|
22
21
|
onCancel?: (event: Event) => any;
|
|
22
|
+
onConfirm?: (event: Event) => any;
|
|
23
23
|
"onUpdate:fullscreen"?: (fullscreen: boolean) => any;
|
|
24
24
|
"onUpdate:open"?: (value: boolean) => any;
|
|
25
25
|
}>, {
|
|
26
26
|
type: import('./types').YeeModalType;
|
|
27
27
|
title: string;
|
|
28
28
|
width: number | string;
|
|
29
|
-
keyboard: boolean;
|
|
30
29
|
closable: boolean;
|
|
30
|
+
keyboard: boolean;
|
|
31
31
|
maskClosable: boolean;
|
|
32
32
|
destroyOnClose: boolean;
|
|
33
33
|
showCancelButton: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { inject as o } from "vue";
|
|
2
|
+
const r = /* @__PURE__ */ Symbol("platform-theme");
|
|
3
|
+
function m() {
|
|
4
|
+
const e = o(r);
|
|
5
|
+
if (!e)
|
|
6
|
+
throw new Error("usePlatformTheme 必须在 PlatformConfigProvider 内使用。");
|
|
7
|
+
return e;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
r as p,
|
|
11
|
+
m as u
|
|
12
|
+
};
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './constants';
|
|
2
|
+
export { default as PlatformConfigProvider } from './components/PlatformConfigProvider.vue';
|
|
3
|
+
export type { PlatformConfigProviderProps, PlatformConfigProviderSlots, } from './components/platform-config-provider/types';
|
|
4
|
+
export { toAntDesignTheme } from './theme/ant-theme';
|
|
5
|
+
export { platformThemeKey, usePlatformTheme } from './theme/context';
|
|
6
|
+
export { toPlatformCssVariables } from './theme/css-variables';
|
|
7
|
+
export { darkThemeTokens, lightThemeTokens, resolvePlatformTheme, } from './theme/tokens';
|
|
8
|
+
export type { PlatformTheme, PlatformThemeMode, PlatformThemeTokens, ResolvedPlatformTheme, } from './theme/types';
|
package/dist/core.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { C as o, P as r } from "./PlatformConfigProvider-BwqlDDcK.js";
|
|
2
|
+
import { d as m, l as t, r as T, t as f, a as l } from "./tokens-Dw6w0SSs.js";
|
|
3
|
+
import { p as P, u as i } from "./context-DJQ4f46a.js";
|
|
4
|
+
export {
|
|
5
|
+
o as CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT,
|
|
6
|
+
r as PlatformConfigProvider,
|
|
7
|
+
m as darkThemeTokens,
|
|
8
|
+
t as lightThemeTokens,
|
|
9
|
+
P as platformThemeKey,
|
|
10
|
+
T as resolvePlatformTheme,
|
|
11
|
+
f as toAntDesignTheme,
|
|
12
|
+
l as toPlatformCssVariables,
|
|
13
|
+
i as usePlatformTheme
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/descriptions';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/ellipsis-text';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/file-upload';
|