qy-ui-for-ls 0.1.1 → 0.1.3

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.
Files changed (61) hide show
  1. package/dist/client/main.d.ts +1 -0
  2. package/dist/components/button/index.d.ts +127 -0
  3. package/dist/components/button/src/index.vue.d.ts +75 -0
  4. package/dist/components/card/index.d.ts +95 -0
  5. package/dist/components/card/src/index.vue.d.ts +59 -0
  6. package/dist/components/descriptions/index.d.ts +158 -0
  7. package/dist/components/descriptions/src/index.vue.d.ts +94 -0
  8. package/dist/components/descriptions/src/renderTooltip.vue.d.ts +9 -0
  9. package/dist/components/detail/index.d.ts +193 -0
  10. package/dist/components/detail/src/Enum.d.ts +12 -0
  11. package/dist/components/dia/index.d.ts +44 -0
  12. package/dist/components/dia/src/index.vue.d.ts +28 -0
  13. package/dist/components/editor/index.d.ts +186 -0
  14. package/dist/components/editor/src/index.vue.d.ts +72 -0
  15. package/dist/components/editor/src/mentionModal.vue.d.ts +9 -0
  16. package/dist/components/form/index.d.ts +190 -0
  17. package/dist/components/form/src/formItem.vue.d.ts +27 -0
  18. package/dist/components/form/src/index.vue.d.ts +108 -0
  19. package/dist/components/pagination/index.d.ts +40 -0
  20. package/dist/components/pagination/src/index.vue.d.ts +38 -0
  21. package/dist/components/player/index.d.ts +2 -0
  22. package/dist/components/svg-icon/index.d.ts +54 -0
  23. package/dist/components/svg-icon/src/index.vue.d.ts +27 -0
  24. package/dist/components/table-plus/index.d.ts +3088 -0
  25. package/dist/components/table-plus/src/Grid/interface/index.d.ts +5 -0
  26. package/dist/components/table-plus/src/SearchForm/SearchFormItem.vue.d.ts +29 -0
  27. package/dist/components/table-plus/src/SearchForm/index.vue.d.ts +44 -0
  28. package/dist/components/table-plus/src/components/ColSetting.vue.d.ts +20 -0
  29. package/dist/components/table-plus/src/components/Pagination.vue.d.ts +57 -0
  30. package/dist/components/table-plus/src/components/TableColumn.vue.d.ts +18 -0
  31. package/dist/components/table-plus/src/components/Tabs.vue.d.ts +41 -0
  32. package/dist/components/table-plus/src/components/Tree.vue.d.ts +175 -0
  33. package/dist/components/table-plus/src/hooks/useApi.d.ts +10 -0
  34. package/dist/components/table-plus/src/hooks/useDownload.d.ts +9 -0
  35. package/dist/components/table-plus/src/hooks/useHandleData.d.ts +11 -0
  36. package/dist/components/table-plus/src/hooks/useSelection.d.ts +17 -0
  37. package/dist/components/table-plus/src/hooks/useTable.d.ts +47 -0
  38. package/dist/components/table-plus/src/index.vue.d.ts +1049 -0
  39. package/dist/components/table-plus/src/interface/index.d.ts +113 -0
  40. package/dist/components/table-plus/src/interface/tabs.d.ts +9 -0
  41. package/dist/components/table-plus/src/utils/index.d.ts +37 -0
  42. package/dist/components/title/index.d.ts +85 -0
  43. package/dist/components/title/src/index.vue.d.ts +51 -0
  44. package/dist/components/tree/index.d.ts +152 -0
  45. package/dist/components/tree/src/index.vue.d.ts +91 -0
  46. package/dist/components/upload/index.d.ts +223 -0
  47. package/dist/components/upload/src/index.vue.d.ts +78 -0
  48. package/dist/components/uploadImg/index.d.ts +284 -0
  49. package/dist/components/uploadImg/src/index.vue.d.ts +103 -0
  50. package/dist/components/user-select/index.d.ts +102 -0
  51. package/dist/components/user-select/src/index.vue.d.ts +50 -0
  52. package/dist/components/withInstall.d.ts +5 -0
  53. package/dist/index.d.ts +20 -0
  54. package/dist/plugins/SvgBuilder/index.d.ts +4 -0
  55. package/dist/plugins/index.d.ts +7 -0
  56. package/dist/qy-ui-for-ls.es.js +83811 -0
  57. package/dist/qy-ui-for-ls.es2.js +45 -0
  58. package/dist/style.css +1 -0
  59. package/dist/utils/styles.d.ts +1 -0
  60. package/dist/vite.svg +1 -0
  61. package/package.json +1 -1
