@dinert/element-plus 1.1.44 → 1.1.45

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.
@@ -0,0 +1,44 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ import { MergeProp } from './utils';
3
+ import { InputProps, ElInput, SelectOptionProxy, ElSelect, cascaderProps, ElCascader, AutocompleteProps, ElAutocomplete, ElInputNumber, InputNumberProps, SwitchProps, DatePickerProps, ElDatePicker, RadioGroupProps, ElRadioGroup, CheckboxProps, RadioProps, CheckboxGroupProps, ElCheckbox, ElTreeSelect, RateProps, ElRate, CascaderProps, ElTree, ElSlider, SliderProps, TimePickerDefaultProps, ElTimePicker, ElTimeSelect } from 'element-plus';
4
+ import { TreeOptionProps } from 'element-plus/es/components/tree-v2/src/types';
5
+ import type { SelectProps } from 'element-plus/es/components/select/src/select';
6
+ import { TreeProps } from 'element-plus/es/components/tree-v2/src/types';
7
+ import { TimeSelectProps } from 'element-plus/es/components/time-select/src/time-select';
8
+ type CommonFn = 'onChange' | 'onClear' | 'onBlur' | 'onFocus';
9
+ export type RewriteInputProps = Partial<InputProps & Pick<typeof ElInput, 'onInput' | CommonFn>>;
10
+ export type RewriteTextareaProps = Partial<InputProps & Pick<typeof ElInput, 'onInput' | CommonFn>>;
11
+ export type RewriteSelectProps<O = any[]> = Partial<Omit<ExtractPropTypes<SelectProps>, 'options'> & {
12
+ options: O | SelectOptionProxy[];
13
+ label: string;
14
+ value: string;
15
+ } & Pick<typeof ElSelect, CommonFn | 'onVisible-change' | 'onRemove-tag'>>;
16
+ export type RewriteCascaderProps<O = any[]> = Partial<Omit<ExtractPropTypes<typeof cascaderProps>, 'options' | 'props'> & {
17
+ options: O;
18
+ props: Partial<MergeProp<CascaderProps, TreeOptionProps>>;
19
+ } & Pick<typeof ElCascader, CommonFn | 'onVisible-change' | 'onRemove-tag'>>;
20
+ export type RewriteAutocompleteProps = Partial<AutocompleteProps & Pick<typeof ElAutocomplete, 'onSelect' | 'onChange'>>;
21
+ export type RewriteInputNumberProps = Partial<InputNumberProps & Pick<typeof ElInputNumber, CommonFn>>;
22
+ export type RewriteSwitchProps = Partial<SwitchProps & Pick<typeof ElInputNumber, 'onChange'>>;
23
+ export type RewriteDatePickerProps = Partial<DatePickerProps & Pick<typeof ElDatePicker, CommonFn | 'onVisible-change' | 'onCalendar-change' | 'onPanel-change'>>;
24
+ export type RewriteRadioGroupProps<O = any[]> = Partial<RadioGroupProps & {
25
+ options: O | RadioProps[];
26
+ value: string;
27
+ } & Pick<typeof ElRadioGroup, 'onChange'>>;
28
+ export type RewriteCheckboxGroupProps<O = any[]> = Partial<CheckboxGroupProps & {
29
+ options: O | CheckboxProps[];
30
+ value: string;
31
+ } & Pick<typeof ElCheckbox, 'onChange'>>;
32
+ export type RewriteTreeSelectProps<O = any[]> = Partial<TreeProps & Omit<ExtractPropTypes<SelectProps>, 'options'> & {
33
+ options: O | SelectOptionProxy[];
34
+ label: string;
35
+ value: string;
36
+ data: O | SelectOptionProxy[];
37
+ } & Pick<typeof ElTreeSelect, CommonFn> & Pick<typeof ElTree, 'onCurrent-change' | 'onCheck' | 'onNode-click' | 'onCurrent-change' | 'onNode-expand' | 'onCheck-change' | 'onNode-click' | 'onNode-contextmenu' | 'onNode-collapse' | 'onNode-drag-start' | 'onNode-drag-end' | 'onNode-drop' | 'onNode-drag-leave' | 'onNode-drag-enter' | 'onNode-drag-over'>>;
38
+ export type RewriteRewriteRateProps<O = any[]> = Partial<Omit<RateProps, 'options'> & {
39
+ options: O;
40
+ } & Pick<typeof ElRate, 'onChange'>>;
41
+ export type RewriteSliderProps = Partial<SliderProps & Pick<typeof ElSlider, 'onChange' | 'onInput'>>;
42
+ export type RewriteTimePickerProps = Partial<TimePickerDefaultProps & Pick<typeof ElTimePicker, CommonFn | 'onVisible-change'>>;
43
+ export type RewriteTimeSelectProps = Partial<TimeSelectProps & Pick<typeof ElTimeSelect, CommonFn>>;
44
+ export {};
@@ -121,7 +121,7 @@ export interface FormItemPropsSwitch<D, FI> extends CustomFormItemProps<D, FI> {
121
121
  options?: RewriteSwitchProps;
122
122
  }
