@vunk/form 2.19.0 → 2.19.1
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/components/api-tables-select/src/ctx.d.ts +16 -22
- package/components/api-tables-select/src/index.vue.d.ts +39 -43
- package/components/button/index.mjs +1 -2
- package/components/button/src/ctx.d.ts +7 -7
- package/components/button/src/index.vue.d.ts +64 -63
- package/components/card-input-collection/index.cjs +1 -1
- package/components/card-input-collection/index.mjs +7 -7
- package/components/card-input-collection/src/core.vue.d.ts +12 -8
- package/components/card-input-collection/src/ctx.d.ts +2 -2
- package/components/card-input-collection/src/index.vue.d.ts +7 -6
- package/components/cascader/src/ctx.d.ts +33 -25
- package/components/cascader/src/index.vue.d.ts +67 -50
- package/components/cascader/src/use.d.ts +1 -1
- package/components/checkbox/index.mjs +3 -3
- package/components/checkbox/src/ctx.d.ts +19 -19
- package/components/checkbox/src/index.vue.d.ts +128 -127
- package/components/cloneDeep.cjs +1 -1
- package/components/color-picker/src/ctx.d.ts +22 -14
- package/components/color-picker/src/index.vue.d.ts +52 -32
- package/components/date-picker/src/ctx.d.ts +32 -24
- package/components/date-picker/src/index.vue.d.ts +68 -51
- package/components/date-picker-range/src/ctx.d.ts +23 -15
- package/components/date-picker-range/src/index.vue.d.ts +131 -98
- package/components/dialog/src/ctx.d.ts +5 -5
- package/components/dialog/src/index.vue.d.ts +18 -16
- package/components/dialog-input-collection/index.mjs +9 -9
- package/components/dialog-input-collection/src/ctx.d.ts +4 -3
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +12 -8
- package/components/dialog-input-collection/src/index.vue.d.ts +13 -11
- package/components/dialog-input-collection/src/layout.vue.d.ts +8 -4
- package/components/download-plus/index.cjs +1 -1
- package/components/download-plus/index.mjs +21 -22
- package/components/download-plus/src/api.d.ts +1 -1
- package/components/download-plus/src/ctx.d.ts +4 -3
- package/components/download-plus/src/index.vue.d.ts +81 -78
- package/components/editable-text/src/ctx.d.ts +2 -6
- package/components/editable-text/src/index.vue.d.ts +14 -10
- package/components/el-slider/index.mjs +4 -4
- package/components/el-slider/src/button.vue.d.ts +2 -1
- package/components/el-slider/src/composables/use-slide.d.ts +1 -1
- package/components/el-slider/src/composables/use-slider-button.d.ts +1 -1
- package/components/el-slider/src/composables/use-watch.d.ts +1 -1
- package/components/el-slider/src/slider-core.vue.d.ts +7 -6
- package/components/el-slider/src/slider.d.ts +2 -1
- package/components/esri-input-geojson/index.mjs +40 -55
- package/components/esri-input-geojson/src/append.vue.d.ts +97 -96
- package/components/esri-input-geojson/src/ctx.d.ts +21 -22
- package/components/esri-input-geojson/src/default-view.vue.d.ts +7 -3
- package/components/esri-input-geojson/src/index.vue.d.ts +593 -186
- package/components/esri-input-geojson/src/types.d.ts +0 -1
- package/components/esri-input-geojson/src/viewer.vue.d.ts +406 -40
- package/components/fieldset/index.mjs +2 -4
- package/components/fieldset/src/index.vue.d.ts +3 -2
- package/components/form/src/ctx.d.ts +1 -1
- package/components/form/src/index.vue.d.ts +68 -67
- package/components/form-item/index.mjs +6 -7
- package/components/form-item/src/core.vue.d.ts +12 -10
- package/components/form-item/src/ctx.d.ts +6 -4
- package/components/form-item/src/index.vue.d.ts +7 -6
- package/components/form-item-renderer/index.mjs +2 -3
- package/components/form-item-renderer/src/core.vue.d.ts +3 -2
- package/components/form-item-renderer/src/index.vue.d.ts +7 -5
- package/components/form-item-renderer-template/index.mjs +1 -2
- package/components/form-item-renderer-template/src/index.vue.d.ts +3 -2
- package/components/forms-provider/src/index.vue.d.ts +5 -2
- package/components/forms-provider/src/segment.vue.d.ts +7 -3
- package/components/forms-provider/src/view.vue.d.ts +11 -7
- package/components/index2.cjs +1 -1
- package/components/information/src/index.vue.d.ts +3 -2
- package/components/information-collection/src/ctx.d.ts +17 -11
- package/components/information-collection/src/index.vue.d.ts +36 -27
- package/components/information-renderer/index.d.ts +9 -9
- package/components/information-tag/src/ctx.d.ts +4 -3
- package/components/information-tag/src/index.vue.d.ts +12 -11
- package/components/information-templates-default/src/index.vue.d.ts +2 -1
- package/components/input/src/ctx.d.ts +20 -20
- package/components/input/src/index.vue.d.ts +70 -69
- package/components/input-array/src/ctx.d.ts +2 -2
- package/components/input-array/src/form-template.vue.d.ts +2 -1
- package/components/input-array/src/index.vue.d.ts +6 -5
- package/components/input-collection/src/core.vue.d.ts +17 -15
- package/components/input-collection/src/ctx.d.ts +4 -4
- package/components/input-collection/src/index.vue.d.ts +13 -12
- package/components/input-file/src/index.vue.d.ts +51 -50
- package/components/input-file/src/template.vue.d.ts +2 -1
- package/components/input-link/src/ctx.d.ts +19 -21
- package/components/input-link/src/index.vue.d.ts +111 -110
- package/components/input-number/src/ctx.d.ts +5 -5
- package/components/input-number/src/index.vue.d.ts +39 -38
- package/components/input-tag/src/ctx.d.ts +10 -10
- package/components/input-tag/src/index.vue.d.ts +48 -47
- package/components/monaco-editor/src/ctx.d.ts +2 -2
- package/components/monaco-editor/src/index.vue.d.ts +17 -16
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.mjs +2 -2
- package/components/radio/src/ctx.d.ts +3 -3
- package/components/radio/src/index.vue.d.ts +32 -31
- package/components/radio/src/option.vue.d.ts +12 -10
- package/components/radio/src/wraper.vue.d.ts +9 -8
- package/components/renderer-data/src/index.vue.d.ts +3 -2
- package/components/select/src/core.vue.d.ts +99 -239
- package/components/select/src/ctx.d.ts +23 -95
- package/components/select/src/index.vue.d.ts +76 -75
- package/components/select/src/options.vue.d.ts +3 -2
- package/components/slider/src/ctx.d.ts +10 -10
- package/components/slider/src/index.vue.d.ts +29 -25
- package/components/style.css +1 -1
- package/components/switch/src/ctx.d.ts +11 -11
- package/components/switch/src/index.vue.d.ts +24 -20
- package/components/tables-select/index.mjs +1 -2
- package/components/tables-select/src/ctx.d.ts +27 -43
- package/components/tables-select/src/index.vue.d.ts +57 -71
- package/components/template-instances-provider/src/index.vue.d.ts +3 -2
- package/components/templates-default/src/ctx.d.ts +3 -5
- package/components/templates-default/src/index.vue.d.ts +778 -727
- package/components/templates-element-plus/index.mjs +3 -3
- package/components/templates-element-plus/src/index.vue.d.ts +27 -26
- package/components/templates-esri/src/index.vue.d.ts +600 -193
- package/components/templates-layout/index.mjs +3 -3
- package/components/templates-layout/src/index.vue.d.ts +14 -13
- package/components/templates-variant/src/index.vue.d.ts +132 -99
- package/components/time-picker/src/ctx.d.ts +31 -23
- package/components/time-picker/src/index.vue.d.ts +66 -49
- package/components/upload/index.cjs +1 -1
- package/components/upload/index.mjs +45 -45
- package/components/upload/src/ctx.d.ts +24 -22
- package/components/upload/src/file.vue.d.ts +75 -73
- package/components/upload/src/index.vue.d.ts +188 -187
- package/components/upload/src/wraper.vue.d.ts +48 -47
- package/components/upload-plus/index.cjs +7 -7
- package/components/upload-plus/index.mjs +1911 -1937
- package/components/upload-plus/src/api.d.ts +1 -1
- package/components/upload-plus/src/ctx.d.ts +2 -5
- package/components/upload-plus/src/index.vue.d.ts +6 -5
- package/components/use-watch.cjs +1 -1
- package/components/van-cascader/src/ctx.d.ts +33 -25
- package/components/van-cascader/src/index.vue.d.ts +67 -50
- package/components/var-datetime-picker/index.cjs +1 -1
- package/components/var-datetime-picker/index.mjs +18 -20
- package/components/var-datetime-picker/src/ctx.d.ts +4 -3
- package/components/var-datetime-picker/src/index.vue.d.ts +144 -179
- package/components/vditor/src/ctx.d.ts +2 -3
- package/components/vditor/src/index.vue.d.ts +19 -19
- package/composables/index.mjs +3 -5
- package/composables/useSourceManager.d.ts +2 -2
- package/index.css +1 -1
- package/package.json +1 -1
- package/shared/element-plus/instances.d.ts +60 -43
|
@@ -21,7 +21,7 @@ export declare const verify: (data: {
|
|
|
21
21
|
* @returns
|
|
22
22
|
*/
|
|
23
23
|
export declare const upload: (data: Chunk, fileServiceType?: string, init?: {
|
|
24
|
-
onprogress?: XMLHttpRequestEventTarget[
|
|
24
|
+
onprogress?: XMLHttpRequestEventTarget["onprogress"];
|
|
25
25
|
xhrs?: XMLHttpRequest[];
|
|
26
26
|
}) => Promise<unknown>;
|
|
27
27
|
/**
|
|
@@ -48,9 +48,6 @@ export declare const props: {
|
|
|
48
48
|
};
|
|
49
49
|
required: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
50
50
|
formItemSize: {
|
|
51
|
-
/**
|
|
52
|
-
* @description 分片大小
|
|
53
|
-
*/
|
|
54
51
|
type: PropType<"default" | "small" | "large">;
|
|
55
52
|
default: "default" | "small" | "large";
|
|
56
53
|
};
|
|
@@ -94,14 +91,14 @@ export declare const props: {
|
|
|
94
91
|
};
|
|
95
92
|
labelPosition: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "" | "left" | "right" | "top", unknown, "", boolean>;
|
|
96
93
|
rules: {
|
|
97
|
-
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | null)[], unknown, unknown>>;
|
|
94
|
+
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | (((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>)) | null)[], unknown, unknown>>;
|
|
98
95
|
readonly required: false;
|
|
99
96
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
100
97
|
__epPropKey: true;
|
|
101
98
|
};
|
|
102
99
|
error: StringConstructor;
|
|
103
100
|
validateStatus: {
|
|
104
|
-
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "
|
|
101
|
+
readonly type: PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
105
102
|
readonly required: false;
|
|
106
103
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
107
104
|
__epPropKey: true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileInfo } from './types';
|
|
2
2
|
import { Status } from './const';
|
|
3
|
-
declare const
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
chunkSize: {
|
|
5
5
|
type: NumberConstructor;
|
|
6
6
|
default: number;
|
|
@@ -74,14 +74,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
74
74
|
};
|
|
75
75
|
labelPosition: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "" | "left" | "right" | "top", unknown, "", boolean>;
|
|
76
76
|
rules: {
|
|
77
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | null)[], unknown, unknown>>;
|
|
77
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | (((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>)) | null)[], unknown, unknown>>;
|
|
78
78
|
readonly required: false;
|
|
79
79
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
80
80
|
__epPropKey: true;
|
|
81
81
|
};
|
|
82
82
|
error: StringConstructor;
|
|
83
83
|
validateStatus: {
|
|
84
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "
|
|
84
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
85
85
|
readonly required: false;
|
|
86
86
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
87
87
|
__epPropKey: true;
|
|
@@ -167,14 +167,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
167
167
|
};
|
|
168
168
|
labelPosition: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "" | "left" | "right" | "top", unknown, "", boolean>;
|
|
169
169
|
rules: {
|
|
170
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | null)[], unknown, unknown>>;
|
|
170
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | (((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>)) | null)[], unknown, unknown>>;
|
|
171
171
|
readonly required: false;
|
|
172
172
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
173
173
|
__epPropKey: true;
|
|
174
174
|
};
|
|
175
175
|
error: StringConstructor;
|
|
176
176
|
validateStatus: {
|
|
177
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "
|
|
177
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
178
178
|
readonly required: false;
|
|
179
179
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
180
180
|
__epPropKey: true;
|
|
@@ -206,4 +206,5 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
206
206
|
dictId: string;
|
|
207
207
|
fileStatus: Status;
|
|
208
208
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
209
|
+
declare const _default: typeof __VLS_export;
|
|
209
210
|
export default _default;
|
package/components/use-watch.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),b=require("element-plus"),W=require("./debounce.cjs"),I=require("@vunk/shared/function");function le(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function ue(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=W.toNumber(n),n=n===n?n:0),t!==void 0&&(t=W.toNumber(t),t=t===t?t:0),le(W.toNumber(e),t,n)}function oe(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function D(e){return typeof e=="function"?e():a.unref(e)}const ae=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const se=Object.prototype.toString,re=e=>se.call(e)==="[object Object]",ie=()=>{},ce=ae?window:void 0;function de(e){var t;const n=D(e);return(t=n==null?void 0:n.$el)!=null?t:n}function H(...e){let t,n,o,d;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,d]=e,t=ce):[t,n,o,d]=e,!t)return ie;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const u=[],s=()=>{u.forEach(i=>i()),u.length=0},g=(i,v,E,N)=>(i.addEventListener(v,E,N),()=>i.removeEventListener(v,E,N)),V=a.watch(()=>[de(t),D(d)],([i,v])=>{if(s(),!i)return;const E=re(v)?{...v}:v;u.push(...n.flatMap(N=>o.map(B=>g(i,N,B,E))))},{immediate:!0,flush:"post"}),l=()=>{V(),s()};return oe(l),l}const p=Symbol("sliderContextKey"),fe=(e,t,n)=>{const o=a.ref();return a.onMounted(async()=>{e.range?(Array.isArray(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(typeof e.modelValue!="number"||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),H(window,"resize",n),await a.nextTick(),n()}),{sliderWrapper:o}},me=e=>{const t=a.computed(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((o,d)=>o-d).filter(o=>o<=e.max&&o>=e.min).map(o=>({point:o,position:(o-e.min)*100/(e.max-e.min),mark:e.marks[o]})):[]);return a.watchEffect(()=>{if(e.step==="mark"&&!e.marks&&console.warn("[ElSlider] marks prop must be provided when step is mark"),e.marks){const n=Object.keys(e.marks),o=t.value.map(u=>u.point),d=n.filter(u=>{const s=Number.parseFloat(u);return Number.isNaN(s)||!o.includes(s)});d.length>0&&console.warn(`[ElSlider] Some marks keys are invalid (not a number or out of [min, max]): [${d.map(u=>`'${u}'`).join(", ")}] and will be ignored.`)}}),t},ve=(e,t,n,o)=>{const{formItem:d}=b.useFormItem(),u=a.shallowRef(),s=a.ref(),g=a.ref(),V={firstButton:s,secondButton:g},l=b.useFormDisabled(),i=a.computed(()=>Math.min(t.firstValue,t.secondValue)),v=a.computed(()=>Math.max(t.firstValue,t.secondValue)),E=a.computed(()=>e.range?`${100*(v.value-i.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),N=a.computed(()=>e.range?`${100*(i.value-e.min)/(e.max-e.min)}%`:"0%"),B=a.computed(()=>e.vertical?{height:e.height}:{}),k=a.computed(()=>e.vertical?{height:E.value,bottom:N.value}:o.value?{width:E.value,left:"auto",right:N.value}:{width:E.value,left:N.value}),O=()=>{if(u.value){const c=u.value.getBoundingClientRect();t.sliderSize=c[e.vertical?"height":"width"]}},$=c=>{const f=e.min+c*(e.max-e.min)/100;if(!e.range)return s;let y;return Math.abs(i.value-f)<Math.abs(v.value-f)?y=t.firstValue<t.secondValue?"firstButton":"secondButton":y=t.firstValue>t.secondValue?"firstButton":"secondButton",V[y]},A=c=>{const f=$(c);return f.value.setPosition(c),f},G=c=>{t.firstValue=c??e.min;const f=e.range?[i.value,v.value]:c??e.min;K(f)},R=c=>{t.secondValue=c,e.range&&K([i.value,v.value])},K=c=>{n(b.UPDATE_MODEL_EVENT,c),n(b.INPUT_EVENT,c)},C=async()=>{await a.nextTick(),n(b.CHANGE_EVENT,e.range?[i.value,v.value]:e.modelValue)},T=c=>{var y,j,z,U;if(l.value||t.dragging)return;O();let f=0;if(e.vertical){const L=((j=(y=c.touches)==null?void 0:y.item(0))==null?void 0:j.clientY)??c.clientY;f=(u.value.getBoundingClientRect().bottom-L)/t.sliderSize*100}else{const L=((U=(z=c.touches)==null?void 0:z.item(0))==null?void 0:U.clientX)??c.clientX,Y=u.value.getBoundingClientRect();o.value?f=(Y.right-L)/t.sliderSize*100:f=(L-Y.left)/t.sliderSize*100}if(!(f<0||f>100))return A(f)};return{elFormItem:d,slider:u,firstButton:s,secondButton:g,sliderDisabled:l,minValue:i,maxValue:v,runwayStyle:B,barStyle:k,resetSize:O,setPosition:A,emitChange:C,onSliderWrapperPrevent:c=>{var f,y;((f=V.firstButton.value)!=null&&f.dragging||(y=V.secondButton.value)!=null&&y.dragging)&&c.preventDefault()},onSliderClick:c=>{T(c)&&C()},onSliderDown:async c=>{const f=T(c);f&&(await a.nextTick(),f.value.onButtonDown(c))},onSliderMarkerDown:c=>{if(l.value||t.dragging)return;A(c)&&C()},setFirstValue:G,setSecondValue:R}},ge=e=>e.code||e.key,he=(e,t,n)=>{const o=a.ref(),d=a.ref(!1),u=a.computed(()=>t.value instanceof Function),s=a.computed(()=>u.value&&t.value(e.modelValue)||e.modelValue),g=W.debounce(()=>{n.value&&(d.value=!0)},50),V=W.debounce(()=>{n.value&&(d.value=!1)},50);return{tooltip:o,tooltipVisible:d,formatValue:s,displayTooltip:g,hideTooltip:V}},Ve=(e,t,n)=>{const{disabled:o,min:d,max:u,step:s,showTooltip:g,persistent:V,precision:l,sliderSize:i,formatTooltip:v,emitChange:E,resetSize:N,updateDragging:B,markList:k,isRtl:O}=a.inject(p),{tooltip:$,tooltipVisible:A,formatValue:G,displayTooltip:R,hideTooltip:K}=he(e,v,g),C=a.ref(),T=a.computed(()=>`${(e.modelValue-d.value)/(u.value-d.value)*100}%`),J=a.computed(()=>e.vertical?{bottom:T.value}:O.value?{right:T.value}:{left:T.value}),X=a.computed(()=>s.value==="mark"&&k.value.length>0),Q=()=>{t.hovering=!0,R()},Z=()=>{t.hovering=!1,t.dragging||K()},c=r=>{o.value||(r.preventDefault(),ne(r),window.addEventListener("mousemove",q),window.addEventListener("touchmove",q),window.addEventListener("mouseup",_),window.addEventListener("touchend",_),window.addEventListener("contextmenu",_),C.value.focus())},f=r=>{o.value||(t.newPosition=Number.parseFloat(T.value)+r/(u.value-d.value)*100,P(t.newPosition),E())},y=r=>{if(o.value||!k.value.length)return;const m=e.modelValue,h=Number.EPSILON,S=Math.abs(r);let w;if(r>0){const M=k.value.findIndex(x=>x.point>m+h);if(M!==-1){const x=Math.min(M+S-1,k.value.length-1);w=k.value[x].point}}else{let M=-1;for(let x=k.value.length-1;x>=0;x--)if(k.value[x].point<m-h){M=x;break}if(M!==-1){const x=Math.max(M-(S-1),0);w=k.value[x].point}}if(w!==void 0&&w!==m){const M=(w-d.value)/(u.value-d.value)*100;P(M),E()}},j=()=>{X.value?y(-1):typeof s.value=="number"&&f(-s.value)},z=()=>{X.value?y(1):typeof s.value=="number"&&f(s.value)},U=()=>{X.value?y(-4):typeof s.value=="number"&&f(-s.value*4)},L=()=>{X.value?y(4):typeof s.value=="number"&&f(s.value*4)},Y=()=>{o.value||(P(0),E())},ee=()=>{o.value||(P(100),E())},te=r=>{const m=ge(r);let h=!0;switch(m){case b.EVENT_CODE.left:case b.EVENT_CODE.down:j();break;case b.EVENT_CODE.right:case b.EVENT_CODE.up:z();break;case b.EVENT_CODE.home:Y();break;case b.EVENT_CODE.end:ee();break;case b.EVENT_CODE.pageDown:U();break;case b.EVENT_CODE.pageUp:L();break;default:h=!1;break}h&&r.preventDefault()},F=r=>{let m,h;return r.type.startsWith("touch")?(h=r.touches[0].clientY,m=r.touches[0].clientX):(h=r.clientY,m=r.clientX),{clientX:m,clientY:h}},ne=r=>{t.dragging=!0,t.isClick=!0;const{clientX:m,clientY:h}=F(r);e.vertical?t.startY=h:t.startX=m,t.startPosition=Number.parseFloat(T.value),t.newPosition=t.startPosition},q=r=>{if(t.dragging){t.isClick=!1,R(),N();let m;const{clientX:h,clientY:S}=F(r);if(e.vertical)t.currentY=S,m=(t.startY-t.currentY)/i.value*100;else{t.currentX=h;const w=(t.currentX-t.startX)/i.value*100;m=O.value?-w:w}t.newPosition=t.startPosition+m,P(t.newPosition)}},_=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||K(),t.isClick||P(t.newPosition),E()},0),window.removeEventListener("mousemove",q),window.removeEventListener("touchmove",q),window.removeEventListener("mouseup",_),window.removeEventListener("touchend",_),window.removeEventListener("contextmenu",_))},P=async r=>{if(r===null||Number.isNaN(+r))return;r=ue(r,0,100);let m;if(s.value==="mark")k.value.length===0?m=r<=50?d.value:u.value:m=k.value.reduce((S,w)=>Math.abs(w.position-r)<Math.abs(S.position-r)?w:S).point;else{const h=Math.floor((u.value-d.value)/s.value),S=h*s.value/(u.value-d.value)*100,w=S+(100-S)/2;if(r<S){const M=S/h,x=Math.round(r/M);m=d.value+x*s.value}else r<w?m=d.value+h*s.value:m=u.value;m=Number.parseFloat(m.toFixed(l.value))}m!==e.modelValue&&n(b.UPDATE_MODEL_EVENT,m),!t.dragging&&e.modelValue!==t.oldValue&&(t.oldValue=e.modelValue),await a.nextTick(),t.dragging&&R(),$.value.updatePopper()};return a.watch(()=>t.dragging,r=>{B(r)}),H(C,"touchstart",c,{passive:!1}),{disabled:o,button:C,tooltip:$,tooltipVisible:A,showTooltip:g,persistent:V,wrapperStyle:J,formatValue:G,handleMouseEnter:Q,handleMouseLeave:Z,onButtonDown:c,onKeyDown:te,setPosition:P}},Ee=(e,t,n,o,d)=>({stops:a.computed(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step==="mark"||e.step===0)return e.step===0&&console.warn("[ElSlider] step should not be 0."),[];const g=Math.ceil((e.max-e.min)/e.step),V=100*e.step/(e.max-e.min),l=Array.from({length:g-1}).map((i,v)=>(v+1)*V);return e.range?l.filter(i=>i<100*(n.value-e.min)/(e.max-e.min)||i>100*(o.value-e.min)/(e.max-e.min)):l.filter(i=>i>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:g=>e.vertical?{bottom:`${g}%`}:d.value?{right:`${g}%`}:{left:`${g}%`}}),be=(e,t,n,o,d,u)=>{const s=l=>{d(b.UPDATE_MODEL_EVENT,l),d(b.INPUT_EVENT,l)},g=()=>e.range?![n.value,o.value].every((l,i)=>l===t.oldValue[i]):e.modelValue!==t.oldValue,V=()=>{var i,v;if(e.min>e.max)throw new Error("[Element Plus Slider] props.min should not be greater than props.max.");const l=e.modelValue;e.range&&Array.isArray(l)?l[1]<e.min?s([e.min,e.min]):l[0]>e.max?s([e.max,e.max]):l[0]<e.min?s([e.min,l[1]]):l[1]>e.max?s([l[0],e.max]):(t.firstValue=l[0],t.secondValue=l[1],g()&&(e.validateEvent&&((i=u==null?void 0:u.validate)==null||i.call(u,"change").catch(I.noop)),t.oldValue=l.slice())):!e.range&&typeof l=="number"&&!Number.isNaN(l)&&(l<e.min?s(e.min):l>e.max?s(e.max):(t.firstValue=l,g()&&(e.validateEvent&&((v=u==null?void 0:u.validate)==null||v.call(u,"change").catch(I.noop)),t.oldValue=l)))};V(),a.watch(()=>t.dragging,l=>{l||V()}),a.watch(()=>e.modelValue,(l,i)=>{t.dragging||Array.isArray(l)&&Array.isArray(i)&&l.every((v,E)=>v===i[E])&&t.firstValue===l[0]&&t.secondValue===l[1]||V()},{deep:!0}),a.watch(()=>[e.min,e.max],()=>{V()})};exports.sliderContextKey=p;exports.useEventListener=H;exports.useLifecycle=fe;exports.useMarks=me;exports.useSlide=ve;exports.useSliderButton=Ve;exports.useStops=Ee;exports.useWatch=be;
|
|
1
|
+
"use strict";const u=require("vue"),E=require("element-plus"),W=require("./debounce.cjs"),D=require("@vunk/shared/function");function le(e,t,l){return e===e&&(l!==void 0&&(e=e<=l?e:l),t!==void 0&&(e=e>=t?e:t)),e}function ue(e,t,l){return l===void 0&&(l=t,t=void 0),l!==void 0&&(l=W.toNumber(l),l=l===l?l:0),t!==void 0&&(t=W.toNumber(t),t=t===t?t:0),le(W.toNumber(e),t,l)}function oe(e){return u.getCurrentScope()?(u.onScopeDispose(e),!0):!1}const ae=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const se=Object.prototype.toString,ie=e=>se.call(e)==="[object Object]";function H(e){return Array.isArray(e)?e:[e]}function re(e,t,l){return u.watch(e,t,{...l,immediate:!0})}const ce=ae?window:void 0;function de(e){var t;const l=u.toValue(e);return(t=l==null?void 0:l.$el)!=null?t:l}function J(...e){const t=[],l=()=>{t.forEach(c=>c()),t.length=0},f=(c,m,n,d)=>(c.addEventListener(m,n,d),()=>c.removeEventListener(m,n,d)),r=u.computed(()=>{const c=H(u.toValue(e[0])).filter(m=>m!=null);return c.every(m=>typeof m!="string")?c:void 0}),o=re(()=>{var c,m;return[(m=(c=r.value)==null?void 0:c.map(n=>de(n)))!=null?m:[ce].filter(n=>n!=null),H(u.toValue(r.value?e[1]:e[0])),H(u.unref(r.value?e[2]:e[1])),u.toValue(r.value?e[3]:e[2])]},([c,m,n,d])=>{if(l(),!(c!=null&&c.length)||!(m!=null&&m.length)||!(n!=null&&n.length))return;const V=ie(d)?{...d}:d;t.push(...c.flatMap(y=>m.flatMap(T=>n.map(O=>f(y,T,O,V)))))},{flush:"post"}),a=()=>{o(),l()};return oe(l),a}const p=Symbol("sliderContextKey"),fe=(e,t,l)=>{const f=u.ref();return u.onMounted(async()=>{e.range?(Array.isArray(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(typeof e.modelValue!="number"||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),J(window,"resize",l),await u.nextTick(),l()}),{sliderWrapper:f}},me=e=>{const t=u.computed(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((f,r)=>f-r).filter(f=>f<=e.max&&f>=e.min).map(f=>({point:f,position:(f-e.min)*100/(e.max-e.min),mark:e.marks[f]})):[]);return u.watchEffect(()=>{if(e.step==="mark"&&!e.marks&&console.warn("[ElSlider] marks prop must be provided when step is mark"),e.marks){const l=Object.keys(e.marks),f=t.value.map(o=>o.point),r=l.filter(o=>{const a=Number.parseFloat(o);return Number.isNaN(a)||!f.includes(a)});r.length>0&&console.warn(`[ElSlider] Some marks keys are invalid (not a number or out of [min, max]): [${r.map(o=>`'${o}'`).join(", ")}] and will be ignored.`)}}),t},ve=(e,t,l,f)=>{const{formItem:r}=E.useFormItem(),o=u.shallowRef(),a=u.ref(),c=u.ref(),m={firstButton:a,secondButton:c},n=E.useFormDisabled(),d=u.computed(()=>Math.min(t.firstValue,t.secondValue)),V=u.computed(()=>Math.max(t.firstValue,t.secondValue)),y=u.computed(()=>e.range?`${100*(V.value-d.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),T=u.computed(()=>e.range?`${100*(d.value-e.min)/(e.max-e.min)}%`:"0%"),O=u.computed(()=>e.vertical?{height:e.height}:{}),k=u.computed(()=>e.vertical?{height:y.value,bottom:T.value}:f.value?{width:y.value,left:"auto",right:T.value}:{width:y.value,left:T.value}),A=()=>{if(o.value){const i=o.value.getBoundingClientRect();t.sliderSize=i[e.vertical?"height":"width"]}},$=i=>{const v=e.min+i*(e.max-e.min)/100;if(!e.range)return a;let b;return Math.abs(d.value-v)<Math.abs(V.value-v)?b=t.firstValue<t.secondValue?"firstButton":"secondButton":b=t.firstValue>t.secondValue?"firstButton":"secondButton",m[b]},R=i=>{const v=$(i);return v.value.setPosition(i),v},G=i=>{t.firstValue=i??e.min;const v=e.range?[d.value,V.value]:i??e.min;K(v)},_=i=>{t.secondValue=i,e.range&&K([d.value,V.value])},K=i=>{l(E.UPDATE_MODEL_EVENT,i),l(E.INPUT_EVENT,i)},C=async()=>{await u.nextTick(),l(E.CHANGE_EVENT,e.range?[d.value,V.value]:e.modelValue)},M=i=>{var b,j,z,U;if(n.value||t.dragging)return;A();let v=0;if(e.vertical){const L=((j=(b=i.touches)==null?void 0:b.item(0))==null?void 0:j.clientY)??i.clientY;v=(o.value.getBoundingClientRect().bottom-L)/t.sliderSize*100}else{const L=((U=(z=i.touches)==null?void 0:z.item(0))==null?void 0:U.clientX)??i.clientX,Y=o.value.getBoundingClientRect();f.value?v=(Y.right-L)/t.sliderSize*100:v=(L-Y.left)/t.sliderSize*100}if(!(v<0||v>100))return R(v)};return{elFormItem:r,slider:o,firstButton:a,secondButton:c,sliderDisabled:n,minValue:d,maxValue:V,runwayStyle:O,barStyle:k,resetSize:A,setPosition:R,emitChange:C,onSliderWrapperPrevent:i=>{var v,b;((v=m.firstButton.value)!=null&&v.dragging||(b=m.secondButton.value)!=null&&b.dragging)&&i.preventDefault()},onSliderClick:i=>{M(i)&&C()},onSliderDown:async i=>{const v=M(i);v&&(await u.nextTick(),v.value.onButtonDown(i))},onSliderMarkerDown:i=>{if(n.value||t.dragging)return;R(i)&&C()},setFirstValue:G,setSecondValue:_}},ge=e=>e.code||e.key,he=(e,t,l)=>{const f=u.ref(),r=u.ref(!1),o=u.computed(()=>t.value instanceof Function),a=u.computed(()=>o.value&&t.value(e.modelValue)||e.modelValue),c=W.debounce(()=>{l.value&&(r.value=!0)},50),m=W.debounce(()=>{l.value&&(r.value=!1)},50);return{tooltip:f,tooltipVisible:r,formatValue:a,displayTooltip:c,hideTooltip:m}},Ve=(e,t,l)=>{const{disabled:f,min:r,max:o,step:a,showTooltip:c,persistent:m,precision:n,sliderSize:d,formatTooltip:V,emitChange:y,resetSize:T,updateDragging:O,markList:k,isRtl:A}=u.inject(p),{tooltip:$,tooltipVisible:R,formatValue:G,displayTooltip:_,hideTooltip:K}=he(e,V,c),C=u.ref(),M=u.computed(()=>`${(e.modelValue-r.value)/(o.value-r.value)*100}%`),Q=u.computed(()=>e.vertical?{bottom:M.value}:A.value?{right:M.value}:{left:M.value}),X=u.computed(()=>a.value==="mark"&&k.value.length>0),Z=()=>{t.hovering=!0,_()},F=()=>{t.hovering=!1,t.dragging||K()},i=s=>{f.value||(s.preventDefault(),ne(s),window.addEventListener("mousemove",q),window.addEventListener("touchmove",q),window.addEventListener("mouseup",B),window.addEventListener("touchend",B),window.addEventListener("contextmenu",B),C.value.focus())},v=s=>{f.value||(t.newPosition=Number.parseFloat(M.value)+s/(o.value-r.value)*100,P(t.newPosition),y())},b=s=>{if(f.value||!k.value.length)return;const g=e.modelValue,h=Number.EPSILON,S=Math.abs(s);let w;if(s>0){const N=k.value.findIndex(x=>x.point>g+h);if(N!==-1){const x=Math.min(N+S-1,k.value.length-1);w=k.value[x].point}}else{let N=-1;for(let x=k.value.length-1;x>=0;x--)if(k.value[x].point<g-h){N=x;break}if(N!==-1){const x=Math.max(N-(S-1),0);w=k.value[x].point}}if(w!==void 0&&w!==g){const N=(w-r.value)/(o.value-r.value)*100;P(N),y()}},j=()=>{X.value?b(-1):typeof a.value=="number"&&v(-a.value)},z=()=>{X.value?b(1):typeof a.value=="number"&&v(a.value)},U=()=>{X.value?b(-4):typeof a.value=="number"&&v(-a.value*4)},L=()=>{X.value?b(4):typeof a.value=="number"&&v(a.value*4)},Y=()=>{f.value||(P(0),y())},ee=()=>{f.value||(P(100),y())},te=s=>{const g=ge(s);let h=!0;switch(g){case E.EVENT_CODE.left:case E.EVENT_CODE.down:j();break;case E.EVENT_CODE.right:case E.EVENT_CODE.up:z();break;case E.EVENT_CODE.home:Y();break;case E.EVENT_CODE.end:ee();break;case E.EVENT_CODE.pageDown:U();break;case E.EVENT_CODE.pageUp:L();break;default:h=!1;break}h&&s.preventDefault()},I=s=>{let g,h;return s.type.startsWith("touch")?(h=s.touches[0].clientY,g=s.touches[0].clientX):(h=s.clientY,g=s.clientX),{clientX:g,clientY:h}},ne=s=>{t.dragging=!0,t.isClick=!0;const{clientX:g,clientY:h}=I(s);e.vertical?t.startY=h:t.startX=g,t.startPosition=Number.parseFloat(M.value),t.newPosition=t.startPosition},q=s=>{if(t.dragging){t.isClick=!1,_(),T();let g;const{clientX:h,clientY:S}=I(s);if(e.vertical)t.currentY=S,g=(t.startY-t.currentY)/d.value*100;else{t.currentX=h;const w=(t.currentX-t.startX)/d.value*100;g=A.value?-w:w}t.newPosition=t.startPosition+g,P(t.newPosition)}},B=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||K(),t.isClick||P(t.newPosition),y()},0),window.removeEventListener("mousemove",q),window.removeEventListener("touchmove",q),window.removeEventListener("mouseup",B),window.removeEventListener("touchend",B),window.removeEventListener("contextmenu",B))},P=async s=>{if(s===null||Number.isNaN(+s))return;s=ue(s,0,100);let g;if(a.value==="mark")k.value.length===0?g=s<=50?r.value:o.value:g=k.value.reduce((S,w)=>Math.abs(w.position-s)<Math.abs(S.position-s)?w:S).point;else{const h=Math.floor((o.value-r.value)/a.value),S=h*a.value/(o.value-r.value)*100,w=S+(100-S)/2;if(s<S){const N=S/h,x=Math.round(s/N);g=r.value+x*a.value}else s<w?g=r.value+h*a.value:g=o.value;g=Number.parseFloat(g.toFixed(n.value))}g!==e.modelValue&&l(E.UPDATE_MODEL_EVENT,g),!t.dragging&&e.modelValue!==t.oldValue&&(t.oldValue=e.modelValue),await u.nextTick(),t.dragging&&_(),$.value.updatePopper()};return u.watch(()=>t.dragging,s=>{O(s)}),J(C,"touchstart",i,{passive:!1}),{disabled:f,button:C,tooltip:$,tooltipVisible:R,showTooltip:c,persistent:m,wrapperStyle:Q,formatValue:G,handleMouseEnter:Z,handleMouseLeave:F,onButtonDown:i,onKeyDown:te,setPosition:P}},Ee=(e,t,l,f,r)=>({stops:u.computed(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step==="mark"||e.step===0)return e.step===0&&console.warn("[ElSlider] step should not be 0."),[];const c=Math.ceil((e.max-e.min)/e.step),m=100*e.step/(e.max-e.min),n=Array.from({length:c-1}).map((d,V)=>(V+1)*m);return e.range?n.filter(d=>d<100*(l.value-e.min)/(e.max-e.min)||d>100*(f.value-e.min)/(e.max-e.min)):n.filter(d=>d>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:c=>e.vertical?{bottom:`${c}%`}:r.value?{right:`${c}%`}:{left:`${c}%`}}),be=(e,t,l,f,r,o)=>{const a=n=>{r(E.UPDATE_MODEL_EVENT,n),r(E.INPUT_EVENT,n)},c=()=>e.range?![l.value,f.value].every((n,d)=>n===t.oldValue[d]):e.modelValue!==t.oldValue,m=()=>{var d,V;if(e.min>e.max)throw new Error("[Element Plus Slider] props.min should not be greater than props.max.");const n=e.modelValue;e.range&&Array.isArray(n)?n[1]<e.min?a([e.min,e.min]):n[0]>e.max?a([e.max,e.max]):n[0]<e.min?a([e.min,n[1]]):n[1]>e.max?a([n[0],e.max]):(t.firstValue=n[0],t.secondValue=n[1],c()&&(e.validateEvent&&((d=o==null?void 0:o.validate)==null||d.call(o,"change").catch(D.noop)),t.oldValue=n.slice())):!e.range&&typeof n=="number"&&!Number.isNaN(n)&&(n<e.min?a(e.min):n>e.max?a(e.max):(t.firstValue=n,c()&&(e.validateEvent&&((V=o==null?void 0:o.validate)==null||V.call(o,"change").catch(D.noop)),t.oldValue=n)))};m(),u.watch(()=>t.dragging,n=>{n||m()}),u.watch(()=>e.modelValue,(n,d)=>{t.dragging||Array.isArray(n)&&Array.isArray(d)&&n.every((V,y)=>V===d[y])&&t.firstValue===n[0]&&t.secondValue===n[1]||m()},{deep:!0}),u.watch(()=>[e.min,e.max],()=>{m()})};exports.sliderContextKey=p;exports.useEventListener=J;exports.useLifecycle=fe;exports.useMarks=me;exports.useSlide=ve;exports.useSliderButton=Ve;exports.useStops=Ee;exports.useWatch=be;
|
|
@@ -63,14 +63,14 @@ export declare const props: {
|
|
|
63
63
|
};
|
|
64
64
|
labelPosition: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, "" | "left" | "right" | "top", unknown, "", boolean>;
|
|
65
65
|
rules: {
|
|
66
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | ((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | null)[], unknown, unknown>>;
|
|
66
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>) | (((new (...args: any[]) => import("element-plus").FormItemRule | import("element-plus").FormItemRule[]) | (() => import("element-plus/es/utils/typescript.mjs").Arrayable<import("element-plus").FormItemRule>)) | null)[], unknown, unknown>>;
|
|
67
67
|
readonly required: false;
|
|
68
68
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
69
69
|
__epPropKey: true;
|
|
70
70
|
};
|
|
71
71
|
error: StringConstructor;
|
|
72
72
|
validateStatus: {
|
|
73
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "
|
|
73
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
|
|
74
74
|
readonly required: false;
|
|
75
75
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
76
76
|
__epPropKey: true;
|
|
@@ -79,7 +79,7 @@ export declare const props: {
|
|
|
79
79
|
inlineMessage: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
80
80
|
showMessage: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
81
81
|
emptyValues: ArrayConstructor;
|
|
82
|
-
valueOnClear: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | ((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | null)[], unknown, unknown, undefined, boolean>;
|
|
82
|
+
valueOnClear: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
|
|
83
83
|
size: {
|
|
84
84
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
85
85
|
readonly required: false;
|
|
@@ -89,17 +89,17 @@ export declare const props: {
|
|
|
89
89
|
placeholder: StringConstructor;
|
|
90
90
|
disabled: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
91
91
|
clearable: BooleanConstructor;
|
|
92
|
-
clearIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component
|
|
92
|
+
clearIcon: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | (((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component)) | null)[], unknown, unknown, import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, boolean>;
|
|
93
93
|
filterable: BooleanConstructor;
|
|
94
94
|
filterMethod: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => (node: import("element-plus").CascaderNode, keyword: string) => boolean) | (() => (node: import("element-plus").CascaderNode, keyword: string) => boolean) | {
|
|
95
95
|
(): (node: import("element-plus").CascaderNode, keyword: string) => boolean;
|
|
96
96
|
new (): any;
|
|
97
97
|
readonly prototype: any;
|
|
98
|
-
} | ((new (...args: any[]) => (node: import("element-plus").CascaderNode, keyword: string) => boolean) | (() => (node: import("element-plus").CascaderNode, keyword: string) => boolean) | {
|
|
98
|
+
} | (((new (...args: any[]) => (node: import("element-plus").CascaderNode, keyword: string) => boolean) | (() => (node: import("element-plus").CascaderNode, keyword: string) => boolean) | {
|
|
99
99
|
(): (node: import("element-plus").CascaderNode, keyword: string) => boolean;
|
|
100
100
|
new (): any;
|
|
101
101
|
readonly prototype: any;
|
|
102
|
-
} | null)[], unknown, unknown, (node: import("element-plus").CascaderNode, keyword: string) => boolean, boolean>;
|
|
102
|
+
}) | null)[], unknown, unknown, (node: import("element-plus").CascaderNode, keyword: string) => boolean, boolean>;
|
|
103
103
|
separator: import("element-plus/es/utils/index.mjs").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
104
104
|
showAllLevels: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
105
105
|
collapseTags: BooleanConstructor;
|
|
@@ -116,12 +116,12 @@ export declare const props: {
|
|
|
116
116
|
(): (value: string) => boolean | Promise<any>;
|
|
117
117
|
new (): any;
|
|
118
118
|
readonly prototype: any;
|
|
119
|
-
} | ((new (...args: any[]) => (value: string) => boolean | Promise<any>) | (() => (value: string) => boolean | Promise<any>) | {
|
|
119
|
+
} | (((new (...args: any[]) => (value: string) => boolean | Promise<any>) | (() => (value: string) => boolean | Promise<any>) | {
|
|
120
120
|
(): (value: string) => boolean | Promise<any>;
|
|
121
121
|
new (): any;
|
|
122
122
|
readonly prototype: any;
|
|
123
|
-
} | null)[], unknown, unknown, () => true, boolean>;
|
|
124
|
-
fallbackPlacements: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]) | ((new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]) | null)[], unknown, unknown, string[], boolean>;
|
|
123
|
+
}) | null)[], unknown, unknown, () => true, boolean>;
|
|
124
|
+
fallbackPlacements: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[]) | (((new (...args: any[]) => import("element-plus").Placement[]) | (() => import("element-plus").Placement[])) | null)[], unknown, unknown, string[], boolean>;
|
|
125
125
|
popperClass: {
|
|
126
126
|
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | {
|
|
127
127
|
[x: string]: boolean;
|
|
@@ -143,9 +143,15 @@ export declare const props: {
|
|
|
143
143
|
[x: string]: boolean;
|
|
144
144
|
} | (string | {
|
|
145
145
|
[x: string]: boolean;
|
|
146
|
-
} | (string |
|
|
146
|
+
} | (string | {
|
|
147
|
+
[x: string]: boolean;
|
|
148
|
+
} | (string | {
|
|
149
|
+
[x: string]: boolean;
|
|
150
|
+
} | any)[])[])[])[])[])[])[])[])[])[])[]) | (() => string | {
|
|
151
|
+
[x: string]: boolean;
|
|
152
|
+
} | (string | {
|
|
147
153
|
[x: string]: boolean;
|
|
148
|
-
}
|
|
154
|
+
} | (string | {
|
|
149
155
|
[x: string]: boolean;
|
|
150
156
|
} | (string | {
|
|
151
157
|
[x: string]: boolean;
|
|
@@ -165,9 +171,11 @@ export declare const props: {
|
|
|
165
171
|
[x: string]: boolean;
|
|
166
172
|
} | (string | {
|
|
167
173
|
[x: string]: boolean;
|
|
168
|
-
} |
|
|
174
|
+
} | any)[])[])[])[])[])[])[])[])[])[])[]) | (((new (...args: any[]) => string | {
|
|
175
|
+
[x: string]: boolean;
|
|
176
|
+
} | (string | {
|
|
169
177
|
[x: string]: boolean;
|
|
170
|
-
}
|
|
178
|
+
} | (string | {
|
|
171
179
|
[x: string]: boolean;
|
|
172
180
|
} | (string | {
|
|
173
181
|
[x: string]: boolean;
|
|
@@ -187,9 +195,9 @@ export declare const props: {
|
|
|
187
195
|
[x: string]: boolean;
|
|
188
196
|
} | (string | {
|
|
189
197
|
[x: string]: boolean;
|
|
190
|
-
} |
|
|
198
|
+
} | any)[])[])[])[])[])[])[])[])[])[])[]) | (() => string | {
|
|
191
199
|
[x: string]: boolean;
|
|
192
|
-
}
|
|
200
|
+
} | (string | {
|
|
193
201
|
[x: string]: boolean;
|
|
194
202
|
} | (string | {
|
|
195
203
|
[x: string]: boolean;
|
|
@@ -209,26 +217,26 @@ export declare const props: {
|
|
|
209
217
|
[x: string]: boolean;
|
|
210
218
|
} | (string | {
|
|
211
219
|
[x: string]: boolean;
|
|
212
|
-
} | (string |
|
|
220
|
+
} | (string | {
|
|
213
221
|
[x: string]: boolean;
|
|
214
|
-
})[])[])[])[])[])[])[])[])[])[]) | null)[], unknown, unknown>>;
|
|
222
|
+
} | any)[])[])[])[])[])[])[])[])[])[])[])) | null)[], unknown, unknown>>;
|
|
215
223
|
readonly required: false;
|
|
216
224
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
217
225
|
__epPropKey: true;
|
|
218
226
|
};
|
|
219
|
-
popperStyle: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | ((new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | null)[], unknown, unknown, undefined, boolean>;
|
|
227
|
+
popperStyle: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue) | (((new (...args: any[]) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | (() => import("vue").StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
|
220
228
|
teleported: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
221
|
-
effect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string) | (() => import("element-plus").PopperEffect) | ((new (...args: any[]) => string) | (() => import("element-plus").PopperEffect) | null)[], unknown, unknown, string, boolean>;
|
|
229
|
+
effect: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => string) | (() => import("element-plus").PopperEffect) | (((new (...args: any[]) => string) | (() => import("element-plus").PopperEffect)) | null)[], unknown, unknown, string, boolean>;
|
|
222
230
|
tagType: {
|
|
223
231
|
default: string;
|
|
224
|
-
type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "
|
|
232
|
+
type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>>;
|
|
225
233
|
required: false;
|
|
226
234
|
validator: ((val: unknown) => boolean) | undefined;
|
|
227
235
|
__epPropKey: true;
|
|
228
236
|
};
|
|
229
237
|
tagEffect: {
|
|
230
238
|
default: string;
|
|
231
|
-
type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "
|
|
239
|
+
type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<StringConstructor, "dark" | "light" | "plain", unknown>>;
|
|
232
240
|
required: false;
|
|
233
241
|
validator: ((val: unknown) => boolean) | undefined;
|
|
234
242
|
__epPropKey: true;
|
|
@@ -239,13 +247,13 @@ export declare const props: {
|
|
|
239
247
|
showPrefix: import("element-plus/es/utils/index.mjs").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
240
248
|
fitInputWidth: import("element-plus/es/utils/index.mjs").EpPropFinalized<(BooleanConstructor | NumberConstructor)[], unknown, unknown, boolean, boolean>;
|
|
241
249
|
modelValue: {
|
|
242
|
-
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | number | Record<string, any> | import("element-plus").CascaderNodePathValue | (import("element-plus").CascaderNodeValue | import("element-plus").CascaderNodePathValue)[]) | (() => import("element-plus").CascaderValue | null) | ((new (...args: any[]) => string | number | Record<string, any> | import("element-plus").CascaderNodePathValue | (import("element-plus").CascaderNodeValue | import("element-plus").CascaderNodePathValue)[]) | (() => import("element-plus").CascaderValue | null) | null)[], unknown, unknown>>;
|
|
250
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils/index.mjs").EpPropMergeType<(new (...args: any[]) => string | number | Record<string, any> | import("element-plus").CascaderNodePathValue | (import("element-plus").CascaderNodeValue | import("element-plus").CascaderNodePathValue)[]) | (() => import("element-plus").CascaderValue | null) | (((new (...args: any[]) => string | number | Record<string, any> | import("element-plus").CascaderNodePathValue | (import("element-plus").CascaderNodeValue | import("element-plus").CascaderNodePathValue)[]) | (() => import("element-plus").CascaderValue | null)) | null)[], unknown, unknown>>;
|
|
243
251
|
readonly required: false;
|
|
244
252
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
245
253
|
__epPropKey: true;
|
|
246
254
|
};
|
|
247
|
-
options: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => import("element-plus").CascaderOption[]) | (() => import("element-plus").CascaderOption[]) | ((new (...args: any[]) => import("element-plus").CascaderOption[]) | (() => import("element-plus").CascaderOption[]) | null)[], unknown, unknown, () => import("element-plus").CascaderOption[], boolean>;
|
|
248
|
-
props: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => import("element-plus").CascaderProps) | (() => import("element-plus").CascaderProps) | ((new (...args: any[]) => import("element-plus").CascaderProps) | (() => import("element-plus").CascaderProps) | null)[], unknown, unknown, () => import("element-plus").CascaderProps, boolean>;
|
|
255
|
+
options: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => import("element-plus").CascaderOption[]) | (() => import("element-plus").CascaderOption[]) | (((new (...args: any[]) => import("element-plus").CascaderOption[]) | (() => import("element-plus").CascaderOption[])) | null)[], unknown, unknown, () => import("element-plus").CascaderOption[], boolean>;
|
|
256
|
+
props: import("element-plus/es/utils/index.mjs").EpPropFinalized<(new (...args: any[]) => import("element-plus").CascaderProps) | (() => import("element-plus").CascaderProps) | (((new (...args: any[]) => import("element-plus").CascaderProps) | (() => import("element-plus").CascaderProps)) | null)[], unknown, unknown, () => import("element-plus").CascaderProps, boolean>;
|
|
249
257
|
virtualScroll: BooleanConstructor;
|
|
250
258
|
itemSize: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 34, boolean>;
|
|
251
259
|
height: import("element-plus/es/utils/index.mjs").EpPropFinalized<NumberConstructor, unknown, unknown, 204, boolean>;
|
|
@@ -258,5 +266,5 @@ export declare const emits: {
|
|
|
258
266
|
clear: () => boolean;
|
|
259
267
|
visibleChange: (val: boolean) => boolean;
|
|
260
268
|
expandChange: (val: import("element-plus").CascaderValue) => boolean;
|
|
261
|
-
removeTag: (val: import("element-plus").
|
|
269
|
+
removeTag: (val: import("element-plus").CascaderNode["valueByOption"]) => boolean;
|
|
262
270
|
};
|