@dt-frames/ui 2.0.4 → 2.0.6
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/es/assets/locales/en.d.ts +2 -0
- package/es/assets/locales/en.ts +2 -0
- package/es/assets/locales/zh.d.ts +1 -0
- package/es/assets/locales/zh.ts +6 -5
- package/es/components/curd/index.js +117 -62
- package/es/components/curd/src/components/Curd.d.ts +0 -8
- package/es/components/curd/src/props.d.ts +0 -4
- package/es/components/form/index.d.ts +20 -53
- package/es/components/form/index.js +5 -3
- package/es/components/form/index.less +8 -3
- package/es/components/form/src/index.d.ts +16 -41
- package/es/components/source/index.js +8 -5
- package/es/components/source/types/source.type.d.ts +1 -0
- package/es/components/table/index.js +145 -95
- package/es/components/table/index.less +26 -5
- package/es/components/table/src/components/TableAction.d.ts +1 -1
- package/es/components/table/src/index.d.ts +10 -0
- package/es/components/table/src/props.d.ts +4 -0
- package/es/components/tree/index.d.ts +2 -0
- package/es/components/tree/index.js +1087 -0
- package/es/components/tree/index.less +119 -0
- package/es/components/tree/src/basicProps.d.ts +146 -0
- package/es/components/tree/src/components/ContextMenu.d.ts +64 -0
- package/es/components/tree/src/components/TreeHeader.d.ts +98 -0
- package/es/components/tree/src/enums/index.d.ts +6 -0
- package/es/components/tree/src/hooks/useContextMenu.d.ts +2 -0
- package/es/components/tree/src/hooks/useTree.d.ts +14 -0
- package/es/components/tree/src/index.d.ts +6526 -0
- package/es/components/tree/src/type/menu.d.ts +33 -0
- package/es/components/tree/src/type/tree.d.ts +55 -0
- package/es/components/tree/src/utils/tree.d.ts +5 -0
- package/es/theme/index.d.ts +2 -1
- package/es/theme/index.js +829 -699
- package/es/theme/index.less +56 -0
- package/es/theme/src/components/content/index.d.ts +6 -4
- package/es/theme/src/components/header/components/logo.d.ts +22 -0
- package/es/theme/src/components/header/index.d.ts +110 -0
- package/es/theme/src/components/header/multiple-header.d.ts +154 -20
- package/es/theme/src/components/sider/index.d.ts +22 -0
- package/es/theme/src/components/sider/mix-sider.d.ts +22 -0
- package/es/theme/src/components/tabs/components/TabContent.d.ts +33 -3
- package/es/theme/src/components/tabs/components/TabRedo.d.ts +6 -4
- package/es/theme/src/components/tabs/hooks/useTabDropdown.d.ts +6 -4
- package/es/theme/src/components/tabs/hooks/useTabs.d.ts +10 -0
- package/es/theme/src/components/tabs/index.d.ts +43 -20
- package/es/theme/src/hooks/useMenu.d.ts +1 -1
- package/es/theme/src/hooks/useMultifyTab.d.ts +1 -0
- package/es/theme/src/index.d.ts +293 -24
- package/es/theme/src/stores/routeReuse.store.d.ts +6 -4
- package/es/theme/src/stores/theme.store.d.ts +1 -0
- package/es/theme/src/types/theme.type.d.ts +2 -0
- package/index.d.ts +2 -1
- package/index.js +6 -2
- package/package.json +4 -2
- package/tsconfig.json +1 -0
- package/vite.config.ts +1 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface Axis {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export interface ContextMenuItem {
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
hidden?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
handler?: Function;
|
|
11
|
+
divider?: boolean;
|
|
12
|
+
children?: ContextMenuItem[];
|
|
13
|
+
}
|
|
14
|
+
export interface ItemContentProps {
|
|
15
|
+
showIcon: boolean | undefined;
|
|
16
|
+
item: ContextMenuItem;
|
|
17
|
+
handler: Function;
|
|
18
|
+
}
|
|
19
|
+
export interface CreateContextOptions {
|
|
20
|
+
event: MouseEvent;
|
|
21
|
+
icon?: string;
|
|
22
|
+
styles?: any;
|
|
23
|
+
items?: ContextMenuItem[];
|
|
24
|
+
}
|
|
25
|
+
export interface ContextMenuProps {
|
|
26
|
+
event?: MouseEvent;
|
|
27
|
+
styles?: any;
|
|
28
|
+
items: ContextMenuItem[];
|
|
29
|
+
customEvent?: MouseEvent;
|
|
30
|
+
axis?: Axis;
|
|
31
|
+
width?: number;
|
|
32
|
+
showIcon?: boolean;
|
|
33
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
2
|
+
import { TreeDataItem } from "ant-design-vue/lib/tree/Tree";
|
|
3
|
+
export declare type KeyType = string | number;
|
|
4
|
+
export declare type CheckKeys = KeyType[] | {
|
|
5
|
+
checked: string[] | number[];
|
|
6
|
+
halfChecked: string[] | number[];
|
|
7
|
+
};
|
|
8
|
+
export interface FieldNames {
|
|
9
|
+
children?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
key?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TreeActionItem {
|
|
14
|
+
render: (record: Recordable) => any;
|
|
15
|
+
show?: boolean | ((record: Recordable) => boolean);
|
|
16
|
+
}
|
|
17
|
+
export interface TreeItem extends TreeDataItem {
|
|
18
|
+
icon?: any;
|
|
19
|
+
}
|
|
20
|
+
export interface TreeState {
|
|
21
|
+
expandedKeys: KeyType[];
|
|
22
|
+
selectedKeys: KeyType[];
|
|
23
|
+
checkedKeys: CheckKeys;
|
|
24
|
+
checkStrictly: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface TreeHelperConfig {
|
|
27
|
+
id: string;
|
|
28
|
+
children: string;
|
|
29
|
+
pid: string;
|
|
30
|
+
}
|
|
31
|
+
export interface InsertNodeParams {
|
|
32
|
+
parentKey: string | null;
|
|
33
|
+
node: TreeDataItem;
|
|
34
|
+
list?: TreeDataItem[];
|
|
35
|
+
push?: 'push' | 'unshift';
|
|
36
|
+
}
|
|
37
|
+
export interface TreeActionType {
|
|
38
|
+
checkAll: (checkAll: boolean) => void;
|
|
39
|
+
expandAll: (expandAll: boolean) => void;
|
|
40
|
+
setExpandedKeys: (keys: KeyType[]) => void;
|
|
41
|
+
getExpandedKeys: () => KeyType[];
|
|
42
|
+
setSelectedKeys: (keys: KeyType[]) => void;
|
|
43
|
+
getSelectedKeys: () => KeyType[];
|
|
44
|
+
setCheckedKeys: (keys: CheckKeys) => void;
|
|
45
|
+
getCheckedKeys: () => CheckKeys;
|
|
46
|
+
filterByLevel: (level: number) => void;
|
|
47
|
+
insertNodeByKey: (opt: InsertNodeParams) => void;
|
|
48
|
+
insertNodesByKey: (opt: InsertNodeParams) => void;
|
|
49
|
+
deleteNodeByKey: (key: string) => void;
|
|
50
|
+
updateNodeByKey: (key: string, node: Omit<TreeDataItem, 'key'>) => void;
|
|
51
|
+
setSearchValue: (value: string) => void;
|
|
52
|
+
getSearchValue: () => string;
|
|
53
|
+
onStrictlyChange: (strictly: boolean) => void;
|
|
54
|
+
getSelectedNode: (key: KeyType, treeList?: TreeItem[], selectNode?: TreeItem | null) => TreeItem | null;
|
|
55
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TreeHelperConfig } from "../type/tree";
|
|
2
|
+
export declare function eachTree(treeDatas: any[], callBack: Function, parentNode?: {}): void;
|
|
3
|
+
export declare function forEach<T = any>(tree: T[], func: (n: T) => any, config?: Partial<TreeHelperConfig>): void;
|
|
4
|
+
export declare function filter<T = any>(tree: T[], func: (n: T) => boolean, config?: Partial<TreeHelperConfig>): T[];
|
|
5
|
+
export declare function treeToList<T = any>(tree: any, config?: Partial<TreeHelperConfig>): T;
|
package/es/theme/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { useRouteReuseStore } from './src/stores/routeReuse.store';
|
|
|
5
5
|
import type { ThemeOptions, HeadOptions, MenuOptions, FooterOptions, RouteReuseOptions } from './src/types';
|
|
6
6
|
import { Component } from 'vue';
|
|
7
7
|
import { SFCWithInstall } from '../utils/withInstall';
|
|
8
|
+
import { UiSize, ContentMode } from './src/enums/theme.enum';
|
|
8
9
|
declare const DtTheme: SFCWithInstall<Component>;
|
|
9
|
-
export { uiLang, DtTheme, useThemeStore, useRouteReuseStore, defaultThemeConf };
|
|
10
|
+
export { UiSize, ContentMode, uiLang, DtTheme, useThemeStore, useRouteReuseStore, defaultThemeConf };
|
|
10
11
|
export type { ThemeOptions, HeadOptions, MenuOptions, FooterOptions, RouteReuseOptions };
|