@dazhicheng/ui 1.5.6 → 1.5.8
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-area/TtArea.vue.d.ts +2 -0
- package/dist/components/tt-area/index.d.ts +1 -0
- package/dist/components/tt-button/index.d.ts +1739 -0
- package/dist/components/tt-button/index.vue.d.ts +1004 -0
- package/dist/components/tt-checkbox/index.d.ts +36 -0
- package/dist/components/tt-checkbox/index.vue.d.ts +28 -0
- package/dist/components/tt-checkbox/type.d.ts +9 -0
- package/dist/components/tt-drawer/index.d.ts +3703 -0
- package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +2121 -0
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.d.ts +94 -0
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.d.ts +27 -0
- package/dist/components/tt-drawer/src/hooks/useDrawerRender.d.ts +10 -0
- package/dist/components/tt-drawer/src/hooks/useResizable.d.ts +9 -0
- package/dist/components/tt-drawer/src/index.d.ts +10 -0
- package/dist/components/tt-drawer/src/props.d.ts +99 -0
- package/dist/components/tt-drawer/src/typing.d.ts +154 -0
- package/dist/components/tt-drawer/src/utils/drawer-api.d.ts +87 -0
- package/dist/components/tt-empty/index.d.ts +18 -0
- package/dist/components/tt-form/index.d.ts +13 -0
- package/dist/components/tt-form/src/components/ExpandableArrow.vue.d.ts +33 -0
- package/dist/components/tt-form/src/components/FormActions.vue.d.ts +34 -0
- package/dist/components/tt-form/src/components/Slot.d.ts +7 -0
- package/dist/components/tt-form/src/config.d.ts +6 -0
- package/dist/components/tt-form/src/form/FormControl.vue.d.ts +19 -0
- package/dist/components/tt-form/src/form/FormDescription.vue.d.ts +23 -0
- package/dist/components/tt-form/src/form/FormItem.vue.d.ts +23 -0
- package/dist/components/tt-form/src/form/FormLabel.vue.d.ts +23 -0
- package/dist/components/tt-form/src/form/FormMessage.vue.d.ts +2 -0
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.d.ts +8 -0
- package/dist/components/tt-form/src/form/FormWarnMessage.vue.d.ts +25 -0
- package/dist/components/tt-form/src/form/RenderContent.vue.d.ts +23 -0
- package/dist/components/tt-form/src/form/index.d.ts +10 -0
- package/dist/components/tt-form/src/form/injectionKeys.d.ts +2 -0
- package/dist/components/tt-form/src/form/useFormField.d.ts +11 -0
- package/dist/components/tt-form/src/form-render/FormField.vue.d.ts +28 -0
- package/dist/components/tt-form/src/form-render/FormLabel.vue.d.ts +27 -0
- package/dist/components/tt-form/src/form-render/context.d.ts +7 -0
- package/dist/components/tt-form/src/form-render/dependencies.d.ts +361 -0
- package/dist/components/tt-form/src/form-render/expandable.d.ts +9 -0
- package/dist/components/tt-form/src/form-render/form.vue.d.ts +38 -0
- package/dist/components/tt-form/src/form-render/helper.d.ts +11 -0
- package/dist/components/tt-form/src/form-render/index.d.ts +3 -0
- package/dist/components/tt-form/src/formApi.d.ts +71 -0
- package/dist/components/tt-form/src/hooks/useEmitAsProps.d.ts +7 -0
- package/dist/components/tt-form/src/hooks/useFormFieldBus.d.ts +14 -0
- package/dist/components/tt-form/src/hooks/useForwardPriorityValues.d.ts +14 -0
- package/dist/components/tt-form/src/hooks/useForwardProps.d.ts +7 -0
- package/dist/components/tt-form/src/hooks/useForwardPropsEmits.d.ts +8 -0
- package/dist/components/tt-form/src/index.vue.d.ts +27 -0
- package/dist/components/tt-form/src/shared/createContext.d.ts +8 -0
- package/dist/components/tt-form/src/shared/global-state.d.ts +17 -0
- package/dist/components/tt-form/src/shared/store.d.ts +1 -0
- package/dist/components/tt-form/src/shared/zod-defaults.d.ts +54 -0
- package/dist/components/tt-form/src/types/common.d.ts +11 -0
- package/dist/components/tt-form/src/types/forms.d.ts +280 -0
- package/dist/components/tt-form/src/types/index.d.ts +3 -0
- package/dist/components/tt-form/src/types/paths.d.ts +142 -0
- package/dist/components/tt-form/src/types/shared.d.ts +19 -0
- package/dist/components/tt-form/src/types.d.ts +383 -0
- package/dist/components/tt-form/src/useForm.d.ts +2 -0
- package/dist/components/tt-form/src/useFormContext.d.ts +12 -0
- package/dist/components/tt-form-item-error-tooltip/index.d.ts +1549 -0
- package/dist/components/tt-form-item-error-tooltip/index.vue.d.ts +784 -0
- package/dist/components/tt-icon/index.d.ts +76 -0
- package/dist/components/tt-icon/index.vue.d.ts +32 -0
- package/dist/components/tt-image/index.d.ts +127 -0
- package/dist/components/tt-image/src/components/ImageViewer.d.ts +89 -0
- package/dist/components/tt-image/tt-image.d.ts +126 -0
- package/dist/components/tt-loading/index.d.ts +16 -0
- package/dist/components/tt-loading/src/directive.d.ts +9 -0
- package/dist/components/tt-loading/src/loading.vue.d.ts +12 -0
- package/dist/components/tt-loading/src/service.d.ts +25 -0
- package/dist/components/tt-loading/src/type.d.ts +20 -0
- package/dist/components/tt-modal/index.d.ts +1809 -0
- package/dist/components/tt-modal/src/RenderModal.vue.d.ts +1008 -0
- package/dist/components/tt-modal/src/components/ModalFooter.vue.d.ts +210 -0
- package/dist/components/tt-modal/src/components/ModalHeader.vue.d.ts +31 -0
- package/dist/components/tt-modal/src/components/ModalWrapper.vue.d.ts +224 -0
- package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +110 -0
- package/dist/components/tt-modal/src/index.d.ts +5 -0
- package/dist/components/tt-modal/src/props.d.ts +161 -0
- package/dist/components/tt-modal/src/typing.d.ts +188 -0
- package/dist/components/tt-modal/src/utils/modal-api.d.ts +97 -0
- package/dist/components/tt-part/index.d.ts +398 -0
- package/dist/components/tt-part/index.vue.d.ts +253 -0
- package/dist/components/tt-part/type.d.ts +100 -0
- package/dist/components/tt-part-item/index.d.ts +105 -0
- package/dist/components/tt-part-item/index.vue.d.ts +71 -0
- package/dist/components/tt-part-item/type.d.ts +81 -0
- package/dist/components/tt-select/index.d.ts +7 -0
- package/dist/components/tt-select/src/Select.vue.d.ts +861 -0
- package/dist/components/tt-select/src/components/SelectTable.vue.d.ts +111 -0
- package/dist/components/tt-select/src/components/Table.vue.d.ts +250 -0
- package/dist/components/tt-select/src/const.d.ts +16 -0
- package/dist/components/tt-select/src/hooks/useDataSource.d.ts +115 -0
- package/dist/components/tt-select/src/hooks/useGrid.d.ts +32 -0
- package/dist/components/tt-select/src/hooks/useKeyboard.d.ts +59 -0
- package/dist/components/tt-select/src/hooks/usePagination.d.ts +16 -0
- package/dist/components/tt-select/src/hooks/useSelect.d.ts +87 -0
- package/dist/components/tt-select/src/hooks/useSelectTableEvent.d.ts +178 -0
- package/dist/components/tt-select/src/props.d.ts +190 -0
- package/dist/components/tt-select/src/types/index.d.ts +142 -0
- package/dist/components/tt-select/src/utils/index.d.ts +9 -0
- package/dist/components/tt-table/index.d.ts +127 -0
- package/dist/components/tt-table/src/Table.vue.d.ts +1685 -0
- package/dist/components/tt-table/src/componentMap.d.ts +8 -0
- package/dist/components/tt-table/src/components/RowContext.d.ts +24 -0
- package/dist/components/tt-table/src/components/TableAction.vue.d.ts +79 -0
- package/dist/components/tt-table/src/components/TableButtons.d.ts +30 -0
- package/dist/components/tt-table/src/components/TableColumnModal.vue.d.ts +26 -0
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +1531 -0
- package/dist/components/tt-table/src/emits.d.ts +1 -0
- package/dist/components/tt-table/src/enum.d.ts +2 -0
- package/dist/components/tt-table/src/hooks/useCellArea.d.ts +15 -0
- package/dist/components/tt-table/src/hooks/useColumns.d.ts +27 -0
- package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +20 -0
- package/dist/components/tt-table/src/hooks/useDataSource.d.ts +29 -0
- package/dist/components/tt-table/src/hooks/useLeftRightSlot.d.ts +1082 -0
- package/dist/components/tt-table/src/hooks/usePagination.d.ts +102 -0
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +30 -0
- package/dist/components/tt-table/src/hooks/useTable.d.ts +7 -0
- package/dist/components/tt-table/src/hooks/useTableContext.d.ts +43 -0
- package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +101 -0
- package/dist/components/tt-table/src/hooks/useTableForm.d.ts +15 -0
- package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +10 -0
- package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +15 -0
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +93 -0
- package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +11 -0
- package/dist/components/tt-table/src/props.d.ts +433 -0
- package/dist/components/tt-table/src/toolProps.d.ts +19 -0
- package/dist/components/tt-table/src/types/table.d.ts +489 -0
- package/dist/components/tt-table/src/types/tableAction.d.ts +26 -0
- package/dist/components/tt-table/src/types/tableForm.d.ts +64 -0
- package/dist/components/tt-table/src/types/tableTools.d.ts +10 -0
- package/dist/components/tt-table/src/utils/context.d.ts +18 -0
- package/dist/components/tt-table/src/utils/filters.d.ts +109 -0
- package/dist/components/tt-table/src/utils/table-api.d.ts +250 -0
- package/dist/components/tt-table/src/utils/table-form-api.d.ts +88 -0
- package/dist/components/tt-table/src/utils/vxeTable.d.ts +28 -0
- package/dist/components/tt-text/index.d.ts +76 -0
- package/dist/components/tt-text/index.vue.d.ts +50 -0
- package/dist/components/tt-tree-select/index.d.ts +5 -0
- package/dist/components/tt-tree-select/src/TtTreeSelect.vue.d.ts +6 -0
- package/dist/components/tt-tree-select/src/cache-options.d.ts +35 -0
- package/dist/components/tt-tree-select/src/select.d.ts +10 -0
- package/dist/components/tt-tree-select/src/tree.d.ts +23 -0
- package/dist/components/tt-tree-select/src/utils.d.ts +10 -0
- package/dist/components/tt-validate/index.d.ts +1 -0
- package/dist/components/tt-validate/src/ErrorMessage.d.ts +61 -0
- package/dist/components/tt-validate/src/Field.d.ts +430 -0
- package/dist/components/tt-validate/src/FieldArray.d.ts +47 -0
- package/dist/components/tt-validate/src/Form.d.ts +271 -0
- package/dist/components/tt-validate/src/config.d.ts +14 -0
- package/dist/components/tt-validate/src/defineRule.d.ts +9 -0
- package/dist/components/tt-validate/src/index.d.ts +36 -0
- package/dist/components/tt-validate/src/symbols.d.ts +6 -0
- package/dist/components/tt-validate/src/types/common.d.ts +11 -0
- package/dist/components/tt-validate/src/types/forms.d.ts +280 -0
- package/dist/components/tt-validate/src/types/index.d.ts +3 -0
- package/dist/components/tt-validate/src/types/paths.d.ts +142 -0
- package/dist/components/tt-validate/src/types/shared.d.ts +19 -0
- package/dist/components/tt-validate/src/useField.d.ts +30 -0
- package/dist/components/tt-validate/src/useFieldArray.d.ts +3 -0
- package/dist/components/tt-validate/src/useFieldError.d.ts +5 -0
- package/dist/components/tt-validate/src/useFieldState.d.ts +47 -0
- package/dist/components/tt-validate/src/useFieldValue.d.ts +5 -0
- package/dist/components/tt-validate/src/useForm.d.ts +23 -0
- package/dist/components/tt-validate/src/useFormErrors.d.ts +4 -0
- package/dist/components/tt-validate/src/useFormValues.d.ts +4 -0
- package/dist/components/tt-validate/src/useIsFieldDirty.d.ts +5 -0
- package/dist/components/tt-validate/src/useIsFieldTouched.d.ts +5 -0
- package/dist/components/tt-validate/src/useIsFieldValid.d.ts +5 -0
- package/dist/components/tt-validate/src/useIsFormDirty.d.ts +4 -0
- package/dist/components/tt-validate/src/useIsFormTouched.d.ts +4 -0
- package/dist/components/tt-validate/src/useIsFormValid.d.ts +4 -0
- package/dist/components/tt-validate/src/useIsSubmitting.d.ts +4 -0
- package/dist/components/tt-validate/src/useIsValidating.d.ts +4 -0
- package/dist/components/tt-validate/src/useResetForm.d.ts +2 -0
- package/dist/components/tt-validate/src/useSetFieldError.d.ts +5 -0
- package/dist/components/tt-validate/src/useSetFieldTouched.d.ts +5 -0
- package/dist/components/tt-validate/src/useSetFieldValue.d.ts +5 -0
- package/dist/components/tt-validate/src/useSetFormErrors.d.ts +4 -0
- package/dist/components/tt-validate/src/useSetFormTouched.d.ts +4 -0
- package/dist/components/tt-validate/src/useSetFormValues.d.ts +4 -0
- package/dist/components/tt-validate/src/useSubmitCount.d.ts +4 -0
- package/dist/components/tt-validate/src/useSubmitForm.d.ts +2 -0
- package/dist/components/tt-validate/src/useValidateField.d.ts +6 -0
- package/dist/components/tt-validate/src/useValidateForm.d.ts +5 -0
- package/dist/components/tt-validate/src/utils/assertions.d.ts +54 -0
- package/dist/components/tt-validate/src/utils/common.d.ts +48 -0
- package/dist/components/tt-validate/src/utils/events.d.ts +1 -0
- package/dist/components/tt-validate/src/utils/index.d.ts +5 -0
- package/dist/components/tt-validate/src/utils/rules.d.ts +13 -0
- package/dist/components/tt-validate/src/utils/shared.d.ts +19 -0
- package/dist/components/tt-validate/src/utils/vnode.d.ts +22 -0
- package/dist/components/tt-validate/src/validate.d.ts +21 -0
- package/dist/components/tt-validate/zod/index.d.ts +1 -0
- package/dist/components/types.d.ts +227 -0
- package/dist/directives/auto-tip/index.d.ts +3 -0
- package/dist/directives/dialog-resize/index.d.ts +25 -0
- package/dist/directives/dialog-resize/use-css-variable.d.ts +1 -0
- package/dist/directives/dialog-resize/use-draggable.d.ts +4 -0
- package/dist/directives/dialog-resize/use-fullscreen.d.ts +1 -0
- package/dist/directives/dialog-resize/use-parse-translate.d.ts +4 -0
- package/dist/directives/dialog-resize/use-resizer.d.ts +2 -0
- package/dist/directives/disabled-tip/index.d.ts +17 -0
- package/dist/directives/index.d.ts +3 -0
- package/dist/hooks/useFormat.d.ts +73 -0
- package/dist/hooks/useLoading.d.ts +9 -0
- package/dist/hooks/useSetup.d.ts +8 -0
- package/dist/hooks/useTable.d.ts +5 -0
- package/dist/hooks/useTemplateSlot.d.ts +9 -0
- package/dist/{index-CMjNBMj5.js → index-NG5FNCLD.js} +2 -3
- package/dist/index.d.ts +46 -0
- package/dist/index.js +502 -542
- package/dist/style.css +1 -1
- package/package.json +4 -6
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { VxeGridPropTypes, VxeTablePropTypes } from 'vxe-table';
|
|
2
|
+
import { TtTableProps } from './tt-table/src/types/table';
|
|
3
|
+
export type Fn<T = any, R = T> = (...arg: T[]) => R;
|
|
4
|
+
export type Nullable<T> = T | null;
|
|
5
|
+
export type Recordable<T = any> = Record<string, T>;
|
|
6
|
+
export type TtUiGlobalConfig = {
|
|
7
|
+
/**
|
|
8
|
+
* 登录的用户id
|
|
9
|
+
*/
|
|
10
|
+
userId?: string | number;
|
|
11
|
+
table?: {
|
|
12
|
+
/** 自定义列服务端配置的key,支持函数动态获取 */
|
|
13
|
+
columnsKey?: string | (() => string);
|
|
14
|
+
/** 自定义列服务端配置接口 - 获取 */
|
|
15
|
+
getColumnsApi?: (params: {
|
|
16
|
+
permissionOnlyCode: string;
|
|
17
|
+
userId: string | number;
|
|
18
|
+
}) => Promise<{
|
|
19
|
+
data: any;
|
|
20
|
+
}>;
|
|
21
|
+
/** 自定义列服务端配置接口 - 当没有id值得时候 */
|
|
22
|
+
setColumnsApi?: (params: {
|
|
23
|
+
permissionOnlyCode: string;
|
|
24
|
+
json: string;
|
|
25
|
+
userId: string | number;
|
|
26
|
+
}) => Promise<any>;
|
|
27
|
+
/** 自定义列服务端配置接口 - 当有id值得时候 */
|
|
28
|
+
updateColumnsApi?: (params: {
|
|
29
|
+
permissionOnlyCode: string;
|
|
30
|
+
json: string;
|
|
31
|
+
userId: string | number;
|
|
32
|
+
}) => Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
* 是否开启服务端缓存
|
|
35
|
+
* @default-false
|
|
36
|
+
*/
|
|
37
|
+
useHttpCache?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 默认展示的列
|
|
40
|
+
* @default-[]
|
|
41
|
+
*/
|
|
42
|
+
defaultDisplayFields?: string[];
|
|
43
|
+
/**
|
|
44
|
+
* 是否开启框选到checkbox自动勾选 field
|
|
45
|
+
* @default-false
|
|
46
|
+
* @deprecated 使用 checkboxConfig.range 替换
|
|
47
|
+
*/
|
|
48
|
+
isAreaCheckboxSelection?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* 当前页数 field
|
|
51
|
+
* @default-pageIndex
|
|
52
|
+
*/
|
|
53
|
+
currentPageField?: string;
|
|
54
|
+
/**
|
|
55
|
+
* 当前页的大小 field
|
|
56
|
+
* @default-pageSize
|
|
57
|
+
*/
|
|
58
|
+
pageSizeField?: string;
|
|
59
|
+
/**
|
|
60
|
+
* 总数 field
|
|
61
|
+
* @default-total
|
|
62
|
+
*/
|
|
63
|
+
totalField?: string;
|
|
64
|
+
/**
|
|
65
|
+
* 数据的 field
|
|
66
|
+
* @default-list
|
|
67
|
+
*/
|
|
68
|
+
dataField?: string;
|
|
69
|
+
/**
|
|
70
|
+
* 表格行id
|
|
71
|
+
* @default-id
|
|
72
|
+
*/
|
|
73
|
+
tableRowId?: string;
|
|
74
|
+
/**
|
|
75
|
+
* 请求的状态码
|
|
76
|
+
* @default-200
|
|
77
|
+
* @deprecated
|
|
78
|
+
*/
|
|
79
|
+
resultCode?: string | number;
|
|
80
|
+
/**
|
|
81
|
+
* loading text
|
|
82
|
+
* @default-loading text
|
|
83
|
+
*/
|
|
84
|
+
loadingText?: string;
|
|
85
|
+
/**
|
|
86
|
+
* empty text
|
|
87
|
+
* @default-暂无数据
|
|
88
|
+
*/
|
|
89
|
+
emptyText?: string;
|
|
90
|
+
/**
|
|
91
|
+
* empty text
|
|
92
|
+
* @default-未查询时文案
|
|
93
|
+
*/
|
|
94
|
+
noSearchText?: string;
|
|
95
|
+
/**
|
|
96
|
+
* @default { isClip: true }
|
|
97
|
+
*/
|
|
98
|
+
keyboardConfig?: VxeTablePropTypes.KeyboardConfig;
|
|
99
|
+
/**
|
|
100
|
+
* @default
|
|
101
|
+
* {
|
|
102
|
+
selected: false,
|
|
103
|
+
}
|
|
104
|
+
*/
|
|
105
|
+
mouseConfig?: VxeTablePropTypes.MouseConfig;
|
|
106
|
+
/**
|
|
107
|
+
* @default
|
|
108
|
+
* {
|
|
109
|
+
pageSize: 300,
|
|
110
|
+
pageSizes: [300, 500, 1000, 2000],
|
|
111
|
+
}
|
|
112
|
+
*/
|
|
113
|
+
pagerConfig?: VxeGridPropTypes.PagerConfig;
|
|
114
|
+
/** 复选框配置 */
|
|
115
|
+
checkboxConfig?: VxeTablePropTypes.CheckboxConfig;
|
|
116
|
+
/** 单选框配置 */
|
|
117
|
+
radioConfig?: VxeTablePropTypes.RadioConfig;
|
|
118
|
+
/** 表格的size */
|
|
119
|
+
size?: VxeGridPropTypes.Size;
|
|
120
|
+
/** 表格边框 */
|
|
121
|
+
border?: "full" | "inner" | boolean;
|
|
122
|
+
/**
|
|
123
|
+
* 是否开启缓存
|
|
124
|
+
* @default-false 不开启
|
|
125
|
+
*/
|
|
126
|
+
useCache?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* 是否显示右边刷新按钮
|
|
129
|
+
* @default-true 显示
|
|
130
|
+
*/
|
|
131
|
+
showRefresh?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* 是否显示右边设置
|
|
134
|
+
* @default-true 显示
|
|
135
|
+
*/
|
|
136
|
+
showSetting?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* 是否显示自定义列
|
|
139
|
+
* @default-true 显示
|
|
140
|
+
*/
|
|
141
|
+
showSetColumn?: boolean;
|
|
142
|
+
/** 自定义函数 */
|
|
143
|
+
customizeColumn?: TtTableProps["customizeColumn"];
|
|
144
|
+
/** 外部插槽 */
|
|
145
|
+
getSyncSlotComponent?: TtTableProps["getSyncSlotComponent"];
|
|
146
|
+
/**
|
|
147
|
+
* 表格斑马线
|
|
148
|
+
* @default- false
|
|
149
|
+
*/
|
|
150
|
+
stripe?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* 请求后的回调
|
|
153
|
+
* @param data 表格数据
|
|
154
|
+
* @param res 原始结果数据
|
|
155
|
+
*/
|
|
156
|
+
afterFetch?: TtTableProps["afterFetch"];
|
|
157
|
+
/**
|
|
158
|
+
* 请求前的回调
|
|
159
|
+
* @param params 请求参数
|
|
160
|
+
*/
|
|
161
|
+
beforeFetch?: TtTableProps["beforeFetch"];
|
|
162
|
+
/**
|
|
163
|
+
* reload 是否重置为第一页
|
|
164
|
+
* @default true
|
|
165
|
+
*/
|
|
166
|
+
isReloadResetToFirstPage?: boolean;
|
|
167
|
+
};
|
|
168
|
+
form: {
|
|
169
|
+
/**
|
|
170
|
+
* 表单的提交按钮字段
|
|
171
|
+
* @default-查询
|
|
172
|
+
*/
|
|
173
|
+
submitTitle?: string;
|
|
174
|
+
};
|
|
175
|
+
TtSelect?: {
|
|
176
|
+
/**
|
|
177
|
+
* 响应结果不分页字段
|
|
178
|
+
* @default-data
|
|
179
|
+
*/
|
|
180
|
+
dataField?: string;
|
|
181
|
+
/**
|
|
182
|
+
* 响应结果分页字段
|
|
183
|
+
* @default-data.list
|
|
184
|
+
*/
|
|
185
|
+
resultField?: string;
|
|
186
|
+
/** 当前页数 field */
|
|
187
|
+
currentPageField?: string;
|
|
188
|
+
/** 当前页的大小 field */
|
|
189
|
+
pageSizeField?: string;
|
|
190
|
+
/**
|
|
191
|
+
* 响应结果分页总数字段 field
|
|
192
|
+
* @default-data.pagination.total
|
|
193
|
+
*/
|
|
194
|
+
totalField?: string;
|
|
195
|
+
/**
|
|
196
|
+
* 只有一条数据是否默认选中, 需要开启立即加载 暂时只兼容了分页数据
|
|
197
|
+
* @default-false
|
|
198
|
+
* @deprecated 使用 defaultSingle 替换
|
|
199
|
+
*/
|
|
200
|
+
isDefaultSelect?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* 是否需要每次展开加载数据
|
|
203
|
+
* @default-false
|
|
204
|
+
*/
|
|
205
|
+
isExpandLoadData?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* 外部值改变是否立即触发emit
|
|
208
|
+
* @deprecated 兼容旧代码,新开发不要使用
|
|
209
|
+
*/
|
|
210
|
+
immediateEmitChange?: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* 只有一条数据是否默认选中, 需要开启立即加载 暂时只兼容了分页数据
|
|
213
|
+
* @default-false
|
|
214
|
+
*/
|
|
215
|
+
defaultSingle?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* 是否选中第一条数据
|
|
218
|
+
* @default-false
|
|
219
|
+
*/
|
|
220
|
+
isSelectFirstOption?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* 渲染模式
|
|
223
|
+
*/
|
|
224
|
+
renderType?: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
export type TtUiGlobalSetup = (options?: TtUiGlobalConfig) => TtUiGlobalConfig;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentInternalInstance, DirectiveBinding, VNode } from 'vue';
|
|
2
|
+
declare function handle(el: HTMLElement, binding: DirectiveBinding, vnode: any): void;
|
|
3
|
+
/**
|
|
4
|
+
* element-plus dialog组件大小缩放功能
|
|
5
|
+
* 不要使用ElDialog自带的 draggable 和 fullscreen
|
|
6
|
+
* @param draggable Boolean 是否支持拖拽
|
|
7
|
+
* @param fullscreen Boolean 是否支持全屏
|
|
8
|
+
* @param resizer Boolean 是否支持自定义大小
|
|
9
|
+
* @param resizeChange Function 自定义大小改变时触发
|
|
10
|
+
* @param draggableLimit Number 拖拽上右下左拖动限制 默认 [50,50,50,50]
|
|
11
|
+
* @param resizerLimit Number 自定义大小限制 默认[260,180]
|
|
12
|
+
* @example
|
|
13
|
+
* <div v-dialogResize="{ draggable: true, resizer: true, resizeChange: (newWidth, newHeight) => {}, fullscreen: true, draggableLimit: [50,50,50,50] }">
|
|
14
|
+
* <el-dialog v-model="dialogVisible" title="Tips" width="30%">
|
|
15
|
+
* </el-dialog>
|
|
16
|
+
* </div>
|
|
17
|
+
*/
|
|
18
|
+
declare const _default: {
|
|
19
|
+
mounted: typeof handle;
|
|
20
|
+
updated: typeof handle;
|
|
21
|
+
beforeUnmount: (_el: HTMLElement, _binding: DirectiveBinding, vnode: VNode & {
|
|
22
|
+
ctx: ComponentInternalInstance;
|
|
23
|
+
}) => void;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useCssVariable(dialogEl: HTMLElement): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComputedRef, DirectiveBinding, Ref } from 'vue';
|
|
2
|
+
export declare function addUnit(value?: string | number, defaultUnit?: string): string | undefined;
|
|
3
|
+
declare function useDraggable(targetRef: Ref<HTMLElement | undefined> | HTMLElement, dragRef: Ref<HTMLElement | undefined> | HTMLElement, draggable: ComputedRef<boolean>, beforeMountedFun: Array<(...args: any) => any>, binding: DirectiveBinding): void;
|
|
4
|
+
export default useDraggable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useFullscreen(dialogEl: HTMLElement, dialogVnode: any): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Directive, MaybeRef } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 定义提示配置项类型
|
|
4
|
+
* @property {boolean | MaybeRef<boolean>} condition - 表示是否禁用的标志,可能是一个响应式引用
|
|
5
|
+
* @property {string} message - 提示信息
|
|
6
|
+
* @property {string} placement - 提示信息位置
|
|
7
|
+
*/
|
|
8
|
+
export interface TipConfig {
|
|
9
|
+
condition: boolean | MaybeRef<boolean>;
|
|
10
|
+
message: string;
|
|
11
|
+
placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 禁用提示指令对象,包含指令的生命周期钩子函数
|
|
15
|
+
*/
|
|
16
|
+
declare const disabledTipDirective: Directive;
|
|
17
|
+
export default disabledTipDirective;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { default as dayjs } from 'dayjs';
|
|
2
|
+
type ILabelFormatType = "period" | "month";
|
|
3
|
+
type FormatReturnType = {
|
|
4
|
+
/**
|
|
5
|
+
* 生成表单验证规则
|
|
6
|
+
* @param message - 验证失败时的提示信息
|
|
7
|
+
* @param trigger - 触发验证的时机,默认为'change'
|
|
8
|
+
* @returns 验证规则数组
|
|
9
|
+
*/
|
|
10
|
+
formatFormRole: (message: string, trigger?: string) => {
|
|
11
|
+
required: boolean;
|
|
12
|
+
message: string;
|
|
13
|
+
trigger: string;
|
|
14
|
+
}[];
|
|
15
|
+
/**
|
|
16
|
+
* 格式化日期时间
|
|
17
|
+
* @param date - 要格式化的日期,可以是字符串、数字、Date对象或dayjs对象
|
|
18
|
+
* @param format - 格式化模板,默认为'YYYY-MM-DD HH:mm:ss'
|
|
19
|
+
* @returns 格式化后的日期时间字符串,无效日期返回'--'
|
|
20
|
+
*/
|
|
21
|
+
formatToDateTime: (date: string | number | Date | dayjs.Dayjs | null | undefined, format?: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* 格式化日期
|
|
24
|
+
* @param date - 要格式化的日期,可以是字符串、数字、Date对象或dayjs对象
|
|
25
|
+
* @param format - 格式化模板,默认为'YYYY-MM-DD'
|
|
26
|
+
* @param isTimeStamp - 是否为时间戳格式,默认为false
|
|
27
|
+
* @returns 格式化后的日期字符串,无效日期返回'--'
|
|
28
|
+
*/
|
|
29
|
+
formatToDate: (date: string | number | Date | dayjs.Dayjs | null | undefined, format?: string, isTimeStamp?: boolean) => string;
|
|
30
|
+
/**
|
|
31
|
+
* 格式化金额数据
|
|
32
|
+
* @param val - 要格式化的金额,可以是数字或字符串
|
|
33
|
+
* @param format - 格式化模板,默认为'0,0.00'
|
|
34
|
+
* @returns 格式化后的金额字符串
|
|
35
|
+
*/
|
|
36
|
+
formatAmount: (val: number | string, format?: string) => string;
|
|
37
|
+
/**
|
|
38
|
+
* 格式化金额为千分位并保留两位小数
|
|
39
|
+
* @param val - 要格式化的数值
|
|
40
|
+
* @param format - 格式化模板,默认为'0,0.00'
|
|
41
|
+
* @returns 格式化后的金额字符串
|
|
42
|
+
*/
|
|
43
|
+
formatAmountOfPlace: (val: number, format?: string) => string;
|
|
44
|
+
/**
|
|
45
|
+
* 将千分位格式的金额字符串转换为数值
|
|
46
|
+
* @param val - 要转换的金额字符串或数值
|
|
47
|
+
* @returns 转换后的数值
|
|
48
|
+
*/
|
|
49
|
+
formatPlaceOfAmount: (val: string | number) => number;
|
|
50
|
+
/**
|
|
51
|
+
* 格式化金额但不四舍五入
|
|
52
|
+
* @param str - 要格式化的金额字符串或数字
|
|
53
|
+
* @param index - 要保留的小数位数
|
|
54
|
+
* @returns 格式化后的金额字符串
|
|
55
|
+
*/
|
|
56
|
+
formatDecimal: (str: string | number, index: number) => string;
|
|
57
|
+
/**
|
|
58
|
+
* 格式化文件大小
|
|
59
|
+
* @param bytes - 文件大小(字节)
|
|
60
|
+
* @param decimalPoint - 保留的小数位数,默认为2
|
|
61
|
+
* @returns 格式化后的文件大小字符串(带单位)
|
|
62
|
+
*/
|
|
63
|
+
formatFileSize: (bytes: number, decimalPoint?: number) => string;
|
|
64
|
+
/**
|
|
65
|
+
* 格式化期间(年月)
|
|
66
|
+
* @param val - 要格式化的期间值,可以是数字或字符串
|
|
67
|
+
* @param formatType - 格式化类型,'period'表示期间,'month'表示月份
|
|
68
|
+
* @returns 格式化后的期间字符串
|
|
69
|
+
*/
|
|
70
|
+
formatPeriod: (val: number | string, formatType?: ILabelFormatType) => string;
|
|
71
|
+
};
|
|
72
|
+
export declare function useFormat(): FormatReturnType;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlotsType } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* 用于处理Vue模板插槽的自定义Hook
|
|
4
|
+
* @param regexp 用于匹配和替换插槽名的正则表达式字符串
|
|
5
|
+
*/
|
|
6
|
+
export declare function useTemplateSlot(regexp: string): {
|
|
7
|
+
getSlotKeys: (slots: SlotsType) => (string | null)[];
|
|
8
|
+
replaceSlotKey: (key: string | null) => string;
|
|
9
|
+
};
|
|
@@ -229,7 +229,7 @@ class $n {
|
|
|
229
229
|
o = this._deprecatedHooks[t], t = o.to;
|
|
230
230
|
if (o && !u.allowDeprecated) {
|
|
231
231
|
let i = o.message;
|
|
232
|
-
i || (i = `${r} hook has been deprecated` + (o.to ? `, please use ${o.to}` : "")), this._deprecatedMessages || (this._deprecatedMessages = /* @__PURE__ */ new Set()), this._deprecatedMessages.has(i) ||
|
|
232
|
+
i || (i = `${r} hook has been deprecated` + (o.to ? `, please use ${o.to}` : "")), this._deprecatedMessages || (this._deprecatedMessages = /* @__PURE__ */ new Set()), this._deprecatedMessages.has(i) || this._deprecatedMessages.add(i);
|
|
233
233
|
}
|
|
234
234
|
if (!n.name)
|
|
235
235
|
try {
|
|
@@ -2359,7 +2359,6 @@ function Nu(e = {}) {
|
|
|
2359
2359
|
fetch(`${A}__open-in-editor?file=${encodeURI(r)}`).then((d) => {
|
|
2360
2360
|
if (!d.ok) {
|
|
2361
2361
|
const m = `Opening component ${p} failed`;
|
|
2362
|
-
console.log(`%c${m}`, "color:red");
|
|
2363
2362
|
}
|
|
2364
2363
|
});
|
|
2365
2364
|
} else if (T.vitePluginDetected) {
|
|
@@ -2989,7 +2988,7 @@ function R(e, t, n, u) {
|
|
|
2989
2988
|
var pn = [
|
|
2990
2989
|
R(fn, "undefined", () => null, () => {
|
|
2991
2990
|
}),
|
|
2992
|
-
R(Er, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) :
|
|
2991
|
+
R(Er, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
2993
2992
|
R(_r, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
2994
2993
|
R(fr, "Error", (e, t) => {
|
|
2995
2994
|
const n = {
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { App, Component } from 'vue';
|
|
2
|
+
import { BaseFormComponentType } from './components/tt-form';
|
|
3
|
+
export * from './components/tt-area';
|
|
4
|
+
export * from './components/tt-button';
|
|
5
|
+
export * from './components/tt-checkbox';
|
|
6
|
+
export * from './components/tt-drawer';
|
|
7
|
+
export * from './components/tt-empty';
|
|
8
|
+
export * from './components/tt-icon';
|
|
9
|
+
export * from './components/tt-modal';
|
|
10
|
+
export * from './components/tt-select';
|
|
11
|
+
export * from './components/tt-text';
|
|
12
|
+
export * from './components/tt-tree-select';
|
|
13
|
+
export * from './directives';
|
|
14
|
+
export * from './components/tt-form';
|
|
15
|
+
export * from './components/tt-image';
|
|
16
|
+
export * from './components/tt-loading';
|
|
17
|
+
export * from './components/tt-part';
|
|
18
|
+
export * from './components/tt-part-item';
|
|
19
|
+
export * from './components/tt-table';
|
|
20
|
+
export { useFormat } from './hooks/useFormat';
|
|
21
|
+
export { useLoading } from './hooks/useLoading';
|
|
22
|
+
/**
|
|
23
|
+
* 表单组件适配器
|
|
24
|
+
* @param options 适配器选项
|
|
25
|
+
*/
|
|
26
|
+
export declare function formAdapter(options?: {
|
|
27
|
+
components?: Partial<Record<BaseFormComponentType, Component>>;
|
|
28
|
+
defineRules?: {
|
|
29
|
+
[key: string]: (value: any, params: any, ctx: Record<string, any>) => boolean | string;
|
|
30
|
+
};
|
|
31
|
+
modelPropNameMap?: Partial<Record<BaseFormComponentType, string>>;
|
|
32
|
+
}): void;
|
|
33
|
+
declare const _default: {
|
|
34
|
+
/**
|
|
35
|
+
* 安装组件
|
|
36
|
+
* @param app Vue 应用实例
|
|
37
|
+
*/
|
|
38
|
+
install: (app: App) => void;
|
|
39
|
+
/**
|
|
40
|
+
* 全局参数设置
|
|
41
|
+
* @param options 全局参数
|
|
42
|
+
* @returns 合并后的全局参数
|
|
43
|
+
*/
|
|
44
|
+
setup: import('./components/types').TtUiGlobalSetup;
|
|
45
|
+
};
|
|
46
|
+
export default _default;
|