123
123
  export interface FormItemPropsDate<D, FI> extends CustomFormItemProps<D, FI> {
124
- type: 'date' | 'datetime' | 'week' | 'month' | 'year' | 'years' | 'daterange' | 'datetimerange' | 'monthrange';
124
+ type: 'date' | 'datetime' | 'week' | 'month' | 'year' | 'years' | 'daterange' | 'datetimerange' | 'monthrange' | 'dates';
125
125
  options?: RewriteDatePickerProps;
126
126
  }
127
127
  export interface FormItemPropsRadio<D, FI> extends CustomFormItemProps<D, FI> {
@@ -1,4 +1,4 @@
1
- import type { TableProps, TableColumnCtx, ElTable, ElPagination, PaginationProps, ButtonProps, PopconfirmProps, ElMessageBoxOptions } from 'element-plus';
1
+ import type { TableProps, TableColumnCtx, ElTable, ElPagination, PaginationProps, ButtonProps, PopconfirmProps, ElMessageBoxOptions, ElTooltipProps } from 'element-plus';
2
2
  export type Mutable<T> = {
3
3
  -readonly [K in keyof T]: T[K];
4
4
  };
@@ -49,11 +49,16 @@ export interface RewriteTableProps<T = any> extends TableProps<T>, TableFnProps
49
49
  class?: string;
50
50
  pagination: RewritePaginationProps;
51
51
  autoHeight?: boolean;
52
+ echoSelect?: boolean;
52
53
  }
53
54
  type PaginationPropsFn = Partial<Pick<InstanceType<typeof ElPagination>, 'onChange' | 'onUpdate:current-page' | 'onUpdate:page-size' | 'onSize-change' | 'onCurrent-change' | 'onPrev-click' | 'onNext-click'>>;
54
55
  export interface RewritePaginationProps extends PaginationPropsFn, Partial<Mutable<PaginationProps>> {
55
56
  }
57
+ export interface RewriteElTooltipProps extends Partial<Omit<ElTooltipProps, 'content'>> {
58
+ content?: string | ((scope: ScopeProps) => string);
59
+ }
56
60
  export interface HeaderListProps extends Omit<Partial<ButtonProps>, 'disabled'> {
61
+ tooltip?: RewriteElTooltipProps;
57
62
  message?: string;
58
63
  click?: (item: HeaderListProps) => void;
59
64
  sort?: number;
@@ -376,7 +376,7 @@ export declare const DinertTablePage: SFCWithInstall<import("vue").DefineCompone
376
376
  fields: {
377
377
  $el: HTMLDivElement | undefined;
378
378
  size: "" | "default" | "small" | "large";
379
- validateState: "" | "error" | "validating" | "success";
379
+ validateState: "" | "success" | "error" | "validating";
380
380
  isGroup: boolean;
381
381
  labelId: string;
382
382
  inputIds: string[];
@@ -938,7 +938,7 @@ export declare const DinertTablePage: SFCWithInstall<import("vue").DefineCompone
938
938
  asyncValidator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | Promise<void>) | undefined;
939
939
  validator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | import("async-validator").SyncValidateResult) | undefined;
