@zjhc/ui 0.0.0-stage → 0.1.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/LICENSE +51 -0
- package/NOTICE +23 -0
- package/README.md +177 -2
- package/dist/component.d.ts +3 -0
- package/dist/components/autocomplete/index.d.ts +5 -0
- package/dist/components/autocomplete/src/autoComplete.vue.d.ts +511 -0
- package/dist/components/autocomplete/src/autocomplete.d.ts +50 -0
- package/dist/components/collapse-container/index.d.ts +6 -0
- package/dist/components/collapse-container/src/collapseContainer.vue.d.ts +47 -0
- package/dist/components/collapse-container/src/instance.d.ts +2 -0
- package/dist/components/collapse-panel/index.d.ts +6 -0
- package/dist/components/collapse-panel/src/collapsePanel.vue.d.ts +68 -0
- package/dist/components/collapse-panel/src/instance.d.ts +2 -0
- package/dist/components/complex-table/index.d.ts +7 -0
- package/dist/components/complex-table/src/ComplexTable.vue.d.ts +1428 -0
- package/dist/components/complex-table/src/TableOperator.vue.d.ts +41 -0
- package/dist/components/complex-table/src/instance.d.ts +4 -0
- package/dist/components/dialog/index.d.ts +5 -0
- package/dist/components/dialog/src/dialog-content.d.ts +20 -0
- package/dist/components/dialog/src/dialog.d.ts +76 -0
- package/dist/components/dialog/src/dialog.vue.d.ts +456 -0
- package/dist/components/dialog/src/dialogContent.vue.d.ts +74 -0
- package/dist/components/dialog/src/use-dialog.d.ts +23 -0
- package/dist/components/edit-table-column/EditTableColumn.vue.d.ts +79 -0
- package/dist/components/edit-table-column/index.d.ts +6 -0
- package/dist/components/edit-table-column/registerComp.d.ts +3 -0
- package/dist/components/edit-table-column/type.d.ts +14 -0
- package/dist/components/group-container/index.d.ts +6 -0
- package/dist/components/group-container/src/groupContainer.vue.d.ts +43 -0
- package/dist/components/group-container/src/instance.d.ts +2 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/components/loading/index.d.ts +11 -0
- package/dist/components/loading/src/directive.d.ts +13 -0
- package/dist/components/loading/src/loading.d.ts +27 -0
- package/dist/components/loading/src/service.d.ts +3 -0
- package/dist/components/loading/src/types.d.ts +61 -0
- package/dist/components/search-layout/index.d.ts +6 -0
- package/dist/components/search-layout/src/instance.d.ts +2 -0
- package/dist/components/search-layout/src/searchLayout.vue.d.ts +22 -0
- package/dist/components/search-panel/index.d.ts +6 -0
- package/dist/components/search-panel/src/instance.d.ts +2 -0
- package/dist/components/search-panel/src/searchPanel.vue.d.ts +17 -0
- package/dist/components/search-panel-layout/index.d.ts +6 -0
- package/dist/components/search-panel-layout/src/layout.d.ts +95 -0
- package/dist/components/sticky-toolbar/index.d.ts +6 -0
- package/dist/components/sticky-toolbar/src/instance.d.ts +2 -0
- package/dist/components/sticky-toolbar/src/stickyToolbar.vue.d.ts +43 -0
- package/dist/components/switch-mode/index.d.ts +7 -0
- package/dist/components/switch-theme/index.d.ts +7 -0
- package/dist/components/table-toolbar/index.d.ts +7 -0
- package/dist/components/table-toolbar/src/buttonGroup.vue.d.ts +79 -0
- package/dist/components/table-toolbar/src/interface.d.ts +21 -0
- package/dist/components/table-toolbar/src/tableToolbar.vue.d.ts +71 -0
- package/dist/constants/aria.d.ts +17 -0
- package/dist/constants/date.d.ts +3 -0
- package/dist/constants/event.d.ts +3 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/key.d.ts +1 -0
- package/dist/constants/size.d.ts +7 -0
- package/dist/defaults.d.ts +5 -0
- package/dist/hooks/complex-table/index.d.ts +33 -0
- package/dist/hooks/get-cookie/index.d.ts +4 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/oper-modal/index.d.ts +8 -0
- package/dist/hooks/post-message/index.d.ts +19 -0
- package/dist/hooks/set-theme/index.d.ts +2 -0
- package/dist/hooks/use-draggable-resize/index.d.ts +10 -0
- package/dist/hooks/use-loading/index.d.ts +4 -0
- package/dist/hooks/use-namespace/index.d.ts +20 -0
- package/dist/icons/arrow-down.vue.d.ts +2 -0
- package/dist/icons/arrow-up.vue.d.ts +2 -0
- package/dist/icons/check.vue.d.ts +2 -0
- package/dist/icons/close.vue.d.ts +2 -0
- package/dist/icons/copy-document.vue.d.ts +2 -0
- package/dist/icons/filter.vue.d.ts +2 -0
- package/dist/icons/full-screen.vue.d.ts +2 -0
- package/dist/icons/index.d.ts +9 -0
- package/dist/icons/loading.vue.d.ts +2 -0
- package/dist/icons/minus.vue.d.ts +2 -0
- package/dist/index.cjs +3985 -0
- package/dist/index.css +2661 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.mjs +3985 -0
- package/dist/make-installer.d.ts +5 -0
- package/dist/plugin.d.ts +3 -0
- package/dist/types/enhance/accessory.d.ts +45 -0
- package/dist/types/enhance/biztrace.d.ts +75 -0
- package/dist/types/enhance/form.d.ts +83 -0
- package/dist/types/enhance/heai.d.ts +47 -0
- package/dist/types/enhance/workflow.d.ts +385 -0
- package/dist/types/extension/extension.d.ts +58 -0
- package/dist/types/extension/frame.d.ts +48 -0
- package/dist/types/extension/job.d.ts +36 -0
- package/dist/types/framework/auth.d.ts +38 -0
- package/dist/types/framework/config.d.ts +13 -0
- package/dist/types/framework/core.d.ts +24 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/style.d.ts +10 -0
- package/dist/utils/tools/istype.d.ts +11 -0
- package/dist/utils/tools/security.d.ts +2 -0
- package/dist/utils/tools/throw-error.d.ts +1 -0
- package/dist/utils/tools/tree.d.ts +2 -0
- package/dist/utils/vue/index.d.ts +2 -0
- package/dist/utils/vue/install.d.ts +6 -0
- package/dist/utils/vue/shared.d.ts +10 -0
- package/dist/utils/vue/typescript.d.ts +5 -0
- package/dist/version.d.ts +1 -0
- package/package.json +76 -4
- package/theme-chalk/autocomplete.css +144 -0
- package/theme-chalk/base-var.css +1037 -0
- package/theme-chalk/base.css +120 -0
- package/theme-chalk/collapse-container.css +71 -0
- package/theme-chalk/collapse-panel.css +49 -0
- package/theme-chalk/complextable.css +72 -0
- package/theme-chalk/dark.css +134 -0
- package/theme-chalk/dialog.css +0 -0
- package/theme-chalk/document-tables.css +175 -0
- package/theme-chalk/group-container.css +159 -0
- package/theme-chalk/index.css +2661 -0
- package/theme-chalk/loading.css +86 -0
- package/theme-chalk/page.css +34 -0
- package/theme-chalk/pub-class.css +417 -0
- package/theme-chalk/reset.css +152 -0
- package/theme-chalk/search-panel.css +31 -0
- package/theme-chalk/searchlayout.css +125 -0
- package/theme-chalk/src/autocomplete.scss +103 -0
- package/theme-chalk/src/base-var.scss +489 -0
- package/theme-chalk/src/base.scss +1 -0
- package/theme-chalk/src/black/index.scss +4 -0
- package/theme-chalk/src/collapse-container.scss +44 -0
- package/theme-chalk/src/collapse-panel.scss +26 -0
- package/theme-chalk/src/common/var.scss +154 -0
- package/theme-chalk/src/complextable.scss +47 -0
- package/theme-chalk/src/dark/css-vars.scss +35 -0
- package/theme-chalk/src/dark/var.scss +198 -0
- package/theme-chalk/src/dialog.scss +0 -0
- package/theme-chalk/src/document-tables.scss +133 -0
- package/theme-chalk/src/group-container.scss +139 -0
- package/theme-chalk/src/index.scss +17 -0
- package/theme-chalk/src/light/css-vars.scss +4 -0
- package/theme-chalk/src/light/var.scss +158 -0
- package/theme-chalk/src/loading.scss +68 -0
- package/theme-chalk/src/mixins/_var.scss +48 -0
- package/theme-chalk/src/mixins/config.scss +5 -0
- package/theme-chalk/src/mixins/function.scss +133 -0
- package/theme-chalk/src/mixins/mixins.scss +211 -0
- package/theme-chalk/src/page.scss +8 -0
- package/theme-chalk/src/pub-class.scss +127 -0
- package/theme-chalk/src/reset.scss +155 -0
- package/theme-chalk/src/search-panel.scss +10 -0
- package/theme-chalk/src/searchlayout.scss +114 -0
- package/theme-chalk/src/sticky-toolbar.scss +59 -0
- package/theme-chalk/src/table-toolbar.scss +36 -0
- package/theme-chalk/src/var.scss +32 -0
- package/theme-chalk/src/zjhc/alert.scss +16 -0
- package/theme-chalk/src/zjhc/anchor.scss +10 -0
- package/theme-chalk/src/zjhc/autocomplete.scss +11 -0
- package/theme-chalk/src/zjhc/backtop.scss +8 -0
- package/theme-chalk/src/zjhc/breadcrumb.scss +3 -0
- package/theme-chalk/src/zjhc/button.scss +82 -0
- package/theme-chalk/src/zjhc/calendar.scss +5 -0
- package/theme-chalk/src/zjhc/card.scss +5 -0
- package/theme-chalk/src/zjhc/cascader.scss +26 -0
- package/theme-chalk/src/zjhc/checkbox.scss +59 -0
- package/theme-chalk/src/zjhc/collapse.scss +8 -0
- package/theme-chalk/src/zjhc/dateEditor.scss +14 -0
- package/theme-chalk/src/zjhc/descriptions.scss +32 -0
- package/theme-chalk/src/zjhc/dialog.scss +148 -0
- package/theme-chalk/src/zjhc/drawer.scss +4 -0
- package/theme-chalk/src/zjhc/dropdown.scss +16 -0
- package/theme-chalk/src/zjhc/empty.scss +3 -0
- package/theme-chalk/src/zjhc/fontsize.scss +42 -0
- package/theme-chalk/src/zjhc/form.scss +33 -0
- package/theme-chalk/src/zjhc/index.scss +48 -0
- package/theme-chalk/src/zjhc/input.scss +47 -0
- package/theme-chalk/src/zjhc/link.scss +20 -0
- package/theme-chalk/src/zjhc/main.scss +3 -0
- package/theme-chalk/src/zjhc/mention.scss +9 -0
- package/theme-chalk/src/zjhc/menu.scss +0 -0
- package/theme-chalk/src/zjhc/message-box.scss +57 -0
- package/theme-chalk/src/zjhc/message.scss +13 -0
- package/theme-chalk/src/zjhc/notification.scss +4 -0
- package/theme-chalk/src/zjhc/number.scss +9 -0
- package/theme-chalk/src/zjhc/overlay.scss +3 -0
- package/theme-chalk/src/zjhc/page.scss +3 -0
- package/theme-chalk/src/zjhc/pagination.scss +64 -0
- package/theme-chalk/src/zjhc/picker.scss +85 -0
- package/theme-chalk/src/zjhc/popover.scss +13 -0
- package/theme-chalk/src/zjhc/popper.scss +13 -0
- package/theme-chalk/src/zjhc/radio.scss +49 -0
- package/theme-chalk/src/zjhc/scrollbar.scss +5 -0
- package/theme-chalk/src/zjhc/segmented.scss +18 -0
- package/theme-chalk/src/zjhc/select.scss +49 -0
- package/theme-chalk/src/zjhc/steps.scss +40 -0
- package/theme-chalk/src/zjhc/switch.scss +11 -0
- package/theme-chalk/src/zjhc/table-v2.scss +16 -0
- package/theme-chalk/src/zjhc/table.scss +44 -0
- package/theme-chalk/src/zjhc/tabs.scss +15 -0
- package/theme-chalk/src/zjhc/tags.scss +25 -0
- package/theme-chalk/src/zjhc/timeline.scss +16 -0
- package/theme-chalk/src/zjhc/tour.scss +9 -0
- package/theme-chalk/src/zjhc/tree.scss +6 -0
- package/theme-chalk/src/zjhc/upload.scss +6 -0
- package/theme-chalk/sticky-toolbar.css +71 -0
- package/theme-chalk/table-toolbar.css +53 -0
- package/theme-chalk/var.css +120 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface DelegateInfo {
|
|
2
|
+
delegateId: string;
|
|
3
|
+
assignParentId: string;
|
|
4
|
+
assignUserId: string;
|
|
5
|
+
assignUserPath: string;
|
|
6
|
+
delegateParentId: string;
|
|
7
|
+
delegateUserId: string;
|
|
8
|
+
delegateUserPath: string;
|
|
9
|
+
begDate: string;
|
|
10
|
+
endDate: string;
|
|
11
|
+
}
|
|
12
|
+
export interface FrameThemeTypeInfo {
|
|
13
|
+
themeCode: string;
|
|
14
|
+
themeName: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FrameThemeInfo {
|
|
17
|
+
userId: string;
|
|
18
|
+
userName: string;
|
|
19
|
+
themeCode: string;
|
|
20
|
+
elderMode: boolean;
|
|
21
|
+
forceFlag: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface FrameUserInfo {
|
|
24
|
+
userId: string;
|
|
25
|
+
userName: string;
|
|
26
|
+
parentId: string;
|
|
27
|
+
fullPathName: string;
|
|
28
|
+
personId: string;
|
|
29
|
+
customsCode: string;
|
|
30
|
+
status: string;
|
|
31
|
+
sortOrder: string;
|
|
32
|
+
email: string;
|
|
33
|
+
mobile: string;
|
|
34
|
+
rankCode: string;
|
|
35
|
+
rankName: string;
|
|
36
|
+
sideline: boolean;
|
|
37
|
+
ipAddress: string;
|
|
38
|
+
viewCode: string;
|
|
39
|
+
logonType: string;
|
|
40
|
+
logonTime: string;
|
|
41
|
+
}
|
|
42
|
+
export interface FrameConfigInfo {
|
|
43
|
+
user: FrameUserInfo;
|
|
44
|
+
theme: FrameThemeInfo;
|
|
45
|
+
themeTypeList: Array<FrameThemeTypeInfo>;
|
|
46
|
+
delegates: Array<DelegateInfo>;
|
|
47
|
+
extraAttrs: Record<string, string>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type ScheduleType = 'NONE' | 'CRON' | 'REPEAT' | 'AFTER';
|
|
2
|
+
export type BalanceStrategy = 'DEFAULT' | 'ROUND_ROBIN';
|
|
3
|
+
export type DistributedType = 'SLICE' | 'ONLYONE';
|
|
4
|
+
export type ScheduleStatus = 'STARTED' | 'STOPPED' | 'STARTING' | 'STOPPING';
|
|
5
|
+
export type ExecFlag = 'SUCCESS' | 'FAILURE' | 'RUNNING' | 'NONE';
|
|
6
|
+
export interface JobDefinition {
|
|
7
|
+
jobCode: string;
|
|
8
|
+
appCode: string;
|
|
9
|
+
jobName: string;
|
|
10
|
+
fullClassName: string;
|
|
11
|
+
scheduleType: ScheduleType;
|
|
12
|
+
distributedType: DistributedType;
|
|
13
|
+
scheduleTime: string;
|
|
14
|
+
jobConfig: string;
|
|
15
|
+
scheduleStatus: ScheduleStatus;
|
|
16
|
+
jobStatus: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface JobRuntime {
|
|
19
|
+
nodeId: string;
|
|
20
|
+
jobCode: string;
|
|
21
|
+
appCode: string;
|
|
22
|
+
jobName: string;
|
|
23
|
+
logId: string;
|
|
24
|
+
execFlag: ExecFlag;
|
|
25
|
+
startTime: string;
|
|
26
|
+
endTime: string;
|
|
27
|
+
notes: string;
|
|
28
|
+
createTime: string;
|
|
29
|
+
}
|
|
30
|
+
export interface JobNode {
|
|
31
|
+
nodeId: string;
|
|
32
|
+
running: boolean;
|
|
33
|
+
master: boolean;
|
|
34
|
+
jobCount: number;
|
|
35
|
+
lastTime: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type OguType = 'USER' | 'ORGANIZATION';
|
|
2
|
+
export interface ZjhcRole {
|
|
3
|
+
appCode: string;
|
|
4
|
+
code: string;
|
|
5
|
+
name: string;
|
|
6
|
+
resourceLevel: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ZjhcPermission {
|
|
9
|
+
appCode: string;
|
|
10
|
+
code: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BaseZjhcOgu {
|
|
14
|
+
oguId: string;
|
|
15
|
+
oguName: string;
|
|
16
|
+
parentId: string;
|
|
17
|
+
fullPathName: string;
|
|
18
|
+
sortOrder: string;
|
|
19
|
+
oguType: OguType;
|
|
20
|
+
}
|
|
21
|
+
export interface ZjhcUser extends BaseZjhcOgu {
|
|
22
|
+
personId: string;
|
|
23
|
+
customsCode: string;
|
|
24
|
+
email: string;
|
|
25
|
+
mobile: string;
|
|
26
|
+
status: string;
|
|
27
|
+
oguType: 'USER';
|
|
28
|
+
roles: Array<ZjhcRole>;
|
|
29
|
+
authorities: Array<ZjhcPermission>;
|
|
30
|
+
}
|
|
31
|
+
export interface ZjhcOrganization extends BaseZjhcOgu {
|
|
32
|
+
branch: boolean;
|
|
33
|
+
oguType: 'ORGANIZATION';
|
|
34
|
+
}
|
|
35
|
+
export interface UserAuthorityInfo {
|
|
36
|
+
roles: Array<ZjhcRole>;
|
|
37
|
+
permissions: Array<ZjhcPermission>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type AuthMode = 'JWT' | 'Cookie';
|
|
2
|
+
export interface ZjhcConfig {
|
|
3
|
+
SERVICE_ID: string;
|
|
4
|
+
AUTH_APP_CODE?: string;
|
|
5
|
+
SERVICE_NAME?: string;
|
|
6
|
+
SERVICE_PAGESIZE: number;
|
|
7
|
+
SERVICE_TIMEOUT: number;
|
|
8
|
+
SERVICE_API: string;
|
|
9
|
+
FRAME_API: string;
|
|
10
|
+
NEED_USER_AUTHORITY: boolean;
|
|
11
|
+
AUTH_MODE?: AuthMode;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const SuccessResultCode: string;
|
|
2
|
+
export declare const WarningResultCode: string;
|
|
3
|
+
export declare const SystemFailResultCode: string;
|
|
4
|
+
export interface Result<T> {
|
|
5
|
+
code: string;
|
|
6
|
+
message: string;
|
|
7
|
+
data?: T;
|
|
8
|
+
}
|
|
9
|
+
export interface TypeDescriptor {
|
|
10
|
+
code: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PageInfo<T> {
|
|
14
|
+
pageNum: number;
|
|
15
|
+
pageSize: number;
|
|
16
|
+
size: number;
|
|
17
|
+
pages: number;
|
|
18
|
+
total: number;
|
|
19
|
+
list: Array<T>;
|
|
20
|
+
}
|
|
21
|
+
export interface TreeInfo {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
children: Array<TreeInfo>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './framework/auth';
|
|
2
|
+
export * from './framework/config';
|
|
3
|
+
export * from './framework/core';
|
|
4
|
+
export * from './extension/extension';
|
|
5
|
+
export * from './extension/frame';
|
|
6
|
+
export * from './extension/job';
|
|
7
|
+
export * from './enhance/accessory';
|
|
8
|
+
export * from './enhance/biztrace';
|
|
9
|
+
export * from './enhance/workflow';
|
|
10
|
+
export * from './enhance/heai';
|
|
11
|
+
export * from './enhance/form';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
export declare const isStringNumber: (val: string) => boolean;
|
|
3
|
+
export declare const classNameToArray: (cls?: string) => string[];
|
|
4
|
+
export declare const hasClass: (el: Element, cls: string) => boolean;
|
|
5
|
+
export declare const addClass: (el: Element, cls: string) => void;
|
|
6
|
+
export declare const removeClass: (el: Element, cls: string) => void;
|
|
7
|
+
export declare const getStyle: (element: HTMLElement, styleName: keyof CSSProperties) => string;
|
|
8
|
+
export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | keyof CSSProperties, value?: string | number) => void;
|
|
9
|
+
export declare const removeStyle: (element: HTMLElement, style: CSSProperties | keyof CSSProperties) => void;
|
|
10
|
+
export declare function addUnit(value?: string | number, defaultUnit?: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function isFunction(obj: any): obj is (...args: any[]) => any;
|
|
2
|
+
export declare function isString(obj: any): obj is string;
|
|
3
|
+
export declare function isObject(obj: any): obj is {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export declare function isArray(obj: any): obj is any[];
|
|
7
|
+
export declare function isNumber(obj: any): obj is number;
|
|
8
|
+
export declare function isFile(obj: any): obj is File;
|
|
9
|
+
export declare function isRegExp(obj: any): boolean;
|
|
10
|
+
export declare function isBlob(obj: any): obj is Blob;
|
|
11
|
+
export declare function isWindow(obj: any): obj is Window;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function throwError(scope: string, m: string): never;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Directive } from 'vue';
|
|
2
|
+
import { SFCInstallWithContext, SFCWithInstall } from './typescript.ts';
|
|
3
|
+
export declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E) => SFCWithInstall<T> & E;
|
|
4
|
+
export declare const withInstallFunction: <T>(fn: T, name: string) => SFCInstallWithContext<T>;
|
|
5
|
+
export declare const withInstallDirective: <T extends Directive>(directive: T, name: string) => SFCWithInstall<T>;
|
|
6
|
+
export declare const withNoopInstall: <T>(component: T) => SFCWithInstall<T>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vue/shared 的最小本地替代。
|
|
3
|
+
* 原先直接从 @vue/shared(vue 的传递依赖)取值,属于未声明的依赖,
|
|
4
|
+
* 单独发布组件库时会解析失败,这里改为本地实现。
|
|
5
|
+
*/
|
|
6
|
+
export declare const NOOP: () => void;
|
|
7
|
+
export declare const isString: (val: unknown) => val is string;
|
|
8
|
+
export declare const isObject: (val: unknown) => val is Record<PropertyKey, unknown>;
|
|
9
|
+
export declare const camelize: (str: string) => string;
|
|
10
|
+
export declare const hyphenate: (str: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const version = "0.1.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,78 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zjhc/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A Vue 3 component library built on top of Element Plus",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"zjhc",
|
|
7
|
+
"vue3",
|
|
8
|
+
"component library",
|
|
9
|
+
"ui framework",
|
|
10
|
+
"element-plus"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "./dist/index.cjs",
|
|
15
|
+
"module": "./dist/index.mjs",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"style": "./dist/index.css",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.mjs",
|
|
22
|
+
"require": "./dist/index.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./style.css": "./dist/index.css",
|
|
25
|
+
"./dist/index.css": "./dist/index.css",
|
|
26
|
+
"./theme-chalk/*": "./theme-chalk/*",
|
|
27
|
+
"./*": "./*"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"theme-chalk",
|
|
32
|
+
"README.md",
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"NOTICE"
|
|
35
|
+
],
|
|
36
|
+
"sideEffects": [
|
|
37
|
+
"**/*.css",
|
|
38
|
+
"**/*.scss",
|
|
39
|
+
"dist/*"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "node scripts/sync-version.cjs && npm run build:css && vite build",
|
|
43
|
+
"build:css": "node scripts/build-css.mjs",
|
|
44
|
+
"type-check": "vue-tsc --noEmit -p tsconfig.json",
|
|
45
|
+
"test": "node scripts/smoke-test.mjs",
|
|
46
|
+
"test:consume": "node scripts/consume-test.mjs",
|
|
47
|
+
"preflight": "node scripts/preflight.cjs",
|
|
48
|
+
"publish:otp": "node scripts/publish.cjs",
|
|
49
|
+
"token:check": "node scripts/token-check.cjs",
|
|
50
|
+
"prepack": "npm run build"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"crypto-js": "^4.2.0",
|
|
54
|
+
"element-plus": "^2.8.6",
|
|
55
|
+
"vue": "^3.4.0"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@vueuse/core": "^12.5.0",
|
|
59
|
+
"lodash-es": "^4.17.21"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
63
|
+
"@vue/server-renderer": "^3.5.44",
|
|
64
|
+
"@vueuse/core": "^12.5.0",
|
|
65
|
+
"crypto-js": "^4.2.0",
|
|
66
|
+
"element-plus": "^2.14.0",
|
|
67
|
+
"lodash-es": "^4.17.21",
|
|
68
|
+
"sass": "^1.83.0",
|
|
69
|
+
"typescript": "~5.6.3",
|
|
70
|
+
"vite": "^5.4.10",
|
|
71
|
+
"vite-plugin-dts": "^4.3.0",
|
|
72
|
+
"vue": "^3.5.13",
|
|
73
|
+
"vue-tsc": "^2.1.10"
|
|
74
|
+
},
|
|
75
|
+
"engines": {
|
|
76
|
+
"node": ">=18"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/**
|
|
3
|
+
* 该函数将选择器转化为字符串,并截取指定位置的字符。
|
|
4
|
+
* @param $selector - 需要转换的选择器对象。
|
|
5
|
+
* @return 返回转换后的选择器字符串。
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* 判断父级选择器是否包含'--'
|
|
9
|
+
* @param $selector - 需要检查的选择器,可以是列表或字符串。
|
|
10
|
+
* @returns 如果选择器包含修饰符,则返回 true;否则返回 false。
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 判断父级选择器是否包含'.is-'
|
|
14
|
+
* @param $selector - 需要检查的选择器,可以是任何形式的选择器。
|
|
15
|
+
* @return 返回一个布尔值,如果选择器包含状态前缀则为true,否则为false。
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* 判断父级是否包含 ':' (用于判断伪类和伪元素)
|
|
19
|
+
* @param $selector - 需要检查的选择器,可以是任何形式的选择器,函数会将其转换为字符串形式。
|
|
20
|
+
* @return 返回一个布尔值,如果选择器包含伪类,则返回 true;否则返回 false。
|
|
21
|
+
*/
|
|
22
|
+
/*
|
|
23
|
+
* 判断父级选择器是否包含`--` `.is-` `:`这三种字符
|
|
24
|
+
* @param {String} $selector 选择器
|
|
25
|
+
* @return {String} 如果父级选择器包含以上三种字符中的任意一种,返回true;否则返回false
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* 函数用于将给定列表中的项目连接成一个变量名。
|
|
29
|
+
* @param $list - 一个包含要连接的字符串的列表。
|
|
30
|
+
* @return $name - 连接后的变量名,以"--"和配置中的命名空间开头,每个列表项之间用"-"连接。
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* 该@mixin用于根据指定的颜色类型、级别和混合模式,创建一个新颜色等级并将其添加到全局颜色地图中。
|
|
34
|
+
* @param $type {string} - 颜色的类型(例如:primary, success等)。
|
|
35
|
+
* @param $number {int} - 颜色的级别,用于计算颜色的混合程度。
|
|
36
|
+
* @param $mode {string} - 混合模式,默认为'light'。可用于指定颜色是明度混合还是饱和度混合等。
|
|
37
|
+
* @param $mix-color {color} - 用于混合的颜色,默认为白色($color-white)。
|
|
38
|
+
*/
|
|
39
|
+
.zjhc-autocomplete {
|
|
40
|
+
width: var(--el-input-width);
|
|
41
|
+
position: relative;
|
|
42
|
+
display: inline-block;
|
|
43
|
+
}
|
|
44
|
+
.zjhc-autocomplete__popper {
|
|
45
|
+
max-width: 810px;
|
|
46
|
+
}
|
|
47
|
+
.zjhc-autocomplete__popper.el-popper {
|
|
48
|
+
background: var(--el-bg-color-overlay);
|
|
49
|
+
border: 1px solid var(--el-border-color-light);
|
|
50
|
+
box-shadow: none;
|
|
51
|
+
}
|
|
52
|
+
.zjhc-autocomplete__popper.el-popper .el-popper__arrow::before {
|
|
53
|
+
border: 1px solid var(--el-border-color-light);
|
|
54
|
+
}
|
|
55
|
+
.zjhc-autocomplete__popper.el-popper[data-popper-placement^=top] .el-popper__arrow::before {
|
|
56
|
+
border-top-color: transparent;
|
|
57
|
+
border-left-color: transparent;
|
|
58
|
+
}
|
|
59
|
+
.zjhc-autocomplete__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow::before {
|
|
60
|
+
border-bottom-color: transparent;
|
|
61
|
+
border-right-color: transparent;
|
|
62
|
+
}
|
|
63
|
+
.zjhc-autocomplete__popper.el-popper[data-popper-placement^=left] .el-popper__arrow::before {
|
|
64
|
+
border-left-color: transparent;
|
|
65
|
+
border-bottom-color: transparent;
|
|
66
|
+
}
|
|
67
|
+
.zjhc-autocomplete__popper.el-popper[data-popper-placement^=right] .el-popper__arrow::before {
|
|
68
|
+
border-right-color: transparent;
|
|
69
|
+
border-top-color: transparent;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.zjhc-autocomplete-suggestion {
|
|
73
|
+
border-radius: var(--el-border-radius-base);
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
}
|
|
76
|
+
.zjhc-autocomplete-suggestion__wrap {
|
|
77
|
+
max-height: 280px;
|
|
78
|
+
padding: 6px 0;
|
|
79
|
+
box-sizing: border-box;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.zjhc-autocomplete-suggestion__list {
|
|
83
|
+
margin: 0;
|
|
84
|
+
padding: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.zjhc-autocomplete-suggestion li {
|
|
88
|
+
padding: 0 30px 0 10px;
|
|
89
|
+
margin: 0 0 1px;
|
|
90
|
+
line-height: var(--el-input-height);
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
color: var(--el-text-color-regular);
|
|
93
|
+
font-size: var(--el-font-size-base);
|
|
94
|
+
list-style: none;
|
|
95
|
+
text-align: left;
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
text-overflow: ellipsis;
|
|
99
|
+
position: relative;
|
|
100
|
+
}
|
|
101
|
+
.zjhc-autocomplete-suggestion li:hover {
|
|
102
|
+
background-color: var(--el-fill-color-light);
|
|
103
|
+
}
|
|
104
|
+
.zjhc-autocomplete-suggestion li.highlighted {
|
|
105
|
+
background-color: var(--el-fill-color-light);
|
|
106
|
+
}
|
|
107
|
+
.zjhc-autocomplete-suggestion li.divider {
|
|
108
|
+
margin-top: 6px;
|
|
109
|
+
border-top: 1px solid var(--el-color-black);
|
|
110
|
+
}
|
|
111
|
+
.zjhc-autocomplete-suggestion li.divider:last-child {
|
|
112
|
+
margin-bottom: -6px;
|
|
113
|
+
}
|
|
114
|
+
.zjhc-autocomplete-suggestion li.is-selected {
|
|
115
|
+
background: var(--el-primary-opactiy01);
|
|
116
|
+
color: var(--el-color-primary);
|
|
117
|
+
}
|
|
118
|
+
.zjhc-autocomplete-suggestion li.is-selected .selected-icon {
|
|
119
|
+
display: block;
|
|
120
|
+
}
|
|
121
|
+
.zjhc-autocomplete-suggestion li .selected-icon {
|
|
122
|
+
position: absolute;
|
|
123
|
+
right: 10px;
|
|
124
|
+
top: 50%;
|
|
125
|
+
margin-top: -7px;
|
|
126
|
+
font-size: 14px;
|
|
127
|
+
display: none;
|
|
128
|
+
}
|
|
129
|
+
.zjhc-autocomplete-suggestion.is-loading li {
|
|
130
|
+
text-align: center;
|
|
131
|
+
height: 100px;
|
|
132
|
+
line-height: 100px;
|
|
133
|
+
font-size: 20px;
|
|
134
|
+
color: var(--el-text-color-secondary);
|
|
135
|
+
}
|
|
136
|
+
.zjhc-autocomplete-suggestion.is-loading li::after {
|
|
137
|
+
display: inline-block;
|
|
138
|
+
content: "";
|
|
139
|
+
height: 100%;
|
|
140
|
+
vertical-align: middle;
|
|
141
|
+
}
|
|
142
|
+
.zjhc-autocomplete-suggestion.is-loading li:hover {
|
|
143
|
+
background-color: var(--el-bg-color-overlay);
|
|
144
|
+
}
|