@@ -0,0 +1,113 @@
1
+ import { VNode, ComponentPublicInstance, Ref } from 'vue';
2
+ import { BreakPoint, Responsive } from '../Grid/interface';
3
+ import { TableColumnCtx } from 'element-plus/es/components/table/src/table-column/defaults';
4
+ import { ProTableProps, default as ProTable } from '../index.vue';
5
+
6
+ export interface EnumProps {
7
+ label?: string;
8
+ value?: string | number | boolean | any[];
9
+ disabled?: boolean;
10
+ tagType?: string;
11
+ children?: EnumProps[];
12
+ [key: string]: any;
13
+ }
14
+ export type TypeProps = "index" | "selection" | "radio" | "expand" | "sort" | "d-index";
15
+ export type SearchElType = "input" | "input-number" | "select" | "select-v2" | "tree-select" | "cascader" | "date-picker" | "time-picker" | "time-select" | "switch" | "slider";
16
+ export type SearchRenderScope = {
17
+ searchParam: {
18
+ [key: string]: any;
19
+ };
20
+ placeholder: string;
21
+ clearable: boolean;
22
+ options: EnumProps[];
23
+ data: EnumProps[];
24
+ };
25
+ export type SearchProps = {
26
+ el?: SearchElType;
27
+ label?: string;
28
+ props?: any;
29
+ key?: string;
30
+ tooltip?: string;
31
+ order?: number;
32
+ span?: number;
33
+ offset?: number;
34
+ defaultValue?: string | number | boolean | any[] | Ref<any>;
35
+ render?: (scope: SearchRenderScope) => VNode;
36
+ } & Partial<Record<BreakPoint, Responsive>>;
37
+ export type FieldNamesProps = {
38
+ label: string;
39
+ value: string;
40
+ children?: string;
41
+ };
42
+ export type RenderScope<T> = {
43
+ row: T;
44
+ $index: number;
45
+ column: TableColumnCtx<T>;
46
+ [key: string]: any;
47
+ };
48
+ export type HeaderRenderScope<T> = {
49
+ $index: number;
50
+ column: TableColumnCtx<T>;
51
+ [key: string]: any;
52
+ };
53
+ export interface CrudProps<T = any> {
54
+ el: string;
55
+ validate?: Array<any>;
56
+ props?: any;
57
+ key?: string;
58
+ tooltip?: string;
59
+ order?: number;
60
+ defaultValue?: any;
61
+ render?: (scope: RenderScope<T>) => VNode;
62
+ }
63
+ export interface ColumnProps<T = any> extends Partial<Omit<TableColumnCtx<T>, "type" | "children" | "renderCell" | "renderHeader">> {
64
+ type?: TypeProps;
65
+ tag?: boolean | Ref<boolean>;
66
+ isShow?: boolean | Ref<boolean>;
67
+ crud?: CrudProps;
68
+ search?: SearchProps;
69
+ enum?: EnumProps[] | Ref<EnumProps[]> | ((params?: any) => Promise<any>);
70
+ isFilterEnum?: boolean | Ref<boolean>;
71
+ fieldNames?: FieldNamesProps;
72
+ headerRender?: (scope: HeaderRenderScope<T>) => VNode;
73
+ render?: (scope: RenderScope<T>) => VNode | string;
74
+ _children?: ColumnProps<T>[];
75
+ }
76
+ export type ProTableInstance = Omit<InstanceType<typeof ProTable>, keyof ComponentPublicInstance | keyof ProTableProps>;
77
+ export interface TreeProps {
78
+ props?: Record<any, any>;
79
+ placeholder?: string;
80
+ query: any;
81
+ active?: any;
82
+ paramKey: string;
83
+ }
84
+ export declare namespace Table {
85
+ interface Pageable {
86
+ current: number;
87
+ size: number;
88
+ total: number;
89
+ }
90
+ interface StateProps {
91
+ tableData: any[];
92
+ pageable: Pageable;
93
+ searchParam: {
94
+ [key: string]: any;
95
+ };
96
+ searchInitParam: {
97
+ [key: string]: any;
98
+ };
99
+ totalParam: {
100
+ [key: string]: any;
101
+ };
102
+ icon?: {
103
+ [key: string]: any;
104
+ };
105
+ }
106
+ }
107
+ export declare namespace HandleData {
108
+ type MessageType = "" | "success" | "warning" | "info" | "error";
109
+ }
110
+ export declare namespace Theme {
111
+ type ThemeType = "light" | "inverted" | "dark";
112
+ type GreyOrWeakType = "grey" | "weak";
113
+ }
@@ -0,0 +1,9 @@
1
+ export type OptionItem = {
2
+ label: string;
3
+ value: string | boolean;
4
+ };
5
+ export interface TabsProps {
6
+ active: string | boolean;
7
+ key: string;
8
+ tabs: Array<OptionItem>;
9
+ }
@@ -0,0 +1,37 @@
1
+ import { FieldNamesProps } from '../interface';
2
+
3
+ export declare const isArray: (val: any) => any;
4
+ /**
5
+ * @description 递归查找 callValue 对应的 enum 值
6
+ * */
7
+ export declare function findItemNested(enumData: any, callValue: any, value: string, children: string): any;
8
+ /**
9
+ * @description 处理 prop 为多级嵌套的情况,返回的数据 (列如: prop: user.name)
10
+ * @param {Object} row 当前行数据
11
+ * @param {String} prop 当前 prop
12
+ * @returns {*}
13
+ * */
14
+ export declare function handleRowAccordingToProp(row: {
15
+ [key: string]: any;
16
+ }, prop: string): any;
17
+ /**
18
+ * @description 处理 ProTable 值为数组 || 无数据
19
+ * @param {*} callValue 需要处理的值
20
+ * @returns {String}
21
+ * */
22
+ export declare function formatValue(callValue: any): any;
23
+ /**
24
+ * @description 处理 prop,当 prop 为多级嵌套时 ==> 返回最后一级 prop
25
+ * @param {String} prop 当前 prop
26
+ * @returns {String}
27
+ * */
28
+ export declare function handleProp(prop: string): string;
29
+ /**
30
+ * @description 根据枚举列表查询当需要的数据(如果指定了 label 和 value 的 key值,会自动识别格式化)
31
+ * @param {String} callValue 当前单元格值
32
+ * @param {Array} enumData 字典列表
33
+ * @param {Array} fieldNames label && value && children 的 key 值
34
+ * @param {String} type 过滤类型(目前只有 tag)
35
+ * @returns {String}
36
+ * */
37
+ export declare function filterEnum(callValue: any, enumData?: any, fieldNames?: FieldNamesProps, type?: "tag"): any;
@@ -0,0 +1,85 @@
1
+ import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
2
+ declare const QyTitle: ({
3
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
4
+ size: {
5
+ type: PropType<number>;
6
+ default: undefined;
7
+ };
8
+ text: {
9
+ type: PropType<string>;
10
+ default: string;
11
+ };
12
+ level: {
13
+ type: PropType<1 | 2 | 3>;
14
+ default: number;
15
+ };
16
+ showIcon: {
17
+ type: PropType<boolean>;
18
+ default: boolean;
19
+ };
20
+ }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
21
+ size: number;
22
+ text: string;
23
+ level: 1 | 2 | 3;
24
+ showIcon: boolean;
25
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
26
+ P: {};
27
+ B: {};
28
+ D: {};
29
+ C: {};
30
+ M: {};
31
+ Defaults: {};
32
+ }, Readonly< ExtractPropTypes<{
33
+ size: {
34
+ type: PropType<number>;
35
+ default: undefined;
36
+ };
37
+ text: {
38
+ type: PropType<string>;
39
+ default: string;
40
+ };
41
+ level: {
42
+ type: PropType<1 | 2 | 3>;
43
+ default: number;
44
+ };
45
+ showIcon: {
46
+ type: PropType<boolean>;
47
+ default: boolean;
48
+ };
49
+ }>> & Readonly<{}>, {}, {}, {}, {}, {
50
+ size: number;
51
+ text: string;
52
+ level: 1 | 2 | 3;
53
+ showIcon: boolean;
54
+ }>;
55
+ __isFragment?: never;
56
+ __isTeleport?: never;
57
+ __isSuspense?: never;
58
+ } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
59
+ size: {
60
+ type: PropType<number>;
61
+ default: undefined;
62
+ };
63
+ text: {
64
+ type: PropType<string>;
65
+ default: string;
66
+ };
67
+ level: {
68
+ type: PropType<1 | 2 | 3>;
69
+ default: number;
70
+ };
71
+ showIcon: {
72
+ type: PropType<boolean>;
73
+ default: boolean;
74
+ };
75
+ }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
76
+ size: number;
77
+ text: string;
78
+ level: 1 | 2 | 3;
79
+ showIcon: boolean;
80
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
81
+ $slots: {
82
+ preIcon?(_: {}): any;
83
+ };
84
+ }) & Plugin) & Record<string, any>;
85
+ export default QyTitle;
@@ -0,0 +1,51 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
2
+ type LevelType = 1 | 2 | 3;
3
+ export interface TitlePorps {
4
+ text?: string;
5
+ level?: LevelType;
6
+ showIcon?: boolean;
7
+ size?: number;
8
+ }
9
+ declare function __VLS_template(): {
10
+ preIcon?(_: {}): any;
11
+ };
12
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TitlePorps>, {
13
+ text: string;
14
+ level: number;
15
+ showIcon: boolean;
16
+ size: undefined;
17
+ }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TitlePorps>, {
18
+ text: string;
19
+ level: number;
20
+ showIcon: boolean;
21
+ size: undefined;
22
+ }>>> & Readonly<{}>, {
23
+ size: number;
24
+ text: string;
25
+ level: LevelType;
26
+ showIcon: boolean;
27
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
28
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
29
+ export default _default;
30
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
31
+ type __VLS_TypePropsToRuntimeProps<T> = {
32
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
33
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
34
+ } : {
35
+ type: PropType<T[K]>;
36
+ required: true;
37
+ };
38
+ };
39
+ type __VLS_WithDefaults<P, D> = {
40
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
41
+ default: D[K];
42
+ }> : P[K];
43
+ };
44
+ type __VLS_Prettify<T> = {
45
+ [K in keyof T]: T[K];
46
+ } & {};
47
+ type __VLS_WithTemplateSlots<T, S> = T & {
48
+ new (): {
49
+ $slots: S;
50
+ };
51
+ };
@@ -0,0 +1,152 @@
1
+ import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, ComponentOptionsBase, VNodeProps, AllowedComponentProps, ComponentCustomProps, Plugin } from 'vue';
2
+ declare const QyTree: ({
3
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
4
+ height: {
5
+ type: StringConstructor;
6
+ default: string;
7
+ };
8
+ indent: {
9
+ type: NumberConstructor;
10
+ default: number;
11
+ };
12
+ offsetY: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ leafKey: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ dashColor: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ };
24
+ placeholder: {
25
+ type: StringConstructor;
26
+ default: string;
27
+ };
28
+ defaultProps: {
29
+ type: ObjectConstructor;
30
+ default: () => {
31
+ label: string;
32
+ children: string;
33
+ };
34
+ };
35
+ }>> & Readonly<{
36
+ on?: ((...args: any[]) => any) | undefined;
37
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
38
+ "": (...args: any[]) => void;
39
+ }, PublicProps, {
40
+ height: string;
41
+ defaultProps: Record<string, any>;
42
+ offsetY: string;
43
+ placeholder: string;
44
+ indent: number;
45
+ leafKey: string;
46
+ dashColor: string;
47
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
48
+ P: {};
49
+ B: {};
50
+ D: {};
51
+ C: {};
52
+ M: {};
53
+ Defaults: {};
54
+ }, Readonly< ExtractPropTypes<{
55
+ height: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ indent: {
60
+ type: NumberConstructor;
61
+ default: number;
62
+ };
63
+ offsetY: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ leafKey: {
68
+ type: StringConstructor;
69
+ default: string;
70
+ };
71
+ dashColor: {
72
+ type: StringConstructor;
73
+ default: string;
74
+ };
75
+ placeholder: {
76
+ type: StringConstructor;
77
+ default: string;
78
+ };
79
+ defaultProps: {
80
+ type: ObjectConstructor;
81
+ default: () => {
82
+ label: string;
83
+ children: string;
84
+ };
85
+ };
86
+ }>> & Readonly<{
87
+ on?: ((...args: any[]) => any) | undefined;
88
+ }>, {}, {}, {}, {}, {
89
+ height: string;
90
+ defaultProps: Record<string, any>;
91
+ offsetY: string;
92
+ placeholder: string;
93
+ indent: number;
94
+ leafKey: string;
95
+ dashColor: string;
96
+ }>;
97
+ __isFragment?: never;
98
+ __isTeleport?: never;
99
+ __isSuspense?: never;
100
+ } & ComponentOptionsBase<Readonly< ExtractPropTypes<{
101
+ height: {
102
+ type: StringConstructor;
103
+ default: string;
104
+ };
105
+ indent: {
106
+ type: NumberConstructor;
107
+ default: number;
108
+ };
109
+ offsetY: {
110
+ type: StringConstructor;
111
+ default: string;
112
+ };
113
+ leafKey: {
114
+ type: StringConstructor;
115
+ default: string;
116
+ };
117
+ dashColor: {
118
+ type: StringConstructor;
119
+ default: string;
120
+ };
121
+ placeholder: {
122
+ type: StringConstructor;
123
+ default: string;
124
+ };
125
+ defaultProps: {
126
+ type: ObjectConstructor;
127
+ default: () => {
128
+ label: string;
129
+ children: string;
130
+ };
131
+ };
132
+ }>> & Readonly<{
133
+ on?: ((...args: any[]) => any) | undefined;
134
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
135
+ "": (...args: any[]) => void;
136
+ }, string, {
137
+ height: string;
138
+ defaultProps: Record<string, any>;
139
+ offsetY: string;
140
+ placeholder: string;
141
+ indent: number;
142
+ leafKey: string;
143
+ dashColor: string;
144
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
145
+ $slots: {
146
+ default?(_: {
147
+ node: any;
148
+ data: any;
149
+ }): any;
150
+ };
151
+ }) & Plugin) & Record<string, any>;
152
+ export default QyTree;
@@ -0,0 +1,91 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare function __VLS_template(): {
3
+ default?(_: {
4
+ node: any;
5
+ data: any;
6
+ }): any;
7
+ };
8
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
9
+ height: {
10
+ type: StringConstructor;
11
+ default: string;
12
+ };
13
+ indent: {
14
+ type: NumberConstructor;
15
+ default: number;
16
+ };
17
+ offsetY: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ };
21
+ leafKey: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ dashColor: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ placeholder: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
33
+ defaultProps: {
34
+ type: ObjectConstructor;
35
+ default: () => {
36
+ label: string;
37
+ children: string;
38
+ };
39
+ };
40
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
41
+ "": (...args: any[]) => void;
42
+ }, string, PublicProps, Readonly< ExtractPropTypes<{
43
+ height: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ indent: {
48
+ type: NumberConstructor;
49
+ default: number;
50
+ };
51
+ offsetY: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ leafKey: {
56
+ type: StringConstructor;
57
+ default: string;
58
+ };
59
+ dashColor: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ placeholder: {
64
+ type: StringConstructor;
65
+ default: string;
66
+ };
67
+ defaultProps: {
68
+ type: ObjectConstructor;
69
+ default: () => {
70
+ label: string;
71
+ children: string;
72
+ };
73
+ };
74
+ }>> & Readonly<{
75
+ on?: ((...args: any[]) => any) | undefined;
76
+ }>, {
77
+ height: string;
78
+ defaultProps: Record<string, any>;
79
+ offsetY: string;
80
+ placeholder: string;
81
+ indent: number;
82
+ leafKey: string;
83
+ dashColor: string;
84
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
85
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
86
+ export default _default;
87
+ type __VLS_WithTemplateSlots<T, S> = T & {
88
+ new (): {
89
+ $slots: S;
90
+ };
91
+ };