940
940
  }[] | undefined;
941
- readonly validateStatus?: ("" | "error" | "validating" | "success") | undefined;
941
+ readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
942
942
  readonly for?: string | undefined;
943
943
  }[];
944
944
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -1064,7 +1064,7 @@ export declare const DinertTablePage: SFCWithInstall<import("vue").DefineCompone
1064
1064
  fields: {
1065
1065
  $el: HTMLDivElement | undefined;
1066
1066
  size: "" | "default" | "small" | "large";
1067
- validateState: "" | "error" | "validating" | "success";
1067
+ validateState: "" | "success" | "error" | "validating";
1068
1068
  isGroup: boolean;
1069
1069
  labelId: string;
1070
1070
  inputIds: string[];
@@ -1626,7 +1626,7 @@ export declare const DinertTablePage: SFCWithInstall<import("vue").DefineCompone
1626
1626
  asyncValidator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | Promise<void>) | undefined;
1627
1627
  validator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | import("async-validator").SyncValidateResult) | undefined;
1628
1628
  }[] | undefined;
1629
- readonly validateStatus?: ("" | "error" | "validating" | "success") | undefined;
1629
+ readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
1630
1630
  readonly for?: string | undefined;
1631
1631
  }[];
1632
1632
  }> & {} & import("vue").ComponentCustomProperties & {} & {
@@ -1892,7 +1892,7 @@ export declare const DinertTablePage: SFCWithInstall<import("vue").DefineCompone
1892
1892
  fields: {
1893
1893
  $el: HTMLDivElement | undefined;
1894
1894
  size: "" | "default" | "small" | "large";
1895
- validateState: "" | "error" | "validating" | "success";
1895
+ validateState: "" | "success" | "error" | "validating";
1896
1896
  isGroup: boolean;
1897
1897
  labelId: string;
1898
1898
  inputIds: string[];
@@ -2454,7 +2454,7 @@ export declare const DinertTablePage: SFCWithInstall<import("vue").DefineCompone
2454
2454
  asyncValidator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | Promise<void>) | undefined;
2455
2455
  validator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | import("async-validator").SyncValidateResult) | undefined;
2456
2456
  }[] | undefined;
2457
- readonly validateStatus?: ("" | "error" | "validating" | "success") | undefined;
2457
+ readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
2458
2458
  readonly for?: string | undefined;
2459
2459
  }[];
2460
2460
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -2580,7 +2580,7 @@ export declare const DinertTablePage: SFCWithInstall<import("vue").DefineCompone
2580
2580
  fields: {
2581
2581
  $el: HTMLDivElement | undefined;
2582
2582
  size: "" | "default" | "small" | "large";
2583
- validateState: "" | "error" | "validating" | "success";
2583
+ validateState: "" | "success" | "error" | "validating";
2584
2584
  isGroup: boolean;
2585
2585
  labelId: string;
2586
2586
  inputIds: string[];
@@ -3142,7 +3142,7 @@ export declare const DinertTablePage: SFCWithInstall<import("vue").DefineCompone
3142
3142
  asyncValidator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | Promise<void>) | undefined;
3143
3143
  validator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | import("async-validator").SyncValidateResult) | undefined;
3144
3144
  }[] | undefined;
3145
- readonly validateStatus?: ("" | "error" | "validating" | "success") | undefined;
3145
+ readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
3146
3146
  readonly for?: string | undefined;
3147
3147
  }[];
