@dazhicheng/ui 1.6.19 → 1.6.21
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/components/tt-form/index.d.ts +2 -2
- package/dist/components/tt-form/src/formApi.d.ts +11 -2
- package/dist/components/tt-form/src/group-form/LazyFormField.vue.js +162 -114
- package/dist/components/tt-form/src/group-form/groupFormApi.js +0 -6
- package/dist/components/tt-form/src/group-form/lazyContext.d.ts +18 -0
- package/dist/components/tt-form/src/group-form/lazyContext.js +64 -36
- package/dist/components/tt-form/src/group-form/types.d.ts +39 -6
- package/dist/components/tt-form/src/group-form/useGroupForm.d.ts +7 -5
- package/dist/components/tt-form/src/types.d.ts +58 -26
- package/dist/components/tt-form/src/useForm.d.ts +1 -1
- package/dist/components/tt-form/src/useForm.js +5 -5
- package/dist/components/tt-modal/index.d.ts +1 -0
- package/dist/components/tt-modal/index.js +8 -3
- package/dist/components/tt-modal/src/RenderModal.vue.js +224 -210
- package/dist/components/tt-modal/src/hooks/useModalRender.js +66 -67
- package/dist/components/tt-modal/src/index.js +9 -7
- package/dist/components/tt-modal/src/utils/modal-api.d.ts +9 -3
- package/dist/components/tt-modal/src/utils/modal-api.js +42 -36
- package/dist/components/tt-modal/src/utils/modal-close-transition.d.ts +13 -0
- package/dist/components/tt-modal/src/utils/modal-close-transition.js +13 -0
- package/dist/components/tt-modal/src/utils/modal-host-app.d.ts +5 -0
- package/dist/components/tt-modal/src/utils/modal-host-app.js +12 -0
- package/dist/components/tt-modal/src/utils/modal-scope.d.ts +21 -0
- package/dist/components/tt-modal/src/utils/modal-scope.js +20 -0
- package/dist/components/tt-modal/src/utils/modal-service.d.ts +23 -0
- package/dist/components/tt-modal/src/utils/modal-service.js +51 -0
- package/dist/components/tt-modal/src/utils/modal-stack.d.ts +14 -13
- package/dist/components/tt-modal/src/utils/modal-stack.js +20 -9
- package/dist/components/tt-modal/src/utils/modal-z-index.d.ts +15 -0
- package/dist/components/tt-modal/src/utils/modal-z-index.js +24 -0
- package/dist/components/tt-modal/src/utils/resolve-modal-target.d.ts +14 -0
- package/dist/components/tt-modal/src/utils/resolve-modal-target.js +83 -47
- package/dist/components/tt-modal-form/props.d.ts +9 -4
- package/dist/components/tt-modal-form/useModalForm.d.ts +1 -1
- package/dist/components/tt-table/index.d.ts +15 -0
- package/dist/components/tt-table/src/Table.vue.d.ts +9 -0
- package/dist/components/tt-table/src/Table.vue.js +240 -242
- package/dist/components/tt-table/src/TableForm.vue.d.ts +7 -5
- package/dist/components/tt-table/src/TableForm.vue.js +199 -180
- package/dist/components/tt-table/src/hooks/usePagination.d.ts +1 -1
- package/dist/components/tt-table/src/hooks/usePagination.js +38 -24
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +4 -4
- package/dist/components/tt-table/src/props.d.ts +6 -0
- package/dist/components/tt-table/src/props.js +5 -0
- package/dist/components/tt-table/src/types/table.d.ts +8 -0
- package/dist/components/tt-table/src/types/tableForm.d.ts +29 -14
- package/dist/components/tt-table/src/utils/table-form-api.d.ts +11 -11
- package/dist/index.js +132 -127
- package/package.json +1 -1
|
@@ -1,52 +1,66 @@
|
|
|
1
|
-
import { GlobalConfig as
|
|
1
|
+
import { GlobalConfig as s } from "../../../../hooks/useSetup.js";
|
|
2
2
|
import "axios";
|
|
3
3
|
import "element-plus";
|
|
4
|
+
import { isFunction as P } from "../../../../packages/utils/src/is.js";
|
|
5
|
+
import { ref as h, unref as t, computed as C, watch as y } from "vue";
|
|
4
6
|
import "dayjs";
|
|
5
|
-
import { ref as c, unref as o, computed as P, watch as l } from "vue";
|
|
6
7
|
import "numeral";
|
|
7
8
|
import "xe-utils";
|
|
8
9
|
import "dayjs/plugin/utc";
|
|
9
10
|
import "dayjs/plugin/timezone";
|
|
10
|
-
import { mergeWithArrayOverride as
|
|
11
|
+
import { mergeWithArrayOverride as b } from "../../../../packages/utils/src/merge.js";
|
|
11
12
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
12
13
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
13
14
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
14
15
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
15
16
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
16
17
|
import "lodash-es";
|
|
17
|
-
const
|
|
18
|
+
const z = {
|
|
18
19
|
currentPage: 1,
|
|
19
20
|
pageSize: 300,
|
|
20
21
|
total: 0,
|
|
21
22
|
pageSizes: [300, 500, 1e3, 2e3],
|
|
22
23
|
layouts: ["Total", "PrevPage", "JumpNumber", "NextPage", "Sizes", "FullJump"]
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
-
var
|
|
26
|
-
const r =
|
|
27
|
-
|
|
28
|
-
),
|
|
29
|
-
const { showPager:
|
|
30
|
-
if (!(!
|
|
31
|
-
return { ...
|
|
25
|
+
function D(i, f) {
|
|
26
|
+
var u;
|
|
27
|
+
const r = h(
|
|
28
|
+
b(t(i).pagerConfig || {}, ((u = s.table) == null ? void 0 : u.pagerConfig) || {})
|
|
29
|
+
), g = C(() => {
|
|
30
|
+
const { showPager: e, pagerConfig: n } = t(i);
|
|
31
|
+
if (!(!e && !n))
|
|
32
|
+
return { ...z, ...t(r) };
|
|
32
33
|
});
|
|
33
|
-
function
|
|
34
|
-
return
|
|
34
|
+
function c() {
|
|
35
|
+
return t(g);
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
r.value = { ...
|
|
37
|
+
function o(e) {
|
|
38
|
+
r.value = { ...t(r), ...e };
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
let a = !1;
|
|
41
|
+
async function l(e) {
|
|
42
|
+
const { currentPage: n, pageSize: m } = e, { beforePageChange: p } = t(i);
|
|
43
|
+
if (P(p)) {
|
|
44
|
+
if (a) return;
|
|
45
|
+
a = !0;
|
|
46
|
+
try {
|
|
47
|
+
if (await p({ ...t(r), currentPage: n, pageSize: m }) === !1) return;
|
|
48
|
+
} catch {
|
|
49
|
+
return;
|
|
50
|
+
} finally {
|
|
51
|
+
a = !1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
o({ currentPage: n, pageSize: m }), f("page-change", e);
|
|
41
55
|
}
|
|
42
|
-
return
|
|
43
|
-
() =>
|
|
44
|
-
(
|
|
45
|
-
|
|
56
|
+
return y(
|
|
57
|
+
() => t(i).pagerConfig,
|
|
58
|
+
(e) => {
|
|
59
|
+
e && o(e);
|
|
46
60
|
},
|
|
47
61
|
{ deep: !0 }
|
|
48
|
-
), { pagination: r, paginationInfo:
|
|
62
|
+
), { pagination: r, paginationInfo: g, getPagination: c, setPagination: o, onPageChange: l };
|
|
49
63
|
}
|
|
50
64
|
export {
|
|
51
|
-
|
|
65
|
+
D as usePagination
|
|
52
66
|
};
|
|
@@ -16,9 +16,9 @@ type TtTableRenderEmits = Record<string, (...args: any[]) => any>;
|
|
|
16
16
|
*
|
|
17
17
|
* `Row` 是业务行数据类型,传入后表格插槽作用域与 `tableFormApi.tableApi` 的方法签名跟着推断。
|
|
18
18
|
*/
|
|
19
|
-
export type TtUseTableFormRenderReturnType<Row = any> = [
|
|
20
|
-
DefineSetupFnComponent<TtTableFormProps<Row>, TtTableRenderEmits, SlotsType<TtTableSlots<Row>>>,
|
|
21
|
-
TtTableExtendedTableFormApi<Row>
|
|
19
|
+
export type TtUseTableFormRenderReturnType<Row = any, TValues extends Record<string, any> = Record<string, any>> = [
|
|
20
|
+
DefineSetupFnComponent<TtTableFormProps<Row, TValues>, TtTableRenderEmits, SlotsType<TtTableSlots<Row>>>,
|
|
21
|
+
TtTableExtendedTableFormApi<Row, TValues>
|
|
22
22
|
];
|
|
23
23
|
/**
|
|
24
24
|
* useTableRender 的返回值
|
|
@@ -61,7 +61,7 @@ export type TtUseTableRenderReturnType<Row = any> = [
|
|
|
61
61
|
* // 在模板中使用
|
|
62
62
|
* <FormTable />
|
|
63
63
|
*/
|
|
64
|
-
export declare function useTableFormRender<Row = any>(options: NoInfer<TtTableFormProps<Row>>): TtUseTableFormRenderReturnType<Row>;
|
|
64
|
+
export declare function useTableFormRender<Row = any, TValues extends Record<string, any> = Record<string, any>>(options: NoInfer<TtTableFormProps<Row, TValues>>): TtUseTableFormRenderReturnType<Row, TValues>;
|
|
65
65
|
/**
|
|
66
66
|
* 用于渲染表格的 hooks,返回 [TableRender 组件, 表格API]。
|
|
67
67
|
*
|
|
@@ -71,6 +71,11 @@ export declare const tableProps: {
|
|
|
71
71
|
type: PropType<TtTableProps["beforeFetch"]>;
|
|
72
72
|
default: null;
|
|
73
73
|
};
|
|
74
|
+
/** 用户操作分页器请求前的回调,返回 false 拦下这次翻页 */
|
|
75
|
+
beforePageChange: {
|
|
76
|
+
type: PropType<TtTableProps["beforePageChange"]>;
|
|
77
|
+
default: null;
|
|
78
|
+
};
|
|
74
79
|
/**
|
|
75
80
|
* data
|
|
76
81
|
*
|
|
@@ -479,6 +484,7 @@ export declare const tableFormProps: {
|
|
|
479
484
|
immediate?: boolean;
|
|
480
485
|
afterFetch?: ((data: any[], res: Recordable | Recordable[]) => Promise<any[]>) | undefined;
|
|
481
486
|
beforeFetch?: (params: Recordable) => Promise<Recordable>;
|
|
487
|
+
beforePageChange?: (page: import("vxe-table").VxeGridPropTypes.PagerConfig) => boolean | Promise<boolean>;
|
|
482
488
|
isScrollFetch?: boolean;
|
|
483
489
|
showToolbar?: boolean;
|
|
484
490
|
columnsFieldSort?: string[];
|
|
@@ -77,6 +77,14 @@ export type TtTableFetchProps<Row = any> = {
|
|
|
77
77
|
* @param params 请求参数
|
|
78
78
|
*/
|
|
79
79
|
beforeFetch?: (params: Recordable) => Promise<Recordable>;
|
|
80
|
+
/**
|
|
81
|
+
* 用户操作分页器发起请求前的回调,返回 `false` 拦下这次翻页,页码保持原样。
|
|
82
|
+
*
|
|
83
|
+
* 只拦分页器上的交互,代码里调 `setPagination()` 改分页不经过它。
|
|
84
|
+
* `TtTableForm` 会用它把分页接到 `tableSearchBefore` 上,用表单的组合方式时不必自己传。
|
|
85
|
+
* @param page 这次要切到的分页信息
|
|
86
|
+
*/
|
|
87
|
+
beforePageChange?: (page: VxeGridPropTypes.PagerConfig) => boolean | Promise<boolean>;
|
|
80
88
|
/** 是否滚动加载 */
|
|
81
89
|
isScrollFetch?: boolean;
|
|
82
90
|
};
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { MaybeRef, Ref } from 'vue';
|
|
2
|
-
import { Recordable } from '../../../../../../utils/src';
|
|
3
2
|
import { TtSelectRowKeysType, TtTableMethods, TtTableProps } from '../types/table';
|
|
4
3
|
import { TableFormApi } from '../utils/table-form-api';
|
|
5
4
|
import { TtTableToolsProps } from './tableTools';
|
|
6
5
|
import { TtExtendedFormApi, TtFormProps } from '../../../tt-form';
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
/**
|
|
7
|
+
* 搜索表单配置。
|
|
8
|
+
*
|
|
9
|
+
* `TValues` 是搜索表单的值类型,由 `useTableFormRender<Row, SearchValues>()` 传入后,
|
|
10
|
+
* schema 里 `dependencies` 等回调的 values 参数会跟着推断;不传时退化为 `Record<string, any>`。
|
|
11
|
+
*/
|
|
12
|
+
export type TtTableFormRenderFormProps<TValues extends Record<string, any> = Record<string, any>> = Partial<TtFormProps<TValues>>;
|
|
13
|
+
export type TtTableRenderFormInstance<TValues extends Record<string, any> = Record<string, any>> = TtExtendedFormApi<TValues>;
|
|
14
|
+
/**
|
|
15
|
+
* 触发查询的入口。
|
|
16
|
+
*
|
|
17
|
+
* `submit` 查询按钮或回车提交,`reset` 重置按钮,`refresh` 工具栏刷新按钮,`page` 分页器翻页或改每页条数。
|
|
18
|
+
*/
|
|
19
|
+
export type TtTableSearchTrigger = "submit" | "reset" | "refresh" | "page";
|
|
9
20
|
/**
|
|
10
21
|
* 查询前拦截的返回结果。
|
|
11
22
|
*
|
|
@@ -22,12 +33,13 @@ export type TtTableSearchBeforeResult = boolean | {
|
|
|
22
33
|
*
|
|
23
34
|
* `Row` 是业务行数据类型,由 `useTableFormRender<Row>()` 传入后 `table` 里的列配置、
|
|
24
35
|
* 数据与 `tableApi` 的方法签名都会跟着推断;不传时退化为 `any`。
|
|
36
|
+
* `TValues` 是搜索表单的值类型,由第二个类型参数传入,决定 `form` 里各回调的 values 类型。
|
|
25
37
|
*/
|
|
26
|
-
export type TtTableFormProps<Row = any> = {
|
|
38
|
+
export type TtTableFormProps<Row = any, TValues extends Record<string, any> = Record<string, any>> = {
|
|
27
39
|
/** 表格配置 */
|
|
28
40
|
table?: Partial<TtTableProps<Row>>;
|
|
29
41
|
/** form 配置 */
|
|
30
|
-
form?: TtTableFormRenderFormProps
|
|
42
|
+
form?: TtTableFormRenderFormProps<TValues>;
|
|
31
43
|
/** 是否开启form表单 */
|
|
32
44
|
useSearchForm?: boolean;
|
|
33
45
|
handleSearchInfoFn?: Fn;
|
|
@@ -36,12 +48,15 @@ export type TtTableFormProps<Row = any> = {
|
|
|
36
48
|
/** 刷新前的调用方法 */
|
|
37
49
|
tableRefreshBefore?: (...arg: any[]) => Promise<any>;
|
|
38
50
|
/**
|
|
39
|
-
*
|
|
51
|
+
* 用户操作发起查询请求前的调用方法。
|
|
40
52
|
*
|
|
41
53
|
* 返回 `false` 拦截本次查询;返回 `{ canSearch, clearData }` 可以在拦截的同时清空表格数据。
|
|
42
|
-
*
|
|
54
|
+
* 覆盖查询、重置、工具栏刷新与分页器四个用户入口;`table.immediate` 的首次自动请求、
|
|
55
|
+
* `reload()` / `setPagination()` 等 API 调用都不经过这里。分页被拦下时页码保持原样。
|
|
56
|
+
* @param values 通过校验后的当前表单值,重置时是重置后的值
|
|
57
|
+
* @param trigger 触发入口
|
|
43
58
|
*/
|
|
44
|
-
tableSearchBefore?: (values:
|
|
59
|
+
tableSearchBefore?: (values: TValues, trigger: TtTableSearchTrigger) => TtTableSearchBeforeResult | Promise<TtTableSearchBeforeResult>;
|
|
45
60
|
/**
|
|
46
61
|
* 表格 testId,用于生成测试标识
|
|
47
62
|
* 如果不指定,将从 table.api 路径自动提取
|
|
@@ -50,13 +65,13 @@ export type TtTableFormProps<Row = any> = {
|
|
|
50
65
|
*/
|
|
51
66
|
testId?: string;
|
|
52
67
|
};
|
|
53
|
-
export type TtTableFormActionType<Row = any> = {
|
|
68
|
+
export type TtTableFormActionType<Row = any, TValues extends Record<string, any> = Record<string, any>> = {
|
|
54
69
|
setTableProps: (props: Partial<TtTableProps<Row>>) => void;
|
|
55
|
-
setFormProps: (props: TtTableFormRenderFormProps) => void;
|
|
70
|
+
setFormProps: (props: TtTableFormRenderFormProps<TValues>) => void;
|
|
56
71
|
tableMethods: TtTableMethods<Row>;
|
|
57
|
-
formMethods: TtTableRenderFormInstance
|
|
72
|
+
formMethods: TtTableRenderFormInstance<TValues>;
|
|
58
73
|
/** 设置props */
|
|
59
|
-
setProps: (props: Partial<TtTableFormProps<Row>>) => void;
|
|
74
|
+
setProps: (props: Partial<TtTableFormProps<Row, TValues>>) => void;
|
|
60
75
|
/** reload */
|
|
61
76
|
reload: TtTableMethods<Row>["reload"];
|
|
62
77
|
/**
|
|
@@ -65,6 +80,6 @@ export type TtTableFormActionType<Row = any> = {
|
|
|
65
80
|
*/
|
|
66
81
|
selectedKeys: MaybeRef<TtSelectRowKeysType>;
|
|
67
82
|
};
|
|
68
|
-
export type TtTableExtendedTableFormApi<Row = any> = TableFormApi<Row> & {
|
|
69
|
-
useStore: <T = NoInfer<TtTableFormProps<Row>>>(selector?: (state: NoInfer<TtTableFormProps<Row>>) => T) => Readonly<Ref<T>>;
|
|
83
|
+
export type TtTableExtendedTableFormApi<Row = any, TValues extends Record<string, any> = Record<string, any>> = TableFormApi<Row, TValues> & {
|
|
84
|
+
useStore: <T = NoInfer<TtTableFormProps<Row, TValues>>>(selector?: (state: NoInfer<TtTableFormProps<Row, TValues>>) => T) => Readonly<Ref<T>>;
|
|
70
85
|
};
|
|
@@ -13,37 +13,37 @@ import { Store } from '@tanstack/vue-store';
|
|
|
13
13
|
* api.reload()
|
|
14
14
|
* api.setFormProps({ ... })
|
|
15
15
|
*/
|
|
16
|
-
declare class TableFormApi<Row = any> {
|
|
16
|
+
declare class TableFormApi<Row = any, TValues extends Record<string, any> = Record<string, any>> {
|
|
17
17
|
/** form 表单实例(FormApi) */
|
|
18
|
-
formApi: TtExtendedFormApi
|
|
18
|
+
formApi: TtExtendedFormApi<TValues>;
|
|
19
19
|
/** 表格 API 实例(TableApi) */
|
|
20
20
|
tableApi: TtTableExtendedTableApi<Row>;
|
|
21
21
|
/** vxe-grid 表格实例 */
|
|
22
22
|
grid: VxeGridInstance;
|
|
23
23
|
/** 当前表单+表格的 props 状态 */
|
|
24
|
-
state: null | TtTableFormProps<Row>;
|
|
24
|
+
state: null | TtTableFormProps<Row, TValues>;
|
|
25
25
|
/** 表单操作方法集合(TableFormActionType) */
|
|
26
|
-
tableForm: TtTableFormActionType<Row>;
|
|
26
|
+
tableForm: TtTableFormActionType<Row, TValues>;
|
|
27
27
|
/** 响应式 store,存储表单+表格的状态 */
|
|
28
|
-
store: Store<TtTableFormProps<Row>>;
|
|
28
|
+
store: Store<TtTableFormProps<Row, TValues>>;
|
|
29
29
|
private isMounted;
|
|
30
30
|
private stateHandler;
|
|
31
31
|
/**
|
|
32
32
|
* 构造函数,初始化 store、tableApi、状态等
|
|
33
33
|
* @param options 表单+表格配置项
|
|
34
34
|
*/
|
|
35
|
-
constructor(options?: TtTableFormProps<Row>);
|
|
35
|
+
constructor(options?: TtTableFormProps<Row, TValues>);
|
|
36
36
|
/**
|
|
37
37
|
* 组件挂载时调用,注入表单和表格实例
|
|
38
38
|
* @param instance 表单操作方法实例
|
|
39
39
|
* @param formApi 表单实例
|
|
40
40
|
*/
|
|
41
|
-
mount(instance: null | TtTableFormActionType<Row>, formApi: TtExtendedFormApi): void;
|
|
41
|
+
mount(instance: null | TtTableFormActionType<Row, TValues>, formApi: TtExtendedFormApi<TValues>): void;
|
|
42
42
|
/**
|
|
43
43
|
* 更新表单+表格的数据
|
|
44
44
|
* @param stateOrFn 新状态或返回新状态的函数
|
|
45
45
|
*/
|
|
46
|
-
setState(stateOrFn: ((prev: TtTableFormProps<Row>) => Partial<TtTableFormProps<Row>>) | Partial<TtTableFormProps<Row>>): void;
|
|
46
|
+
setState(stateOrFn: ((prev: TtTableFormProps<Row, TValues>) => Partial<TtTableFormProps<Row, TValues>>) | Partial<TtTableFormProps<Row, TValues>>): void;
|
|
47
47
|
/**
|
|
48
48
|
* 重新加载表格数据
|
|
49
49
|
* @param data 可选的查询参数
|
|
@@ -56,7 +56,7 @@ declare class TableFormApi<Row = any> {
|
|
|
56
56
|
/**
|
|
57
57
|
* 获取表单实例
|
|
58
58
|
*/
|
|
59
|
-
formInstance():
|
|
59
|
+
formInstance(): TtExtendedFormApi<TValues>;
|
|
60
60
|
/**
|
|
61
61
|
* 获取 vxe-grid 表格实例
|
|
62
62
|
*/
|
|
@@ -74,12 +74,12 @@ declare class TableFormApi<Row = any> {
|
|
|
74
74
|
* 设置表单属性
|
|
75
75
|
* @param props 表单属性
|
|
76
76
|
*/
|
|
77
|
-
setFormProps(props: Partial<TtTableFormRenderFormProps
|
|
77
|
+
setFormProps(props: Partial<TtTableFormRenderFormProps<TValues>>): void;
|
|
78
78
|
/**
|
|
79
79
|
* 设置表单+表格属性
|
|
80
80
|
* @param props 属性
|
|
81
81
|
*/
|
|
82
|
-
setProps(props: Partial<TtTableFormProps<Row>>): void;
|
|
82
|
+
setProps(props: Partial<TtTableFormProps<Row, TValues>>): void;
|
|
83
83
|
/**
|
|
84
84
|
* 组件卸载时调用,重置挂载状态
|
|
85
85
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,92 +1,93 @@
|
|
|
1
1
|
import { TtButton as p } from "./components/tt-button/index.js";
|
|
2
|
-
import { TtAddButton as
|
|
2
|
+
import { TtAddButton as ao } from "./components/tt-button/index.js";
|
|
3
3
|
import { TtCheckbox as a } from "./components/tt-checkbox/index.js";
|
|
4
4
|
import { TtEmpty as f } from "./components/tt-empty/index.js";
|
|
5
|
-
import { addComponent as s, setConfig as
|
|
6
|
-
import { TtFormItemErrorTooltip as
|
|
7
|
-
import { TtIcon as
|
|
8
|
-
import { TtImage as
|
|
9
|
-
import { RenderDrawer as
|
|
5
|
+
import { addComponent as s, setConfig as d } from "./components/tt-form/index.js";
|
|
6
|
+
import { TtFormItemErrorTooltip as i } from "./components/tt-form-item-error-tooltip/index.js";
|
|
7
|
+
import { TtIcon as l, TtAddIcon as u, TtSubIcon as x } from "./components/tt-icon/index.js";
|
|
8
|
+
import { TtImage as T } from "./components/tt-image/index.js";
|
|
9
|
+
import { RenderDrawer as n } from "./components/tt-drawer/index.js";
|
|
10
10
|
import { RenderModal as c } from "./components/tt-modal/index.js";
|
|
11
|
-
import { TtModal as
|
|
12
|
-
import { TtSelect as
|
|
13
|
-
import { TtText as
|
|
14
|
-
import { TtUpload as
|
|
15
|
-
import { TtNavAnchor as
|
|
16
|
-
import { TtApiComponent as
|
|
11
|
+
import { TtModal as so } from "./components/tt-modal/index.js";
|
|
12
|
+
import { TtSelect as M } from "./components/tt-select/index.js";
|
|
13
|
+
import { TtText as b } from "./components/tt-text/index.js";
|
|
14
|
+
import { TtUpload as w } from "./components/tt-upload/index.js";
|
|
15
|
+
import { TtNavAnchor as R } from "./components/tt-nav-anchor/index.js";
|
|
16
|
+
import { TtApiComponent as h } from "./components/tt-api-component/index.js";
|
|
17
17
|
import * as e from "./directives/index.js";
|
|
18
|
-
import { setup as
|
|
19
|
-
import { TtLog as
|
|
20
|
-
import { TtPanelSelect as
|
|
21
|
-
import { TtRadioGroup as
|
|
22
|
-
import { setXHR as
|
|
18
|
+
import { setup as g } from "./hooks/useSetup.js";
|
|
19
|
+
import { TtLog as A } from "./components/tt-log/index.js";
|
|
20
|
+
import { TtPanelSelect as P } from "./components/tt-panel-select/index.js";
|
|
21
|
+
import { TtRadioGroup as S } from "./components/tt-radio-group/index.js";
|
|
22
|
+
import { setXHR as lo } from "./utils/xhr.js";
|
|
23
23
|
/* empty css */
|
|
24
24
|
/* empty css */
|
|
25
25
|
/* empty css */
|
|
26
26
|
/* empty css */
|
|
27
27
|
/* empty css */
|
|
28
|
-
import { default as
|
|
29
|
-
import { useModalForm as
|
|
30
|
-
import { TtLoading as
|
|
31
|
-
import { TtTable as
|
|
32
|
-
import { useFormSchemasLink as
|
|
33
|
-
import { useDataPermissionOptions as
|
|
34
|
-
import { useBasicDataOptions as
|
|
35
|
-
import { usePanelSelectSchemas as
|
|
36
|
-
import { CODES as
|
|
37
|
-
import { useFormat as
|
|
38
|
-
import { useLoading as
|
|
39
|
-
import { useScreenshotOss as
|
|
40
|
-
import { createUppercaseInputProps as
|
|
28
|
+
import { default as xo } from "./components/tt-area/TtArea.vue.js";
|
|
29
|
+
import { useModalForm as no } from "./components/tt-modal-form/useModalForm.js";
|
|
30
|
+
import { TtLoading as Mo } from "./components/tt-loading/index.js";
|
|
31
|
+
import { TtTable as wo, TtTableAction as Ro, TtTableButton as ho } from "./components/tt-table/index.js";
|
|
32
|
+
import { useFormSchemasLink as Ao } from "./hooks/useFormSchemasLink.js";
|
|
33
|
+
import { useDataPermissionOptions as So } from "./hooks/useDataPermissionOptions.js";
|
|
34
|
+
import { useBasicDataOptions as Do } from "./hooks/useBasicDataOptions.js";
|
|
35
|
+
import { usePanelSelectSchemas as Fo } from "./hooks/usePanelSelectSchemas.js";
|
|
36
|
+
import { CODES as Lo, GROUP_BY as Eo } from "./hooks/basicDataCodes.js";
|
|
37
|
+
import { useFormat as Uo } from "./hooks/useFormat.js";
|
|
38
|
+
import { useLoading as zo } from "./hooks/useLoading.js";
|
|
39
|
+
import { useScreenshotOss as Go } from "./hooks/useScreenshotOss.js";
|
|
40
|
+
import { createUppercaseInputProps as Vo, toUppercaseInputValue as _o, uppercaseInputProps as $o } from "./utils/uppercaseInput.js";
|
|
41
41
|
import { setupDrawer as C } from "./components/tt-drawer/src/index.js";
|
|
42
|
-
import { useShowDrawer as
|
|
42
|
+
import { useShowDrawer as yo } from "./components/tt-drawer/src/index.js";
|
|
43
43
|
import { setupModal as D } from "./components/tt-modal/src/index.js";
|
|
44
|
-
import { useShowModal as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { showTtDrawer as
|
|
48
|
-
import { useDrawerResizable as
|
|
49
|
-
import { showTtModal as
|
|
50
|
-
import {
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
44
|
+
import { useShowModal as Xo } from "./components/tt-modal/src/index.js";
|
|
45
|
+
import { default as Zo } from "./directives/disabled-tip/index.js";
|
|
46
|
+
import { default as Jo } from "./directives/auto-tip/index.js";
|
|
47
|
+
import { showTtDrawer as Qo, useDrawerRender as Wo } from "./components/tt-drawer/src/hooks/useDrawerRender.js";
|
|
48
|
+
import { useDrawerResizable as rr } from "./components/tt-drawer/src/hooks/useResizable.js";
|
|
49
|
+
import { showTtModal as tr, useModalRender as mr } from "./components/tt-modal/src/hooks/useModalRender.js";
|
|
50
|
+
import { closeAllTtModal as ar, closeTtModal as fr, openTtModal as sr, ttModal as dr } from "./components/tt-modal/src/utils/modal-service.js";
|
|
51
|
+
import { default as lr } from "./directives/dialog-resize/index.js";
|
|
52
|
+
import * as ro from "zod";
|
|
53
|
+
import { useGroupForm as xr } from "./components/tt-form/src/group-form/useGroupForm.js";
|
|
54
|
+
import { COMPONENT_MAP as nr } from "./components/tt-form/src/config.js";
|
|
55
|
+
import { useForm as Mr } from "./components/tt-form/src/useForm.js";
|
|
56
|
+
import { TtImageViewer as wr } from "./components/tt-image/src/components/ImageViewer.js";
|
|
57
|
+
import { vTtLoading as hr } from "./components/tt-loading/src/directive.js";
|
|
58
|
+
import { Loading as Ar } from "./components/tt-loading/src/service.js";
|
|
59
|
+
import { useTableContext as Sr, useTableFormContext as Cr } from "./components/tt-table/src/hooks/useTableContext.js";
|
|
60
|
+
import { useTableFormRender as Ir, useTableRender as Fr } from "./components/tt-table/src/hooks/useTableRender.js";
|
|
61
|
+
import { ttUploadProps as Lr } from "./components/tt-upload/src/typing.js";
|
|
61
62
|
const I = [
|
|
62
63
|
p,
|
|
63
|
-
|
|
64
|
+
n,
|
|
64
65
|
c,
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
l,
|
|
67
|
+
M,
|
|
67
68
|
f,
|
|
68
|
-
|
|
69
|
+
b,
|
|
69
70
|
a,
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
i,
|
|
72
|
+
T,
|
|
73
|
+
w,
|
|
72
74
|
R,
|
|
73
|
-
|
|
75
|
+
u,
|
|
74
76
|
x,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
h,
|
|
78
|
+
A,
|
|
77
79
|
P,
|
|
78
|
-
S
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}), C(r), D(r);
|
|
80
|
+
S
|
|
81
|
+
], F = (o) => {
|
|
82
|
+
I.forEach((r) => o.use(r)), Object.keys(e).forEach((r) => {
|
|
83
|
+
const t = e[r], m = r.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
84
|
+
o.directive(m, t);
|
|
85
|
+
}), C(o), D(o);
|
|
85
86
|
};
|
|
86
|
-
function
|
|
87
|
-
s(
|
|
87
|
+
function eo(o) {
|
|
88
|
+
s(o == null ? void 0 : o.components), d(o == null ? void 0 : o.defineRules, o == null ? void 0 : o.modelPropNameMap);
|
|
88
89
|
}
|
|
89
|
-
const
|
|
90
|
+
const to = {
|
|
90
91
|
/**
|
|
91
92
|
* 安装组件
|
|
92
93
|
* @param app Vue 应用实例
|
|
@@ -97,73 +98,77 @@ const tr = {
|
|
|
97
98
|
* @param options 全局参数
|
|
98
99
|
* @returns 合并后的全局参数
|
|
99
100
|
*/
|
|
100
|
-
setup:
|
|
101
|
+
setup: g
|
|
101
102
|
};
|
|
102
103
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
Lo as CODES,
|
|
105
|
+
nr as COMPONENT_MAP,
|
|
106
|
+
Eo as GROUP_BY,
|
|
107
|
+
Ar as Loading,
|
|
108
|
+
n as RenderDrawer,
|
|
108
109
|
c as RenderModal,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
ao as TtAddButton,
|
|
111
|
+
u as TtAddIcon,
|
|
112
|
+
h as TtApiComponent,
|
|
113
|
+
xo as TtArea,
|
|
113
114
|
p as TtButton,
|
|
114
115
|
a as TtCheckbox,
|
|
115
116
|
f as TtEmpty,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
117
|
+
l as TtIcon,
|
|
118
|
+
T as TtImage,
|
|
119
|
+
wr as TtImageViewer,
|
|
120
|
+
Mo as TtLoading,
|
|
121
|
+
A as TtLog,
|
|
122
|
+
so as TtModal,
|
|
123
|
+
R as TtNavAnchor,
|
|
124
|
+
P as TtPanelSelect,
|
|
125
|
+
S as TtRadioGroup,
|
|
126
|
+
M as TtSelect,
|
|
127
|
+
x as TtSubIcon,
|
|
128
|
+
wo as TtTable,
|
|
129
|
+
Ro as TtTableAction,
|
|
130
|
+
ho as TtTableButton,
|
|
131
|
+
b as TtText,
|
|
132
|
+
w as TtUpload,
|
|
132
133
|
s as addComponent,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
134
|
+
Jo as autoTip,
|
|
135
|
+
ar as closeAllTtModal,
|
|
136
|
+
fr as closeTtModal,
|
|
137
|
+
Vo as createUppercaseInputProps,
|
|
138
|
+
to as default,
|
|
139
|
+
lr as dialogResize,
|
|
140
|
+
Zo as disabledTip,
|
|
141
|
+
eo as formAdapter,
|
|
142
|
+
sr as openTtModal,
|
|
143
|
+
d as setConfig,
|
|
144
|
+
lo as setXHR,
|
|
141
145
|
C as setupDrawer,
|
|
142
146
|
D as setupModal,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
Mr as
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
147
|
+
Qo as showTtDrawer,
|
|
148
|
+
tr as showTtModal,
|
|
149
|
+
_o as toUppercaseInputValue,
|
|
150
|
+
dr as ttModal,
|
|
151
|
+
Lr as ttUploadProps,
|
|
152
|
+
$o as uppercaseInputProps,
|
|
153
|
+
Do as useBasicDataOptions,
|
|
154
|
+
So as useDataPermissionOptions,
|
|
155
|
+
Wo as useDrawerRender,
|
|
156
|
+
rr as useDrawerResizable,
|
|
157
|
+
Mr as useForm,
|
|
158
|
+
Ao as useFormSchemasLink,
|
|
159
|
+
Uo as useFormat,
|
|
160
|
+
xr as useGroupForm,
|
|
161
|
+
zo as useLoading,
|
|
162
|
+
no as useModalForm,
|
|
163
|
+
mr as useModalRender,
|
|
164
|
+
Fo as usePanelSelectSchemas,
|
|
165
|
+
Go as useScreenshotOss,
|
|
166
|
+
yo as useShowDrawer,
|
|
167
|
+
Xo as useShowModal,
|
|
168
|
+
Sr as useTableContext,
|
|
169
|
+
Cr as useTableFormContext,
|
|
170
|
+
Ir as useTableFormRender,
|
|
171
|
+
Fr as useTableRender,
|
|
172
|
+
hr as vTtLoading,
|
|
173
|
+
ro as z
|
|
169
174
|
};
|