@ithinkdt/ui 4.0.15 → 4.0.17
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/auto-imports.js +6 -3
- package/{dist/DataTable-DXZ3G4ZO.js → esm/DataTable-BvLINmq3.js} +3 -3
- package/esm/components-DfV9ybsT.js +2167 -0
- package/esm/components.d.ts +158 -67
- package/esm/components.js +2 -1
- package/esm/composables.js +27 -1
- package/esm/design.d.ts +3 -6
- package/esm/directives.js +2 -1
- package/esm/index.js +1209 -1
- package/esm/page.d.ts +2 -1
- package/esm/page.js +661 -1
- package/esm/use-style.js +31 -1
- package/package.json +9 -10
- package/dist/assets-bJgPKDh1.js +0 -187
- package/dist/components.js +0 -1629
- package/dist/composables.js +0 -27
- package/dist/directives.js +0 -2
- package/dist/index.js +0 -1225
- package/dist/page.js +0 -652
- package/dist/use-style.js +0 -31
- /package/{dist/directives-g3YmS-dM.js → esm/directives-Chz4DK1u.js} +0 -0
- /package/{dist/use-i18n-D1TTDOML.js → esm/use-i18n-BUP_StIp.js} +0 -0
package/esm/components.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { MaybeElement } from '@vueuse/core'
|
|
1
2
|
import {
|
|
2
3
|
AnchorProps, ButtonProps, ButtonSlots, CheckboxGroupProps, DataTableInst as NDataTableInst, DataTableProps as NDataTableProps,
|
|
3
4
|
FlexProps, FormItemGiProps as NFormItemGiProps, FormProps as NFormProps, GridItemProps as NGridItemProps, GridProps as NGridProps,
|
|
4
|
-
PopoverProps, RadioGroupProps, TransferProps,
|
|
5
|
+
IconProps, PopoverProps, RadioGroupProps, ScrollbarProps, TooltipProps, TransferProps,
|
|
5
6
|
} from 'ithinkdt-ui'
|
|
6
7
|
import { TableBaseColumn } from 'ithinkdt-ui/es/data-table/src/interface'
|
|
7
8
|
import { AllowedComponentProps, MaybeRef, MaybeRefOrGetter, VNodeChild } from 'vue'
|
|
@@ -67,17 +68,17 @@ declare module '@ithinkdt/page' {
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
export
|
|
71
|
+
export interface NStateButtonProps extends ButtonProps {
|
|
71
72
|
succeeded?: boolean | null | undefined
|
|
72
73
|
successText?: string | undefined
|
|
73
74
|
failureText?: string | undefined
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
export
|
|
77
|
+
export interface NStateButtonEmits {
|
|
77
78
|
(e: 'click', evt: MouseEvent): void
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
export
|
|
81
|
+
export interface NStateButtonSlots extends ButtonSlots {
|
|
81
82
|
success?: () => VNodeChild
|
|
82
83
|
failure?: () => VNodeChild
|
|
83
84
|
successIcon?: () => VNodeChild
|
|
@@ -91,7 +92,7 @@ export declare function NStateButton(
|
|
|
91
92
|
setup?: GenericCtx<NStateButtonProps, NStateButtonEmits, NStateButtonSlots>,
|
|
92
93
|
): GenericReturn<NStateButtonProps, NStateButtonEmits, NStateButtonSlots>
|
|
93
94
|
|
|
94
|
-
export
|
|
95
|
+
export interface DataFormActionsProps extends Pick<FlexProps, 'align' | 'justify' | 'vertical' | 'reverse'> {
|
|
95
96
|
size?: 'small' | 'medium' | 'large' | undefined
|
|
96
97
|
gap?: number | string | undefined
|
|
97
98
|
submitText?: VNodeChild | undefined
|
|
@@ -111,13 +112,13 @@ export type DataFormActionsProps = Pick<FlexProps, 'align' | 'justify' | 'vertic
|
|
|
111
112
|
nativeButtonType?: boolean | undefined
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
export
|
|
115
|
+
export interface DataFormActionsEmits {
|
|
115
116
|
(e: 'submit'): void
|
|
116
117
|
(e: 'reset'): void
|
|
117
118
|
(e: 'cancel'): void
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
export
|
|
121
|
+
export interface DataFormActionsSlots {
|
|
121
122
|
prefix?: () => VNodeChild
|
|
122
123
|
suffix?: () => VNodeChild
|
|
123
124
|
}
|
|
@@ -129,36 +130,36 @@ export declare function DataFormActions(
|
|
|
129
130
|
setup?: GenericCtx<DataFormActionsProps, DataFormActionsEmits, DataFormActionsSlots>,
|
|
130
131
|
): GenericReturn<DataFormActionsProps, DataFormActionsEmits, DataFormActionsSlots>
|
|
131
132
|
|
|
132
|
-
export
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
133
|
+
export interface DataFormProps<Data extends {}> extends Omit<NFormProps, 'model' | 'rules' | 'onSubmit' | 'validateMessages'>,
|
|
134
|
+
Omit<DataFormActionsProps, 'onSubmit' | 'size' | 'gap' | 'justify' | 'direction' | 'submitLoading'> {
|
|
135
|
+
items: ArrayLike<FormItem<Data>>
|
|
136
|
+
model: Data
|
|
137
|
+
readonly?: boolean | undefined
|
|
138
|
+
grid?: boolean | NGridProps | undefined
|
|
139
|
+
validation?: { [k in keyof Data]?: ValidationResults } | undefined
|
|
140
|
+
showColon?: boolean | undefined
|
|
141
|
+
tooltipPlacement?: 'bottom' | 'icon' | undefined
|
|
142
|
+
loading?: boolean | undefined
|
|
143
|
+
showAction?: boolean | NGridItemProps & AllowedComponentProps | undefined
|
|
144
|
+
actionJustify?: DataFormActionsProps['justify']
|
|
145
|
+
actionAlign?: DataFormActionsProps['align']
|
|
146
|
+
actionGap?: DataFormActionsProps['gap']
|
|
147
|
+
onSubmit?: MaybeArray<(model: Data) => void> | undefined
|
|
148
|
+
}
|
|
148
149
|
|
|
149
|
-
export
|
|
150
|
+
export interface DataFormEmits<Data extends {}> {
|
|
150
151
|
(e: 'submit', model: Data): void
|
|
151
152
|
(e: 'reset'): void
|
|
152
153
|
(e: 'cancel'): void
|
|
153
154
|
}
|
|
154
155
|
|
|
155
|
-
export
|
|
156
|
+
export interface DataFormSlots<_Data extends {}> {
|
|
156
157
|
action?: (params: { overflow: boolean, grid: ComponentPublicInstance | undefined }) => VNodeChild
|
|
157
158
|
actionPrefix?: () => VNodeChild
|
|
158
159
|
actionSuffix?: () => VNodeChild
|
|
159
160
|
}
|
|
160
161
|
|
|
161
|
-
export
|
|
162
|
+
export interface DataFormInst {
|
|
162
163
|
}
|
|
163
164
|
|
|
164
165
|
export declare function DataForm<Data extends {}>(
|
|
@@ -168,10 +169,11 @@ export declare function DataForm<Data extends {}>(
|
|
|
168
169
|
setup?: GenericCtx<DataFormProps<Data>, DataFormEmits<Data>, DataFormSlots<Data>, DataFormInst>,
|
|
169
170
|
): GenericReturn<DataFormProps<Data>, DataFormEmits<Data>, DataFormSlots<Data>, DataFormInst>
|
|
170
171
|
|
|
171
|
-
export
|
|
172
|
-
items: FormItem<Data
|
|
172
|
+
export interface DataFilterProps<Data extends {}> extends Omit<NFormProps, 'model' | 'rules' | 'onSubmit' | 'validateMessages'> {
|
|
173
|
+
items: ArrayLike<FormItem<Data>>
|
|
173
174
|
model: Data
|
|
174
175
|
loading?: boolean | undefined
|
|
176
|
+
validation?: { [k in keyof Data]?: ValidationResults } | undefined
|
|
175
177
|
filterOnReset?: boolean | undefined
|
|
176
178
|
filterText?: VNodeChild | undefined
|
|
177
179
|
resetText?: VNodeChild | undefined
|
|
@@ -196,7 +198,7 @@ export type DataFilterProps<Data extends {}> = Omit<NFormProps, 'model' | 'rules
|
|
|
196
198
|
onCollapse?: MaybeArray<(collapsed: boolean) => void> | undefined
|
|
197
199
|
}
|
|
198
200
|
|
|
199
|
-
export
|
|
201
|
+
export interface DataFilterEmits<Data extends {}> {
|
|
200
202
|
(e: 'filter', model: Data): void
|
|
201
203
|
(e: 'reset'): void
|
|
202
204
|
(e: 'custom', param: true | string[] | { key: string, hidden?: boolean }): void
|
|
@@ -208,7 +210,7 @@ export type DataFilterEmits<Data extends {}> = {
|
|
|
208
210
|
(e: 'collapse', collapsed: boolean): void
|
|
209
211
|
}
|
|
210
212
|
|
|
211
|
-
export
|
|
213
|
+
export interface DataFilterInst {
|
|
212
214
|
collapse(this: void, collapsed: boolean): void
|
|
213
215
|
}
|
|
214
216
|
|
|
@@ -219,29 +221,28 @@ export declare function DataFilter<Data extends {}>(
|
|
|
219
221
|
setup?: GenericCtx<DataFilterProps<Data>, DataFilterEmits<Data>, {}, DataFilterInst>,
|
|
220
222
|
): GenericReturn<DataFilterProps<Data>, DataFilterEmits<Data>, {}, DataFilterInst>
|
|
221
223
|
|
|
222
|
-
export
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
export type DataTableEmits<Data extends {}, KeyField extends keyof Data> = {
|
|
224
|
+
export interface DataTableProps<Data extends {}, KeyField extends keyof Data>
|
|
225
|
+
extends Omit<NDataTableProps, 'columns' | 'rowKey' | 'data' | 'checkedRowKeys' | 'defaultCheckedRowKeys' | 'onUpdate:checkedRowKeys' | 'onUpdateCheckedRowKeys'> {
|
|
226
|
+
columns?: ArrayLike<TableColumn<Data>> | undefined
|
|
227
|
+
data?: ArrayLike<Data> | undefined
|
|
228
|
+
keyField?: KeyField | undefined
|
|
229
|
+
selectedKeys?: ArrayLike<Data[KeyField]> | undefined
|
|
230
|
+
highlight?: boolean | Data[KeyField] | undefined
|
|
231
|
+
highlightColor?: string | undefined
|
|
232
|
+
appear?: 'normal' | 'sticky' | undefined
|
|
233
|
+
sorter?: SortParams<Data> | undefined
|
|
234
|
+
onSort?: MaybeArray<(param: SortParams<Data>) => void> | undefined
|
|
235
|
+
onSelect?: MaybeArray<(param: NonNullable<Data[KeyField]>[]) => void> | undefined
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface DataTableEmits<Data extends {}, KeyField extends keyof Data> {
|
|
238
239
|
(e: 'sort', param: SortParams<Data>): void
|
|
239
240
|
(e: 'select', param: Data[KeyField][]): void
|
|
240
241
|
(e: 'highlight', rowKey: Data[KeyField]): void
|
|
241
242
|
(e: 'custom', params: { key: string, width: number }): void
|
|
242
243
|
}
|
|
243
244
|
|
|
244
|
-
export
|
|
245
|
+
export interface DataTableInst<Data extends {}, KeyField extends keyof Data> extends NDataTableInst {
|
|
245
246
|
scrollToView(rowKey: Data[KeyField]): void
|
|
246
247
|
}
|
|
247
248
|
|
|
@@ -259,21 +260,22 @@ export declare function DataTable<Data extends {}, KeyField extends keyof Data>(
|
|
|
259
260
|
setup?: GenericCtx<DataTableProps<Data, KeyField>, DataTableEmits<Data, KeyField>, {}, DataTableInst<Data, KeyField>>,
|
|
260
261
|
): GenericReturn<DataTableProps<Data, KeyField>, DataTableEmits<Data, KeyField>, {}, DataTableInst<Data, KeyField>>
|
|
261
262
|
|
|
262
|
-
export
|
|
263
|
+
export interface DataPaginationProps extends Partial<PageParams> {
|
|
264
|
+
page?: PageParams
|
|
263
265
|
simple?: boolean | undefined
|
|
264
266
|
total: number
|
|
265
|
-
pageSizes?: number
|
|
267
|
+
pageSizes?: ArrayLike<number> | undefined
|
|
266
268
|
resetPageOnSizeChange?: boolean | undefined
|
|
267
269
|
onChange?: MaybeArray<(value: PageParams) => void> | undefined
|
|
268
270
|
}
|
|
269
271
|
|
|
270
|
-
export
|
|
272
|
+
export interface DataPaginationEmits {
|
|
271
273
|
(e: 'change', value: PageParams): void
|
|
272
274
|
}
|
|
273
275
|
|
|
274
276
|
export declare interface IDataPagination {
|
|
275
277
|
/** 注入默认的分页大小数组 */
|
|
276
|
-
DEFAULT_PAGE_SIZES_INJECTION_KEY: InjectionKey<number
|
|
278
|
+
DEFAULT_PAGE_SIZES_INJECTION_KEY: InjectionKey<ArrayLike<number> | ArrayLike<{ value: number, label: string }>>
|
|
277
279
|
(
|
|
278
280
|
props: DataPaginationProps & PublicProps,
|
|
279
281
|
ctx?: Pick<GenericCtx<DataPaginationProps, DataPaginationEmits, {}, {}>, 'attrs' | 'emit' | 'slots'>,
|
|
@@ -284,14 +286,14 @@ export declare interface IDataPagination {
|
|
|
284
286
|
|
|
285
287
|
declare const DataPagination: IDataPagination
|
|
286
288
|
|
|
287
|
-
export
|
|
289
|
+
export interface DataSelectionProps {
|
|
288
290
|
'count': number
|
|
289
291
|
'modelValue': 'all' | 'selection'
|
|
290
292
|
'onClear'?: MaybeArray<() => void> | undefined
|
|
291
293
|
'onUpdate:modelValue'?: MaybeArray<(value: DataSelectionProps['modelValue']) => void> | undefined
|
|
292
294
|
}
|
|
293
295
|
|
|
294
|
-
export
|
|
296
|
+
export interface DataSelectionEmits {
|
|
295
297
|
(e: 'clear'): void
|
|
296
298
|
(e: 'update:modelValue', v: DataSelectionProps['modelValue']): void
|
|
297
299
|
}
|
|
@@ -303,8 +305,8 @@ export declare function DataSelection(
|
|
|
303
305
|
setup?: GenericCtx<DataSelectionProps, DataSelectionEmits, {}, {}>,
|
|
304
306
|
): GenericReturn<DataSelectionProps, DataSelectionEmits, {}, {}>
|
|
305
307
|
|
|
306
|
-
export
|
|
307
|
-
data: Data
|
|
308
|
+
export interface DataCustomProps<Data extends {}> {
|
|
309
|
+
data: ArrayLike<Data>
|
|
308
310
|
hiddenField?: keyof Data | undefined
|
|
309
311
|
fixedField?: keyof Data | undefined
|
|
310
312
|
labelField?: keyof Data | undefined
|
|
@@ -312,9 +314,10 @@ export type DataCustomProps<Data extends {}> = {
|
|
|
312
314
|
showFixed?: boolean | undefined
|
|
313
315
|
disabledField?: keyof Data | undefined
|
|
314
316
|
visibleField?: keyof Data | undefined
|
|
315
|
-
labelTitle?: VNodeChild | undefined
|
|
316
317
|
size?: number | undefined
|
|
317
318
|
type?: 'primary' | 'default' | undefined
|
|
319
|
+
tooltipPlacement?: TooltipProps['placement'] | undefined
|
|
320
|
+
buttonRender?: () => VNodeChild
|
|
318
321
|
onCustom?: MaybeArray<
|
|
319
322
|
((reset: true) => void)
|
|
320
323
|
| ((sort: string[]) => void)
|
|
@@ -326,7 +329,7 @@ export type DataCustomProps<Data extends {}> = {
|
|
|
326
329
|
| undefined
|
|
327
330
|
}
|
|
328
331
|
|
|
329
|
-
export
|
|
332
|
+
export interface DataCustomEmits {
|
|
330
333
|
(e: 'custom', reset: true): void
|
|
331
334
|
(e: 'custom', sort: string[]): void
|
|
332
335
|
(e: 'custom', modify: {
|
|
@@ -343,11 +346,51 @@ export declare function DataCustom<Data extends {}>(
|
|
|
343
346
|
setup?: GenericCtx<DataCustomProps<Data>, DataCustomEmits, {}, {}>,
|
|
344
347
|
): GenericReturn<DataCustomProps<Data>, DataCustomEmits, {}, {}>
|
|
345
348
|
|
|
346
|
-
export
|
|
349
|
+
export interface ViewProfileProps<Data extends {}> {
|
|
350
|
+
'profiles': ArrayLike<Data>
|
|
351
|
+
'nameField'?: keyof Data | undefined
|
|
352
|
+
'keyField'?: keyof Data | undefined
|
|
353
|
+
'lockedField'?: keyof Data | undefined
|
|
354
|
+
'changing'?: boolean | undefined
|
|
355
|
+
'size'?: number | undefined
|
|
356
|
+
'type'?: 'primary' | 'default' | undefined
|
|
357
|
+
'profile'?: string | null | undefined
|
|
358
|
+
'preference'?: string | null | undefined
|
|
359
|
+
'onUpdateProfile'?: MaybeArray<(profile: string) => void> | undefined
|
|
360
|
+
'onUpdate:profile'?: MaybeArray<(profile: string) => void> | undefined
|
|
361
|
+
'onUpdatePreference'?: MaybeArray<(preference: string | undefined) => void> | undefined
|
|
362
|
+
'onUpdate:preference'?: MaybeArray<(preference: string | undefined) => void> | undefined
|
|
363
|
+
'onCopy'?: MaybeArray<(key: string) => void> | undefined
|
|
364
|
+
'onSave'?: MaybeArray<(payload: { name: string, key: string }) => void> | undefined
|
|
365
|
+
'onRemove'?: MaybeArray<(key: string) => void> | undefined
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export interface ViewProfileEmits {
|
|
369
|
+
(e: 'updateProfile', profile: string): VoidFunction
|
|
370
|
+
(e: 'update:profile', profile: string): void
|
|
371
|
+
(e: 'updatePreference', preference: string | undefined): void
|
|
372
|
+
(e: 'update:preference', preference: string | undefined): void
|
|
373
|
+
(e: 'copy', key: string): void
|
|
374
|
+
(e: 'save', payload: { name: string, key: string }): void
|
|
375
|
+
(e: 'remove', key: string): void
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export interface ViewProfileSlots {
|
|
379
|
+
default?: () => VNodeChild
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export declare function ViewProfile<Data extends {}>(
|
|
383
|
+
props: ViewProfileProps<Data> & PublicProps,
|
|
384
|
+
ctx?: Pick<GenericCtx<ViewProfileProps<Data>, ViewProfileEmits, ViewProfileSlots, {}>, 'attrs' | 'emit' | 'slots'>,
|
|
385
|
+
expose?: (exposed?: GenericExposed<{}>) => void,
|
|
386
|
+
setup?: GenericCtx<ViewProfileProps<Data>, ViewProfileEmits, ViewProfileSlots, {}>,
|
|
387
|
+
): GenericReturn<ViewProfileProps<Data>, ViewProfileEmits, ViewProfileSlots, {}>
|
|
388
|
+
|
|
389
|
+
export interface DataActionsProps {
|
|
347
390
|
options?: TableActionRenderParam[] | undefined
|
|
348
391
|
}
|
|
349
392
|
|
|
350
|
-
export
|
|
393
|
+
export interface DataActionsEmits {}
|
|
351
394
|
|
|
352
395
|
export declare function DataActions(
|
|
353
396
|
props: DataActionsProps & PublicProps,
|
|
@@ -356,7 +399,7 @@ export declare function DataActions(
|
|
|
356
399
|
setup?: GenericCtx<DataActionsProps, DataActionsEmits, { default?: () => VNodeChild }, {}>,
|
|
357
400
|
): GenericReturn<DataActionsProps, DataActionsEmits, { default?: () => VNodeChild }, {}>
|
|
358
401
|
|
|
359
|
-
export
|
|
402
|
+
export interface DataLocaleInputProps {
|
|
360
403
|
'label'?: VNodeChild | (() => VNodeChild) | undefined
|
|
361
404
|
'modelValue'?: Record<string, string | undefined> | null | undefined
|
|
362
405
|
'supports'?: { label: string, value: string }[] | undefined
|
|
@@ -370,7 +413,7 @@ export type DataLocaleInputProps = {
|
|
|
370
413
|
'onUpdateModelValue'?: MaybeArray<(modelValue: Record<string, string | undefined> | null) => void> | undefined
|
|
371
414
|
}
|
|
372
415
|
|
|
373
|
-
export
|
|
416
|
+
export interface DataLocaleInputEmits {
|
|
374
417
|
(e: 'update:modelValue', modelValue: Record<string, string | undefined> | null | undefined): void
|
|
375
418
|
(e: 'updateModelValue', modelValue: Record<string, string | undefined> | null | undefined): void
|
|
376
419
|
}
|
|
@@ -392,14 +435,14 @@ export declare function useLocaleEdit(
|
|
|
392
435
|
}
|
|
393
436
|
|
|
394
437
|
export interface CheckboxesProps extends Omit<CheckboxGroupProps, 'value' | 'onUpdate:value' | 'defaultValue'> {
|
|
395
|
-
'options'?: DictItem
|
|
438
|
+
'options'?: ArrayLike<DictItem> | ArrayLike<Record<string, unknown>> | undefined
|
|
396
439
|
'vertical'?: boolean | undefined
|
|
397
440
|
'default'?: boolean | string | DictItem | undefined
|
|
398
441
|
'labelPadding'?: CSSProperties['padding']
|
|
399
442
|
'labelField'?: string | undefined
|
|
400
443
|
'valueField'?: string | undefined
|
|
401
444
|
'disabledField'?: string | undefined
|
|
402
|
-
'modelValue'?: string
|
|
445
|
+
'modelValue'?: ArrayLike<string> | ArrayLike<number> | null | undefined
|
|
403
446
|
'onUpdate:modelValue'?: MaybeArray<(modelValue: string[] | number[] | null) => void> | undefined
|
|
404
447
|
'onUpdateModelValue'?: MaybeArray<(modelValue: string[] | number[] | null) => void> | undefined
|
|
405
448
|
}
|
|
@@ -417,7 +460,7 @@ export declare function NCheckboxes(
|
|
|
417
460
|
): GenericReturn<CheckboxesProps, CheckboxesEmits, {}, {}>
|
|
418
461
|
|
|
419
462
|
export interface RadiosProps extends Omit<RadioGroupProps, 'value' | 'onUpdate:value' | 'defaultValue'> {
|
|
420
|
-
'options'?: DictItem
|
|
463
|
+
'options'?: ArrayLike<DictItem> | ArrayLike<Record<string, unknown>> | undefined
|
|
421
464
|
'type'?: 'radio' | 'button' | 'button-primary' | undefined
|
|
422
465
|
'vertical'?: boolean | undefined
|
|
423
466
|
'default'?: boolean | string | DictItem | undefined
|
|
@@ -488,7 +531,7 @@ export declare function DtUserDept<Multiple extends boolean>(
|
|
|
488
531
|
): GenericReturn<UserDeptProps<Multiple>, UserDeptEmits<Multiple>, {}, {}>
|
|
489
532
|
|
|
490
533
|
interface UserRenderProps {
|
|
491
|
-
value?: string | string
|
|
534
|
+
value?: string | ArrayLike<string> | null | undefined
|
|
492
535
|
multiple?: boolean | undefined
|
|
493
536
|
max?: number | undefined
|
|
494
537
|
size?: number | undefined
|
|
@@ -508,7 +551,7 @@ export declare const DtUserRender: (
|
|
|
508
551
|
) => GenericReturn<UserRenderProps, UserRenderEmits, {}, {}>
|
|
509
552
|
|
|
510
553
|
interface DeptRenderProps {
|
|
511
|
-
value?: string | string
|
|
554
|
+
value?: string | ArrayLike<string> | null | undefined
|
|
512
555
|
multiple?: boolean | undefined
|
|
513
556
|
getDeptsByCode?: (codes: string[]) => Promise<DeptOption[]>
|
|
514
557
|
}
|
|
@@ -526,7 +569,7 @@ export declare const DtDeptRender: (
|
|
|
526
569
|
export interface DataDescriptionsProps<Data extends object> {
|
|
527
570
|
cols?: number
|
|
528
571
|
data: Partial<Data> | undefined | null
|
|
529
|
-
items: DescriptionItem<Data
|
|
572
|
+
items: ArrayLike<DescriptionItem<Data>>
|
|
530
573
|
title?: VNodeChild | ((data: Partial<Data> | undefined) => VNodeChild)
|
|
531
574
|
anchor?: boolean | AnchorProps & AllowedComponentProps | undefined
|
|
532
575
|
}
|
|
@@ -540,3 +583,51 @@ export declare function DataDescriptions<Data extends {}>(
|
|
|
540
583
|
expose?: (exposed?: GenericExposed<{}>) => void,
|
|
541
584
|
setup?: GenericCtx<DataDescriptionsProps<Data>, DataDescriptionsEmits, {}, {}>,
|
|
542
585
|
): GenericReturn<DataDescriptionsProps<Data>, DataDescriptionsEmits, {}, {}>
|
|
586
|
+
|
|
587
|
+
export interface FullscreenButtonProps extends ButtonProps {
|
|
588
|
+
target?: string | MaybeElement
|
|
589
|
+
iconSize?: IconProps['size']
|
|
590
|
+
abstract?: boolean | undefined
|
|
591
|
+
isFullscreen?: boolean | undefined
|
|
592
|
+
tooltipPlacement?: TooltipProps['placement'] | undefined
|
|
593
|
+
onChange?: ((isFullscreen: boolean) => void) | undefined
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
interface FullscreenButtonEmits {
|
|
597
|
+
(e: 'change', isFullscreen: boolean): void
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export declare function FullscreenButton(
|
|
601
|
+
props: FullscreenButtonProps & PublicProps,
|
|
602
|
+
ctx?: Pick<GenericCtx<FullscreenButtonProps, FullscreenButtonEmits>, 'attrs' | 'emit' | 'slots'>,
|
|
603
|
+
expose?: (exposed?: GenericExposed<{}>) => void,
|
|
604
|
+
setup?: GenericCtx<FullscreenButtonProps, FullscreenButtonEmits, {}, {}>,
|
|
605
|
+
): GenericReturn<FullscreenButtonProps, FullscreenButtonEmits, {}, {}>
|
|
606
|
+
|
|
607
|
+
export interface FullscreenWrapperProps {
|
|
608
|
+
tag?: string | undefined
|
|
609
|
+
scrollable?: boolean | undefined
|
|
610
|
+
scrollbarProps?: ScrollbarProps | undefined
|
|
611
|
+
onChange?: ((isFullscreen: boolean) => void) | undefined
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
interface FullscreenWrapperEmits {
|
|
615
|
+
(e: 'change', isFullscreen: boolean): void
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
interface FullscreenWrapperSlots {
|
|
619
|
+
default?: (params: {
|
|
620
|
+
target: HTMLElement
|
|
621
|
+
isFullscreen: boolean
|
|
622
|
+
enter: () => Promise<void>
|
|
623
|
+
exit: () => Promise<void>
|
|
624
|
+
toggle: () => Promise<void>
|
|
625
|
+
}) => VNodeChild
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export declare function FullscreenWrapper(
|
|
629
|
+
props: FullscreenWrapperProps & PublicProps,
|
|
630
|
+
ctx?: Pick<GenericCtx<FullscreenWrapperProps, FullscreenWrapperEmits, FullscreenWrapperSlots>, 'attrs' | 'emit' | 'slots'>,
|
|
631
|
+
expose?: (exposed?: GenericExposed<{}>) => void,
|
|
632
|
+
setup?: GenericCtx<FullscreenWrapperProps, FullscreenWrapperEmits, FullscreenWrapperSlots, {}>,
|
|
633
|
+
): GenericReturn<FullscreenWrapperProps, FullscreenWrapperEmits, FullscreenWrapperSlots, {}>
|
package/esm/components.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, w as b, x, y as S } from "./components-DfV9ybsT.js";
|
|
2
|
+
export { e as DataActions, x as DataCustom, r as DataDescriptions, s as DataFilter, t as DataForm, y as DataFormActions, d as DataLocaleInput, m as DataPagination, a as DataSelection, _ as DataTable, l as DtDeptRender, n as DtUserDept, p as DtUserRender, v as FullscreenButton, u as FullscreenWrapper, b as NCheckboxes, i as NRadios, f as NStateButton, h as StateButtonProps, o as ViewProfile, S as dataFormActionsProps, g as renderUsers, c as useLocaleEdit };
|
package/esm/composables.js
CHANGED
|
@@ -1 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import { nextTick as e, ref as t, watch as n } from "vue";
|
|
2
|
+
import { unrefElement as r } from "@vueuse/core";
|
|
3
|
+
import { Sortable as i } from "sortablejs";
|
|
4
|
+
//#region src/composables/use-data-table-drag.js
|
|
5
|
+
function a(a, { data: o, onSort: s, ...c }) {
|
|
6
|
+
n([t(o), a], async ([t, n]) => {
|
|
7
|
+
if (t.length === 0) return;
|
|
8
|
+
await e();
|
|
9
|
+
let a = r(n)?.querySelector(".n-data-table-base-table-body .n-data-table-tbody");
|
|
10
|
+
if (!a) return;
|
|
11
|
+
let o = i.create(a, {
|
|
12
|
+
animation: 150,
|
|
13
|
+
...c,
|
|
14
|
+
onSort(e) {
|
|
15
|
+
s({
|
|
16
|
+
from: e.oldIndex,
|
|
17
|
+
to: e.newIndex
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return () => {
|
|
22
|
+
o.destroy();
|
|
23
|
+
};
|
|
24
|
+
}, { immediate: !0 });
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { a as useDataTableDrag };
|
package/esm/design.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DrawerProps } from 'ithinkdt-ui'
|
|
1
2
|
import { Component, FunctionalComponent, VNode, VNodeChild } from 'vue'
|
|
2
3
|
|
|
3
4
|
import { MaybePromise, PublicProps } from '@ithinkdt/common'
|
|
@@ -162,12 +163,6 @@ export declare const AppAccount: (
|
|
|
162
163
|
},
|
|
163
164
|
) => VNode
|
|
164
165
|
|
|
165
|
-
export declare const AppFullscreen: (
|
|
166
|
-
props: PublicProps & {
|
|
167
|
-
onChange?: ((isFullscreen: boolean) => void) | undefined
|
|
168
|
-
},
|
|
169
|
-
) => VNode
|
|
170
|
-
|
|
171
166
|
export declare const AppAppearance: (
|
|
172
167
|
props: PublicProps & {
|
|
173
168
|
'mode'?: 'auto' | 'light' | 'dark' | undefined
|
|
@@ -216,6 +211,7 @@ export interface NotificationProps {
|
|
|
216
211
|
type: 'all' | 'unread',
|
|
217
212
|
page: number,
|
|
218
213
|
size: number,
|
|
214
|
+
searchText: string | undefined,
|
|
219
215
|
) => Promise<{
|
|
220
216
|
records: {
|
|
221
217
|
key: string
|
|
@@ -230,6 +226,7 @@ export interface NotificationProps {
|
|
|
230
226
|
markRead: (keys: string[]) => Promise<void>
|
|
231
227
|
markDelete: (keys: string[]) => Promise<void>
|
|
232
228
|
interval?: number | undefined
|
|
229
|
+
drawerTo?: DrawerProps['to'] | undefined
|
|
233
230
|
}
|
|
234
231
|
|
|
235
232
|
export declare const AppNotification: (props: PublicProps & NotificationProps) => VNode
|
package/esm/directives.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./directives-Chz4DK1u.js";
|
|
2
|
+
export { r as SpinDirectiveProvider, n as TooltipDirectiveProvider, t as vSpin, e as vTooltip };
|