3148
3148
  }> & {} & import("vue").ComponentCustomProperties & {} & {
@@ -377,7 +377,7 @@ declare const _default: import("vue").DefineComponent<{
377
377
  fields: {
378
378
  $el: HTMLDivElement | undefined;
379
379
  size: "" | "default" | "small" | "large";
380
- validateState: "" | "error" | "validating" | "success";
380
+ validateState: "" | "success" | "error" | "validating";
381
381
  isGroup: boolean;
382
382
  labelId: string;
383
383
  inputIds: string[];
@@ -939,7 +939,7 @@ declare const _default: import("vue").DefineComponent<{
939
939
  asyncValidator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | Promise<void>) | undefined;
940
940
  validator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | import("async-validator").SyncValidateResult) | undefined;
941
941
  }[] | undefined;
942
- readonly validateStatus?: ("" | "error" | "validating" | "success") | undefined;
942
+ readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
943
943
  readonly for?: string | undefined;
944
944
  }[];
945
945
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -1065,7 +1065,7 @@ declare const _default: import("vue").DefineComponent<{
1065
1065
  fields: {
1066
1066
  $el: HTMLDivElement | undefined;
1067
1067
  size: "" | "default" | "small" | "large";
1068
- validateState: "" | "error" | "validating" | "success";
1068
+ validateState: "" | "success" | "error" | "validating";
1069
1069
  isGroup: boolean;
1070
1070
  labelId: string;
1071
1071
  inputIds: string[];
@@ -1627,7 +1627,7 @@ declare const _default: import("vue").DefineComponent<{
1627
1627
  asyncValidator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | Promise<void>) | undefined;
1628
1628
  validator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | import("async-validator").SyncValidateResult) | undefined;
1629
1629
  }[] | undefined;
1630
- readonly validateStatus?: ("" | "error" | "validating" | "success") | undefined;
1630
+ readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
1631
1631
  readonly for?: string | undefined;
1632
1632
  }[];
1633
1633
  }> & {} & import("vue").ComponentCustomProperties & {} & {
@@ -1893,7 +1893,7 @@ declare const _default: import("vue").DefineComponent<{
1893
1893
  fields: {
1894
1894
  $el: HTMLDivElement | undefined;
1895
1895
  size: "" | "default" | "small" | "large";
1896
- validateState: "" | "error" | "validating" | "success";
1896
+ validateState: "" | "success" | "error" | "validating";
1897
1897
  isGroup: boolean;
1898
1898
  labelId: string;
1899
1899
  inputIds: string[];
@@ -2455,7 +2455,7 @@ declare const _default: import("vue").DefineComponent<{
2455
2455
  asyncValidator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | Promise<void>) | undefined;
2456
2456
  validator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | import("async-validator").SyncValidateResult) | undefined;
2457
2457
  }[] | undefined;
2458
- readonly validateStatus?: ("" | "error" | "validating" | "success") | undefined;
2458
+ readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
2459
2459
  readonly for?: string | undefined;
2460
2460
  }[];
2461
2461
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -2581,7 +2581,7 @@ declare const _default: import("vue").DefineComponent<{
2581
2581
  fields: {
2582
2582
  $el: HTMLDivElement | undefined;
2583
2583
  size: "" | "default" | "small" | "large";
2584
- validateState: "" | "error" | "validating" | "success";
2584
+ validateState: "" | "success" | "error" | "validating";
2585
2585
  isGroup: boolean;
2586
2586
  labelId: string;
2587
2587
  inputIds: string[];
@@ -3143,7 +3143,7 @@ declare const _default: import("vue").DefineComponent<{
3143
3143
  asyncValidator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | Promise<void>) | undefined;
3144
3144
  validator?: ((rule: import("async-validator").InternalRuleItem, value: any, callback: (error?: string | Error | undefined) => void, source: import("async-validator").Values, options: import("async-validator").ValidateOption) => void | import("async-validator").SyncValidateResult) | undefined;
3145
3145
  }[] | undefined;
3146
- readonly validateStatus?: ("" | "error" | "validating" | "success") | undefined;
3146
+ readonly validateStatus?: ("" | "success" | "error" | "validating") | undefined;
3147
3147
  readonly for?: string | undefined;
3148
3148
  }[];
3149
3149
  }> & {} & import("vue").ComponentCustomProperties & {} & {