完全跑通1.0版本
This commit is contained in:
17
frontend/node_modules/element-plus/es/components/select/index.d.ts
generated
vendored
Normal file
17
frontend/node_modules/element-plus/es/components/select/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { SFCWithInstall } from "../../utils/vue/typescript.js";
|
||||
import { SelectEmits, SelectInstance, SelectOptionProps, SelectProps, SelectPropsPublic, TagTooltipProps, selectEmits, selectProps } from "./src/select.js";
|
||||
import { OptionBasic, OptionPublicInstance, SelectContext } from "./src/type.js";
|
||||
import _default from "./src/select.vue.js";
|
||||
import _default$1 from "./src/option.vue.js";
|
||||
import _default$2 from "./src/option-group.vue.js";
|
||||
import { selectGroupKey, selectKey } from "./src/token.js";
|
||||
|
||||
//#region ../../packages/components/select/index.d.ts
|
||||
declare const ElSelect: SFCWithInstall<typeof _default> & {
|
||||
Option: typeof _default$1;
|
||||
OptionGroup: typeof _default$2;
|
||||
};
|
||||
declare const ElOption: SFCWithInstall<typeof _default$1>;
|
||||
declare const ElOptionGroup: SFCWithInstall<typeof _default$2>;
|
||||
//#endregion
|
||||
export { ElOption, ElOptionGroup, ElSelect, ElSelect as default, type OptionBasic, type SelectContext, SelectEmits, SelectInstance, SelectOptionProps, type OptionPublicInstance as SelectOptionProxy, SelectProps, SelectPropsPublic, TagTooltipProps, selectEmits, selectGroupKey, selectKey, selectProps };
|
||||
17
frontend/node_modules/element-plus/es/components/select/index.mjs
generated
vendored
Normal file
17
frontend/node_modules/element-plus/es/components/select/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { withInstall, withNoopInstall } from "../../utils/vue/install.mjs";
|
||||
import { selectGroupKey, selectKey } from "./src/token.mjs";
|
||||
import option_default from "./src/option2.mjs";
|
||||
import { selectEmits, selectProps } from "./src/select.mjs";
|
||||
import option_group_default from "./src/option-group.mjs";
|
||||
import select_default from "./src/select2.mjs";
|
||||
//#region ../../packages/components/select/index.ts
|
||||
const ElSelect = withInstall(select_default, {
|
||||
Option: option_default,
|
||||
OptionGroup: option_group_default
|
||||
});
|
||||
const ElOption = withNoopInstall(option_default);
|
||||
const ElOptionGroup = withNoopInstall(option_group_default);
|
||||
//#endregion
|
||||
export { ElOption, ElOptionGroup, ElSelect, ElSelect as default, selectEmits, selectGroupKey, selectKey, selectProps };
|
||||
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","names":["Select","Option","OptionGroup"],"sources":["../../../../../packages/components/select/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Select from './src/select.vue'\nimport Option from './src/option.vue'\nimport OptionGroup from './src/option-group.vue'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElSelect: SFCWithInstall<typeof Select> & {\n Option: typeof Option\n OptionGroup: typeof OptionGroup\n} = withInstall(Select, {\n Option,\n OptionGroup,\n})\nexport default ElSelect\nexport const ElOption: SFCWithInstall<typeof Option> = withNoopInstall(Option)\nexport const ElOptionGroup: SFCWithInstall<typeof OptionGroup> =\n withNoopInstall(OptionGroup)\n\nexport * from './src/token'\nexport * from './src/select'\n\nexport type {\n SelectContext,\n OptionPublicInstance as SelectOptionProxy,\n OptionBasic,\n} from './src/type'\n"],"mappings":";;;;;;;AAOA,MAAa,WAGT,YAAYA,gBAAQ;CACtB,QAAA;CACA,aAAA;CACD,CAAC;AAEF,MAAa,WAA0C,gBAAgBC,eAAO;AAC9E,MAAa,gBACX,gBAAgBC,qBAAY"}
|
||||
15
frontend/node_modules/element-plus/es/components/select/src/option-group.mjs
generated
vendored
Normal file
15
frontend/node_modules/element-plus/es/components/select/src/option-group.mjs
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
||||
import option_group_vue_vue_type_script_lang_default from "./option-group.vue_vue_type_script_lang.mjs";
|
||||
import { createElementBlock, createElementVNode, normalizeClass, openBlock, renderSlot, toDisplayString, vShow, withDirectives } from "vue";
|
||||
//#region ../../packages/components/select/src/option-group.vue
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return withDirectives((openBlock(), createElementBlock("ul", {
|
||||
ref: "groupRef",
|
||||
class: normalizeClass(_ctx.ns.be("group", "wrap"))
|
||||
}, [createElementVNode("li", { class: normalizeClass(_ctx.ns.be("group", "title")) }, toDisplayString(_ctx.label), 3), createElementVNode("li", null, [createElementVNode("ul", { class: normalizeClass(_ctx.ns.b("group")) }, [renderSlot(_ctx.$slots, "default")], 2)])], 2)), [[vShow, _ctx.visible]]);
|
||||
}
|
||||
var option_group_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_group_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
||||
//#endregion
|
||||
export { option_group_default as default };
|
||||
|
||||
//# sourceMappingURL=option-group.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/option-group.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/option-group.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"option-group.mjs","names":[],"sources":["../../../../../../packages/components/select/src/option-group.vue"],"sourcesContent":["<template>\n <ul v-show=\"visible\" ref=\"groupRef\" :class=\"ns.be('group', 'wrap')\">\n <li :class=\"ns.be('group', 'title')\">{{ label }}</li>\n <li>\n <ul :class=\"ns.b('group')\">\n <slot />\n </ul>\n </li>\n </ul>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n isVNode,\n onMounted,\n provide,\n reactive,\n ref,\n toRefs,\n} from 'vue'\nimport { useMutationObserver } from '@vueuse/core'\nimport { ensureArray, isArray } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { selectGroupKey } from './token'\n\nimport type { Component, VNode, VNodeArrayChildren } from 'vue'\nimport type { OptionInternalInstance, OptionPublicInstance } from './type'\n\nexport default defineComponent({\n name: 'ElOptionGroup',\n componentName: 'ElOptionGroup',\n\n props: {\n /**\n * @description name of the group\n */\n label: String,\n /**\n * @description whether to disable all options in this group\n */\n disabled: Boolean,\n },\n setup(props) {\n const ns = useNamespace('select')\n const groupRef = ref<HTMLElement>()\n const instance = getCurrentInstance()!\n const children = ref<OptionPublicInstance[]>([])\n\n provide(\n selectGroupKey,\n reactive({\n ...toRefs(props),\n })\n )\n\n const visible = computed(() =>\n children.value.some((option) => option.visible === true)\n )\n\n const isOption = (\n node: VNode\n ): node is VNode & { component: OptionInternalInstance } =>\n (node.type as Component).name === 'ElOption' && !!node.component?.proxy\n\n // get all instances of options\n const flattedChildren = (node: VNode | VNodeArrayChildren) => {\n const nodes = ensureArray(node) as VNode[] | VNodeArrayChildren\n const children: OptionPublicInstance[] = []\n\n nodes.forEach((child) => {\n if (!isVNode(child)) return\n\n if (isOption(child)) {\n children.push(child.component.proxy)\n } else if (isArray(child.children) && child.children.length) {\n children.push(...flattedChildren(child.children))\n } else if (child.component?.subTree) {\n children.push(...flattedChildren(child.component.subTree))\n }\n })\n\n return children\n }\n\n const updateChildren = () => {\n children.value = flattedChildren(instance.subTree)\n }\n\n onMounted(() => {\n updateChildren()\n })\n\n useMutationObserver(groupRef, updateChildren, {\n attributes: true,\n subtree: true,\n childList: true,\n })\n\n return {\n groupRef,\n visible,\n ns,\n }\n },\n})\n</script>\n"],"mappings":";;;;;qCACE,mBAOK,MAAA;EAPgB,KAAI;EAAY,OAAK,eAAE,KAAA,GAAG,GAAE,SAAA,OAAA,CAAA;KAC/C,mBAAqD,MAAA,EAAhD,OAAK,eAAE,KAAA,GAAG,GAAE,SAAA,QAAA,CAAA,EAAA,EAAA,gBAAuB,KAAA,MAAK,EAAA,EAAA,EAC7C,mBAIK,MAAA,MAAA,CAHH,mBAEK,MAAA,EAFA,OAAK,eAAE,KAAA,GAAG,EAAC,QAAA,CAAA,EAAA,EAAA,CACd,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,EAAA,GAAA,CAAA,CAAA,OAJF,KAAA,QAAO,CAAA,CAAA"}
|
||||
48
frontend/node_modules/element-plus/es/components/select/src/option-group.vue.d.ts
generated
vendored
Normal file
48
frontend/node_modules/element-plus/es/components/select/src/option-group.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/select/src/option-group.vue.d.ts
|
||||
declare const _default: typeof __VLS_export;
|
||||
declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
||||
/**
|
||||
* @description name of the group
|
||||
*/
|
||||
label: StringConstructor;
|
||||
/**
|
||||
* @description whether to disable all options in this group
|
||||
*/
|
||||
disabled: BooleanConstructor;
|
||||
}>, {
|
||||
groupRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
visible: _$vue.ComputedRef<boolean>;
|
||||
ns: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
||||
/**
|
||||
* @description name of the group
|
||||
*/
|
||||
label: StringConstructor;
|
||||
/**
|
||||
* @description whether to disable all options in this group
|
||||
*/
|
||||
disabled: BooleanConstructor;
|
||||
}>> & Readonly<{}>, {
|
||||
disabled: boolean;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
61
frontend/node_modules/element-plus/es/components/select/src/option-group.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
61
frontend/node_modules/element-plus/es/components/select/src/option-group.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
import { isArray } from "../../../utils/types.mjs";
|
||||
import { ensureArray } from "../../../utils/arrays.mjs";
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { selectGroupKey } from "./token.mjs";
|
||||
import { useMutationObserver } from "@vueuse/core";
|
||||
import { computed, defineComponent, getCurrentInstance, isVNode, onMounted, provide, reactive, ref, toRefs } from "vue";
|
||||
//#region ../../packages/components/select/src/option-group.vue?vue&type=script&lang.ts
|
||||
var option_group_vue_vue_type_script_lang_default = defineComponent({
|
||||
name: "ElOptionGroup",
|
||||
componentName: "ElOptionGroup",
|
||||
props: {
|
||||
/**
|
||||
* @description name of the group
|
||||
*/
|
||||
label: String,
|
||||
/**
|
||||
* @description whether to disable all options in this group
|
||||
*/
|
||||
disabled: Boolean
|
||||
},
|
||||
setup(props) {
|
||||
const ns = useNamespace("select");
|
||||
const groupRef = ref();
|
||||
const instance = getCurrentInstance();
|
||||
const children = ref([]);
|
||||
provide(selectGroupKey, reactive({ ...toRefs(props) }));
|
||||
const visible = computed(() => children.value.some((option) => option.visible === true));
|
||||
const isOption = (node) => node.type.name === "ElOption" && !!node.component?.proxy;
|
||||
const flattedChildren = (node) => {
|
||||
const nodes = ensureArray(node);
|
||||
const children = [];
|
||||
nodes.forEach((child) => {
|
||||
if (!isVNode(child)) return;
|
||||
if (isOption(child)) children.push(child.component.proxy);
|
||||
else if (isArray(child.children) && child.children.length) children.push(...flattedChildren(child.children));
|
||||
else if (child.component?.subTree) children.push(...flattedChildren(child.component.subTree));
|
||||
});
|
||||
return children;
|
||||
};
|
||||
const updateChildren = () => {
|
||||
children.value = flattedChildren(instance.subTree);
|
||||
};
|
||||
onMounted(() => {
|
||||
updateChildren();
|
||||
});
|
||||
useMutationObserver(groupRef, updateChildren, {
|
||||
attributes: true,
|
||||
subtree: true,
|
||||
childList: true
|
||||
});
|
||||
return {
|
||||
groupRef,
|
||||
visible,
|
||||
ns
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { option_group_vue_vue_type_script_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=option-group.vue_vue_type_script_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/option-group.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/option-group.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"option-group.vue_vue_type_script_lang.mjs","names":[],"sources":["../../../../../../packages/components/select/src/option-group.vue"],"sourcesContent":["<template>\n <ul v-show=\"visible\" ref=\"groupRef\" :class=\"ns.be('group', 'wrap')\">\n <li :class=\"ns.be('group', 'title')\">{{ label }}</li>\n <li>\n <ul :class=\"ns.b('group')\">\n <slot />\n </ul>\n </li>\n </ul>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n isVNode,\n onMounted,\n provide,\n reactive,\n ref,\n toRefs,\n} from 'vue'\nimport { useMutationObserver } from '@vueuse/core'\nimport { ensureArray, isArray } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { selectGroupKey } from './token'\n\nimport type { Component, VNode, VNodeArrayChildren } from 'vue'\nimport type { OptionInternalInstance, OptionPublicInstance } from './type'\n\nexport default defineComponent({\n name: 'ElOptionGroup',\n componentName: 'ElOptionGroup',\n\n props: {\n /**\n * @description name of the group\n */\n label: String,\n /**\n * @description whether to disable all options in this group\n */\n disabled: Boolean,\n },\n setup(props) {\n const ns = useNamespace('select')\n const groupRef = ref<HTMLElement>()\n const instance = getCurrentInstance()!\n const children = ref<OptionPublicInstance[]>([])\n\n provide(\n selectGroupKey,\n reactive({\n ...toRefs(props),\n })\n )\n\n const visible = computed(() =>\n children.value.some((option) => option.visible === true)\n )\n\n const isOption = (\n node: VNode\n ): node is VNode & { component: OptionInternalInstance } =>\n (node.type as Component).name === 'ElOption' && !!node.component?.proxy\n\n // get all instances of options\n const flattedChildren = (node: VNode | VNodeArrayChildren) => {\n const nodes = ensureArray(node) as VNode[] | VNodeArrayChildren\n const children: OptionPublicInstance[] = []\n\n nodes.forEach((child) => {\n if (!isVNode(child)) return\n\n if (isOption(child)) {\n children.push(child.component.proxy)\n } else if (isArray(child.children) && child.children.length) {\n children.push(...flattedChildren(child.children))\n } else if (child.component?.subTree) {\n children.push(...flattedChildren(child.component.subTree))\n }\n })\n\n return children\n }\n\n const updateChildren = () => {\n children.value = flattedChildren(instance.subTree)\n }\n\n onMounted(() => {\n updateChildren()\n })\n\n useMutationObserver(groupRef, updateChildren, {\n attributes: true,\n subtree: true,\n childList: true,\n })\n\n return {\n groupRef,\n visible,\n ns,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;AA+BA,IAAA,gDAAe,gBAAgB;CAC7B,MAAM;CACN,eAAe;CAEf,OAAO;;;;EAIL,OAAO;;;;EAIP,UAAU;EACX;CACD,MAAM,OAAO;EACX,MAAM,KAAK,aAAa,SAAQ;EAChC,MAAM,WAAW,KAAiB;EAClC,MAAM,WAAW,oBAAoB;EACrC,MAAM,WAAW,IAA4B,EAAE,CAAA;EAE/C,QACE,gBACA,SAAS,EACP,GAAG,OAAO,MAAM,EACjB,CAAA,CACH;EAEA,MAAM,UAAU,eACd,SAAS,MAAM,MAAM,WAAW,OAAO,YAAY,KAAI,CACzD;EAEA,MAAM,YACJ,SAEC,KAAK,KAAmB,SAAS,cAAc,CAAC,CAAC,KAAK,WAAW;EAGpE,MAAM,mBAAmB,SAAqC;GAC5D,MAAM,QAAQ,YAAY,KAAI;GAC9B,MAAM,WAAmC,EAAC;GAE1C,MAAM,SAAS,UAAU;IACvB,IAAI,CAAC,QAAQ,MAAM,EAAE;IAErB,IAAI,SAAS,MAAM,EACjB,SAAS,KAAK,MAAM,UAAU,MAAK;SAC9B,IAAI,QAAQ,MAAM,SAAQ,IAAK,MAAM,SAAS,QACnD,SAAS,KAAK,GAAG,gBAAgB,MAAM,SAAS,CAAA;SAC3C,IAAI,MAAM,WAAW,SAC1B,SAAS,KAAK,GAAG,gBAAgB,MAAM,UAAU,QAAQ,CAAA;KAE5D;GAED,OAAO;;EAGT,MAAM,uBAAuB;GAC3B,SAAS,QAAQ,gBAAgB,SAAS,QAAO;;EAGnD,gBAAgB;GACd,gBAAe;IAChB;EAED,oBAAoB,UAAU,gBAAgB;GAC5C,YAAY;GACZ,SAAS;GACT,WAAW;GACZ,CAAA;EAED,OAAO;GACL;GACA;GACA;GACF;;CAEH,CAAA"}
|
||||
23
frontend/node_modules/element-plus/es/components/select/src/option.d.ts
generated
vendored
Normal file
23
frontend/node_modules/element-plus/es/components/select/src/option.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/select/src/option.d.ts
|
||||
declare const COMPONENT_NAME = "ElOption";
|
||||
declare const optionProps: {
|
||||
value: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: true;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
label: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
created: BooleanConstructor;
|
||||
disabled: BooleanConstructor;
|
||||
};
|
||||
//#endregion
|
||||
export { COMPONENT_NAME, optionProps };
|
||||
30
frontend/node_modules/element-plus/es/components/select/src/option.mjs
generated
vendored
Normal file
30
frontend/node_modules/element-plus/es/components/select/src/option.mjs
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import { buildProps } from "../../../utils/vue/props/runtime.mjs";
|
||||
//#region ../../packages/components/select/src/option.ts
|
||||
const COMPONENT_NAME = "ElOption";
|
||||
const optionProps = buildProps({
|
||||
/**
|
||||
* @description value of option
|
||||
*/
|
||||
value: {
|
||||
type: [
|
||||
String,
|
||||
Number,
|
||||
Boolean,
|
||||
Object
|
||||
],
|
||||
required: true
|
||||
},
|
||||
/**
|
||||
* @description label of option, same as `value` if omitted
|
||||
*/
|
||||
label: { type: [String, Number] },
|
||||
created: Boolean,
|
||||
/**
|
||||
* @description whether option is disabled
|
||||
*/
|
||||
disabled: Boolean
|
||||
});
|
||||
//#endregion
|
||||
export { COMPONENT_NAME, optionProps };
|
||||
|
||||
//# sourceMappingURL=option.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/option.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/option.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"option.mjs","names":[],"sources":["../../../../../../packages/components/select/src/option.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nexport const COMPONENT_NAME = 'ElOption'\nexport const optionProps = buildProps({\n /**\n * @description value of option\n */\n value: {\n type: [String, Number, Boolean, Object],\n required: true as const,\n },\n /**\n * @description label of option, same as `value` if omitted\n */\n label: {\n type: [String, Number],\n },\n created: Boolean,\n /**\n * @description whether option is disabled\n */\n disabled: Boolean,\n})\n"],"mappings":";;AAEA,MAAa,iBAAiB;AAC9B,MAAa,cAAc,WAAW;;;;CAIpC,OAAO;EACL,MAAM;GAAC;GAAQ;GAAQ;GAAS;GAAO;EACvC,UAAU;EACX;;;;CAID,OAAO,EACL,MAAM,CAAC,QAAQ,OAAO,EACvB;CACD,SAAS;;;;CAIT,UAAU;CACX,CAAC"}
|
||||
79
frontend/node_modules/element-plus/es/components/select/src/option.vue.d.ts
generated
vendored
Normal file
79
frontend/node_modules/element-plus/es/components/select/src/option.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import { EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { SelectContext } from "./type.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/select/src/option.vue.d.ts
|
||||
declare const _default: typeof __VLS_export;
|
||||
declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
||||
value: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: true;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
label: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
created: BooleanConstructor;
|
||||
disabled: BooleanConstructor;
|
||||
}>, {
|
||||
ns: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
id: _$vue.Ref<string, string>;
|
||||
containerKls: _$vue.ComputedRef<string[]>;
|
||||
currentLabel: _$vue.ComputedRef<boolean | EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
itemSelected: _$vue.ComputedRef<boolean>;
|
||||
isDisabled: _$vue.ComputedRef<boolean>;
|
||||
select: SelectContext;
|
||||
visible: _$vue.Ref<boolean, boolean>;
|
||||
hover: _$vue.Ref<boolean, boolean>;
|
||||
states: {
|
||||
index: number;
|
||||
groupDisabled: boolean;
|
||||
visible: boolean;
|
||||
hover: boolean;
|
||||
};
|
||||
hoverItem: () => void;
|
||||
handleMousedown: (event: MouseEvent) => void;
|
||||
updateOption: (query: string) => void;
|
||||
selectOptionClick: () => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
||||
value: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: true;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
label: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
created: BooleanConstructor;
|
||||
disabled: BooleanConstructor;
|
||||
}>> & Readonly<{}>, {
|
||||
disabled: boolean;
|
||||
created: boolean;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
75
frontend/node_modules/element-plus/es/components/select/src/option.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
75
frontend/node_modules/element-plus/es/components/select/src/option.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
import { isFocusable } from "../../../utils/dom/aria.mjs";
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { useId } from "../../../hooks/use-id/index.mjs";
|
||||
import { COMPONENT_NAME, optionProps } from "./option.mjs";
|
||||
import { useOption } from "./useOption.mjs";
|
||||
import { computed, defineComponent, getCurrentInstance, nextTick, onBeforeUnmount, reactive, toRefs, unref } from "vue";
|
||||
//#region ../../packages/components/select/src/option.vue?vue&type=script&lang.ts
|
||||
var option_vue_vue_type_script_lang_default = defineComponent({
|
||||
name: COMPONENT_NAME,
|
||||
componentName: COMPONENT_NAME,
|
||||
props: optionProps,
|
||||
setup(props) {
|
||||
const ns = useNamespace("select");
|
||||
const id = useId();
|
||||
const containerKls = computed(() => [
|
||||
ns.be("dropdown", "item"),
|
||||
ns.is("disabled", unref(isDisabled)),
|
||||
ns.is("selected", unref(itemSelected)),
|
||||
ns.is("hovering", unref(hover))
|
||||
]);
|
||||
const states = reactive({
|
||||
index: -1,
|
||||
groupDisabled: false,
|
||||
visible: true,
|
||||
hover: false
|
||||
});
|
||||
const { currentLabel, itemSelected, isDisabled, select, hoverItem, updateOption } = useOption(props, states);
|
||||
const { visible, hover } = toRefs(states);
|
||||
const vm = getCurrentInstance().proxy;
|
||||
select.onOptionCreate(vm);
|
||||
onBeforeUnmount(() => {
|
||||
const key = vm.value;
|
||||
nextTick(() => {
|
||||
const { selected: selectedOptions } = select.states;
|
||||
const doesSelected = selectedOptions.some((item) => {
|
||||
return item.value === vm.value;
|
||||
});
|
||||
if (select.states.cachedOptions.get(key) === vm && !doesSelected) select.states.cachedOptions.delete(key);
|
||||
});
|
||||
select.onOptionDestroy(key, vm);
|
||||
});
|
||||
function selectOptionClick() {
|
||||
if (!isDisabled.value) select.handleOptionSelect(vm);
|
||||
}
|
||||
const handleMousedown = (event) => {
|
||||
let target = event.target;
|
||||
const currentTarget = event.currentTarget;
|
||||
while (target && target !== currentTarget) {
|
||||
if (isFocusable(target)) return;
|
||||
target = target.parentElement;
|
||||
}
|
||||
event.preventDefault();
|
||||
};
|
||||
return {
|
||||
ns,
|
||||
id,
|
||||
containerKls,
|
||||
currentLabel,
|
||||
itemSelected,
|
||||
isDisabled,
|
||||
select,
|
||||
visible,
|
||||
hover,
|
||||
states,
|
||||
hoverItem,
|
||||
handleMousedown,
|
||||
updateOption,
|
||||
selectOptionClick
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { option_vue_vue_type_script_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=option.vue_vue_type_script_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/option.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/option.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"option.vue_vue_type_script_lang.mjs","names":[],"sources":["../../../../../../packages/components/select/src/option.vue"],"sourcesContent":["<template>\n <li\n v-show=\"visible\"\n :id=\"id\"\n :class=\"containerKls\"\n role=\"option\"\n :aria-disabled=\"isDisabled || undefined\"\n :aria-selected=\"itemSelected\"\n @mousemove=\"hoverItem\"\n @mousedown=\"handleMousedown\"\n @click.stop=\"selectOptionClick\"\n >\n <slot>\n <span>{{ currentLabel }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n nextTick,\n onBeforeUnmount,\n reactive,\n toRefs,\n unref,\n} from 'vue'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { COMPONENT_NAME, optionProps } from './option'\nimport { isFocusable } from '@element-plus/utils'\n\nimport type {\n OptionExposed,\n OptionInternalInstance,\n OptionStates,\n} from './type'\n\nexport default defineComponent({\n name: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n\n props: optionProps,\n\n setup(props) {\n const ns = useNamespace('select')\n const id = useId()\n\n const containerKls = computed(() => [\n ns.be('dropdown', 'item'),\n ns.is('disabled', unref(isDisabled)),\n ns.is('selected', unref(itemSelected)),\n ns.is('hovering', unref(hover)),\n ])\n\n const states = reactive<OptionStates>({\n index: -1,\n groupDisabled: false,\n visible: true,\n hover: false,\n })\n\n const {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n } = useOption(props, states)\n\n const { visible, hover } = toRefs(states)\n\n const vm = (getCurrentInstance()! as OptionInternalInstance).proxy\n\n select.onOptionCreate(vm)\n\n onBeforeUnmount(() => {\n const key = vm.value\n\n // if option is not selected, remove it from cache\n nextTick(() => {\n const { selected: selectedOptions } = select.states\n const doesSelected = selectedOptions.some((item) => {\n return item.value === vm.value\n })\n if (select.states.cachedOptions.get(key) === vm && !doesSelected) {\n select.states.cachedOptions.delete(key)\n }\n })\n select.onOptionDestroy(key, vm)\n })\n\n function selectOptionClick() {\n if (!isDisabled.value) {\n select.handleOptionSelect(vm)\n }\n }\n\n const handleMousedown = (event: MouseEvent) => {\n let target = event.target as HTMLElement | null\n const currentTarget = event.currentTarget as HTMLElement\n\n while (target && target !== currentTarget) {\n if (isFocusable(target)) {\n return\n }\n target = target.parentElement\n }\n\n event.preventDefault()\n }\n\n return {\n ns,\n id,\n containerKls,\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n visible,\n hover,\n states,\n\n hoverItem,\n handleMousedown,\n updateOption,\n selectOptionClick,\n } satisfies OptionExposed\n },\n})\n</script>\n"],"mappings":";;;;;;;AAwCA,IAAA,0CAAe,gBAAgB;CAC7B,MAAM;CACN,eAAe;CAEf,OAAO;CAEP,MAAM,OAAO;EACX,MAAM,KAAK,aAAa,SAAQ;EAChC,MAAM,KAAK,OAAM;EAEjB,MAAM,eAAe,eAAe;GAClC,GAAG,GAAG,YAAY,OAAO;GACzB,GAAG,GAAG,YAAY,MAAM,WAAW,CAAC;GACpC,GAAG,GAAG,YAAY,MAAM,aAAa,CAAC;GACtC,GAAG,GAAG,YAAY,MAAM,MAAM,CAAC;GAChC,CAAA;EAED,MAAM,SAAS,SAAuB;GACpC,OAAO;GACP,eAAe;GACf,SAAS;GACT,OAAO;GACR,CAAA;EAED,MAAM,EACJ,cACA,cACA,YACA,QACA,WACA,iBACE,UAAU,OAAO,OAAM;EAE3B,MAAM,EAAE,SAAS,UAAU,OAAO,OAAM;EAExC,MAAM,KAAM,oBAAoB,CAA6B;EAE7D,OAAO,eAAe,GAAE;EAExB,sBAAsB;GACpB,MAAM,MAAM,GAAG;GAGf,eAAe;IACb,MAAM,EAAE,UAAU,oBAAoB,OAAO;IAC7C,MAAM,eAAe,gBAAgB,MAAM,SAAS;KAClD,OAAO,KAAK,UAAU,GAAG;MAC1B;IACD,IAAI,OAAO,OAAO,cAAc,IAAI,IAAG,KAAM,MAAM,CAAC,cAClD,OAAO,OAAO,cAAc,OAAO,IAAG;KAEzC;GACD,OAAO,gBAAgB,KAAK,GAAE;IAC/B;EAED,SAAS,oBAAoB;GAC3B,IAAI,CAAC,WAAW,OACd,OAAO,mBAAmB,GAAE;;EAIhC,MAAM,mBAAmB,UAAsB;GAC7C,IAAI,SAAS,MAAM;GACnB,MAAM,gBAAgB,MAAM;GAE5B,OAAO,UAAU,WAAW,eAAe;IACzC,IAAI,YAAY,OAAO,EACrB;IAEF,SAAS,OAAO;;GAGlB,MAAM,gBAAe;;EAGvB,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAEA;GACA;GACA;GACA;GACF;;CAEH,CAAA"}
|
||||
26
frontend/node_modules/element-plus/es/components/select/src/option2.mjs
generated
vendored
Normal file
26
frontend/node_modules/element-plus/es/components/select/src/option2.mjs
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
||||
import option_vue_vue_type_script_lang_default from "./option.vue_vue_type_script_lang.mjs";
|
||||
import { createElementBlock, createElementVNode, normalizeClass, openBlock, renderSlot, toDisplayString, vShow, withDirectives, withModifiers } from "vue";
|
||||
//#region ../../packages/components/select/src/option.vue
|
||||
const _hoisted_1 = [
|
||||
"id",
|
||||
"aria-disabled",
|
||||
"aria-selected"
|
||||
];
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return withDirectives((openBlock(), createElementBlock("li", {
|
||||
id: _ctx.id,
|
||||
class: normalizeClass(_ctx.containerKls),
|
||||
role: "option",
|
||||
"aria-disabled": _ctx.isDisabled || void 0,
|
||||
"aria-selected": _ctx.itemSelected,
|
||||
onMousemove: _cache[0] || (_cache[0] = (...args) => _ctx.hoverItem && _ctx.hoverItem(...args)),
|
||||
onMousedown: _cache[1] || (_cache[1] = (...args) => _ctx.handleMousedown && _ctx.handleMousedown(...args)),
|
||||
onClick: _cache[2] || (_cache[2] = withModifiers((...args) => _ctx.selectOptionClick && _ctx.selectOptionClick(...args), ["stop"]))
|
||||
}, [renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("span", null, toDisplayString(_ctx.currentLabel), 1)])], 42, _hoisted_1)), [[vShow, _ctx.visible]]);
|
||||
}
|
||||
var option_default = /* @__PURE__ */ _plugin_vue_export_helper_default(option_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
||||
//#endregion
|
||||
export { option_default as default };
|
||||
|
||||
//# sourceMappingURL=option2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/option2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/option2.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"option2.mjs","names":[],"sources":["../../../../../../packages/components/select/src/option.vue"],"sourcesContent":["<template>\n <li\n v-show=\"visible\"\n :id=\"id\"\n :class=\"containerKls\"\n role=\"option\"\n :aria-disabled=\"isDisabled || undefined\"\n :aria-selected=\"itemSelected\"\n @mousemove=\"hoverItem\"\n @mousedown=\"handleMousedown\"\n @click.stop=\"selectOptionClick\"\n >\n <slot>\n <span>{{ currentLabel }}</span>\n </slot>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n nextTick,\n onBeforeUnmount,\n reactive,\n toRefs,\n unref,\n} from 'vue'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { useOption } from './useOption'\nimport { COMPONENT_NAME, optionProps } from './option'\nimport { isFocusable } from '@element-plus/utils'\n\nimport type {\n OptionExposed,\n OptionInternalInstance,\n OptionStates,\n} from './type'\n\nexport default defineComponent({\n name: COMPONENT_NAME,\n componentName: COMPONENT_NAME,\n\n props: optionProps,\n\n setup(props) {\n const ns = useNamespace('select')\n const id = useId()\n\n const containerKls = computed(() => [\n ns.be('dropdown', 'item'),\n ns.is('disabled', unref(isDisabled)),\n ns.is('selected', unref(itemSelected)),\n ns.is('hovering', unref(hover)),\n ])\n\n const states = reactive<OptionStates>({\n index: -1,\n groupDisabled: false,\n visible: true,\n hover: false,\n })\n\n const {\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n hoverItem,\n updateOption,\n } = useOption(props, states)\n\n const { visible, hover } = toRefs(states)\n\n const vm = (getCurrentInstance()! as OptionInternalInstance).proxy\n\n select.onOptionCreate(vm)\n\n onBeforeUnmount(() => {\n const key = vm.value\n\n // if option is not selected, remove it from cache\n nextTick(() => {\n const { selected: selectedOptions } = select.states\n const doesSelected = selectedOptions.some((item) => {\n return item.value === vm.value\n })\n if (select.states.cachedOptions.get(key) === vm && !doesSelected) {\n select.states.cachedOptions.delete(key)\n }\n })\n select.onOptionDestroy(key, vm)\n })\n\n function selectOptionClick() {\n if (!isDisabled.value) {\n select.handleOptionSelect(vm)\n }\n }\n\n const handleMousedown = (event: MouseEvent) => {\n let target = event.target as HTMLElement | null\n const currentTarget = event.currentTarget as HTMLElement\n\n while (target && target !== currentTarget) {\n if (isFocusable(target)) {\n return\n }\n target = target.parentElement\n }\n\n event.preventDefault()\n }\n\n return {\n ns,\n id,\n containerKls,\n currentLabel,\n itemSelected,\n isDisabled,\n select,\n visible,\n hover,\n states,\n\n hoverItem,\n handleMousedown,\n updateOption,\n selectOptionClick,\n } satisfies OptionExposed\n },\n})\n</script>\n"],"mappings":";;;;;;;;;;qCACE,mBAcK,MAAA;EAZF,IAAI,KAAA;EACJ,OAAK,eAAE,KAAA,aAAY;EACpB,MAAK;EACJ,iBAAe,KAAA,cAAc,KAAA;EAC7B,iBAAe,KAAA;EACf,aAAS,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,KAAA,aAAA,KAAA,UAAA,GAAA,KAAS;EACpB,aAAS,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,KAAA,mBAAA,KAAA,gBAAA,GAAA,KAAe;EAC1B,SAAK,OAAA,OAAA,OAAA,KAAA,eAAA,GAAA,SAAO,KAAA,qBAAA,KAAA,kBAAA,GAAA,KAAiB,EAAA,CAAA,OAAA,CAAA;KAE9B,WAEO,KAAA,QAAA,WAAA,EAAA,QAAA,CADL,mBAA+B,QAAA,MAAA,gBAAtB,KAAA,aAAY,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,WAAA,GAAA,CAAA,CAAA,OAXf,KAAA,QAAO,CAAA,CAAA"}
|
||||
9
frontend/node_modules/element-plus/es/components/select/src/options.d.ts
generated
vendored
Normal file
9
frontend/node_modules/element-plus/es/components/select/src/options.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import * as _$vue from "vue";
|
||||
import { VNode } from "vue";
|
||||
|
||||
//#region ../../packages/components/select/src/options.d.ts
|
||||
declare const _default: _$vue.DefineComponent<{}, () => VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[], {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
35
frontend/node_modules/element-plus/es/components/select/src/options.mjs
generated
vendored
Normal file
35
frontend/node_modules/element-plus/es/components/select/src/options.mjs
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import { isArray, isFunction, isString } from "../../../utils/types.mjs";
|
||||
import { selectKey } from "./token.mjs";
|
||||
import { isEqual } from "lodash-unified";
|
||||
import { defineComponent, inject } from "vue";
|
||||
//#region ../../packages/components/select/src/options.ts
|
||||
var options_default = defineComponent({
|
||||
name: "ElOptions",
|
||||
setup(_, { slots }) {
|
||||
const select = inject(selectKey);
|
||||
let cachedValueList = [];
|
||||
return () => {
|
||||
const children = slots.default?.();
|
||||
const valueList = [];
|
||||
function filterOptions(children) {
|
||||
if (!isArray(children)) return;
|
||||
children.forEach((item) => {
|
||||
const name = (item?.type || {})?.name;
|
||||
if (name === "ElOptionGroup") filterOptions(!isString(item.children) && !isArray(item.children) && isFunction(item.children?.default) ? item.children?.default() : item.children);
|
||||
else if (name === "ElOption") valueList.push(item.props?.value);
|
||||
else if (isArray(item.children)) filterOptions(item.children);
|
||||
});
|
||||
}
|
||||
if (children.length) filterOptions(children[0]?.children);
|
||||
if (!isEqual(valueList, cachedValueList)) {
|
||||
cachedValueList = valueList;
|
||||
if (select) select.states.optionValues = valueList;
|
||||
}
|
||||
return children;
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { options_default as default };
|
||||
|
||||
//# sourceMappingURL=options.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/options.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/options.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"options.mjs","names":[],"sources":["../../../../../../packages/components/select/src/options.ts"],"sourcesContent":["import { defineComponent, inject } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { isArray, isFunction, isString } from '@element-plus/utils'\nimport { selectKey } from './token'\n\nimport type { Component, VNode, VNodeNormalizedChildren } from 'vue'\nimport type { OptionValue } from './type'\n\nexport default defineComponent({\n name: 'ElOptions',\n setup(_, { slots }) {\n const select = inject(selectKey)\n let cachedValueList: OptionValue[] = []\n\n return () => {\n const children = slots.default?.()!\n const valueList: OptionValue[] = []\n\n function filterOptions(children?: VNodeNormalizedChildren) {\n if (!isArray(children)) return\n ;(children as VNode[]).forEach((item) => {\n const name = ((item?.type || {}) as Component)?.name\n\n if (name === 'ElOptionGroup') {\n filterOptions(\n !isString(item.children) &&\n !isArray(item.children) &&\n isFunction(item.children?.default)\n ? item.children?.default()\n : item.children\n )\n } else if (name === 'ElOption') {\n valueList.push(item.props?.value)\n } else if (isArray(item.children)) {\n filterOptions(item.children)\n }\n })\n }\n\n if (children.length) {\n filterOptions(children[0]?.children)\n }\n\n if (!isEqual(valueList, cachedValueList)) {\n cachedValueList = valueList\n if (select) {\n select.states.optionValues = valueList\n }\n }\n\n return children\n }\n },\n})\n"],"mappings":";;;;;AAQA,IAAA,kBAAe,gBAAgB;CAC7B,MAAM;CACN,MAAM,GAAG,EAAE,SAAS;EAClB,MAAM,SAAS,OAAO,UAAU;EAChC,IAAI,kBAAiC,EAAE;EAEvC,aAAa;GACX,MAAM,WAAW,MAAM,WAAW;GAClC,MAAM,YAA2B,EAAE;GAEnC,SAAS,cAAc,UAAoC;IACzD,IAAI,CAAC,QAAQ,SAAS,EAAE;IACvB,SAAsB,SAAS,SAAS;KACvC,MAAM,QAAS,MAAM,QAAQ,EAAE,GAAiB;KAEhD,IAAI,SAAS,iBACX,cACE,CAAC,SAAS,KAAK,SAAS,IACtB,CAAC,QAAQ,KAAK,SAAS,IACvB,WAAW,KAAK,UAAU,QAAQ,GAChC,KAAK,UAAU,SAAS,GACxB,KAAK,SACV;UACI,IAAI,SAAS,YAClB,UAAU,KAAK,KAAK,OAAO,MAAM;UAC5B,IAAI,QAAQ,KAAK,SAAS,EAC/B,cAAc,KAAK,SAAS;MAE9B;;GAGJ,IAAI,SAAS,QACX,cAAc,SAAS,IAAI,SAAS;GAGtC,IAAI,CAAC,QAAQ,WAAW,gBAAgB,EAAE;IACxC,kBAAkB;IAClB,IAAI,QACF,OAAO,OAAO,eAAe;;GAIjC,OAAO;;;CAGZ,CAAC"}
|
||||
29
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.mjs
generated
vendored
Normal file
29
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.mjs
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
||||
import select_dropdown_vue_vue_type_script_lang_default from "./select-dropdown.vue_vue_type_script_lang.mjs";
|
||||
import { createCommentVNode, createElementBlock, normalizeClass, normalizeStyle, openBlock, renderSlot } from "vue";
|
||||
//#region ../../packages/components/select/src/select-dropdown.vue
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
class: normalizeClass([
|
||||
_ctx.ns.b("dropdown"),
|
||||
_ctx.ns.is("multiple", _ctx.isMultiple),
|
||||
_ctx.popperClass
|
||||
]),
|
||||
style: normalizeStyle({ [_ctx.isFitInputWidth ? "width" : "minWidth"]: _ctx.minWidth })
|
||||
}, [
|
||||
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
||||
key: 0,
|
||||
class: normalizeClass(_ctx.ns.be("dropdown", "header"))
|
||||
}, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
|
||||
renderSlot(_ctx.$slots, "default"),
|
||||
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
||||
key: 1,
|
||||
class: normalizeClass(_ctx.ns.be("dropdown", "footer"))
|
||||
}, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
|
||||
], 6);
|
||||
}
|
||||
var select_dropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(select_dropdown_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
||||
//#endregion
|
||||
export { select_dropdown_default as default };
|
||||
|
||||
//# sourceMappingURL=select-dropdown.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"select-dropdown.mjs","names":[],"sources":["../../../../../../packages/components/select/src/select-dropdown.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b('dropdown'), ns.is('multiple', isMultiple), popperClass]\"\n :style=\"{ [isFitInputWidth ? 'width' : 'minWidth']: minWidth }\"\n >\n <div v-if=\"$slots.header\" :class=\"ns.be('dropdown', 'header')\">\n <slot name=\"header\" />\n </div>\n <slot />\n <div v-if=\"$slots.footer\" :class=\"ns.be('dropdown', 'footer')\">\n <slot name=\"footer\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, inject, onMounted, ref } from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { useNamespace } from '@element-plus/hooks'\nimport { selectKey } from './token'\nimport { BORDER_HORIZONTAL_WIDTH } from '@element-plus/constants'\n\nexport default defineComponent({\n name: 'ElSelectDropdown',\n\n componentName: 'ElSelectDropdown',\n\n setup() {\n const select = inject(selectKey)!\n const ns = useNamespace('select')\n\n // computed\n const popperClass = computed(() => select.props.popperClass)\n const isMultiple = computed(() => select.props.multiple)\n const isFitInputWidth = computed(() => select.props.fitInputWidth)\n const minWidth = ref('')\n\n function updateMinWidth() {\n const offsetWidth = select.selectRef?.offsetWidth\n if (offsetWidth) {\n minWidth.value = `${offsetWidth - BORDER_HORIZONTAL_WIDTH}px`\n } else {\n minWidth.value = ''\n }\n }\n\n onMounted(() => {\n // TODO: updatePopper\n // popper.value.update()\n updateMinWidth()\n useResizeObserver(select.selectRef, updateMinWidth)\n })\n\n return {\n ns,\n minWidth,\n popperClass,\n isMultiple,\n isFitInputWidth,\n }\n },\n})\n</script>\n"],"mappings":";;;;;qBACE,mBAWM,OAAA;EAVH,OAAK,eAAA;GAAG,KAAA,GAAG,EAAC,WAAA;GAAc,KAAA,GAAG,GAAE,YAAa,KAAA,WAAU;GAAG,KAAA;GAAW,CAAA;EACpE,OAAK,eAAA,GAAK,KAAA,kBAAe,UAAA,aAA0B,KAAA,UAAQ,CAAA;;EAEjD,KAAA,OAAO,UAAA,WAAA,EAAlB,mBAEM,OAAA;;GAFqB,OAAK,eAAE,KAAA,GAAG,GAAE,YAAA,SAAA,CAAA;MACrC,WAAsB,KAAA,QAAA,SAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,QAAA,KAAA;EAExB,WAAQ,KAAA,QAAA,UAAA;EACG,KAAA,OAAO,UAAA,WAAA,EAAlB,mBAEM,OAAA;;GAFqB,OAAK,eAAE,KAAA,GAAG,GAAE,YAAA,SAAA,CAAA;MACrC,WAAsB,KAAA,QAAA,SAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,QAAA,KAAA"}
|
||||
30
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.vue.d.ts
generated
vendored
Normal file
30
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/select/src/select-dropdown.vue.d.ts
|
||||
declare const _default: typeof __VLS_export;
|
||||
declare const __VLS_export: _$vue.DefineComponent<{}, {
|
||||
ns: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
minWidth: _$vue.Ref<string, string>;
|
||||
popperClass: _$vue.ComputedRef<string>;
|
||||
isMultiple: _$vue.ComputedRef<boolean>;
|
||||
isFitInputWidth: _$vue.ComputedRef<boolean>;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
38
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
38
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import "../../../constants/form.mjs";
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { selectKey } from "./token.mjs";
|
||||
import { useResizeObserver } from "@vueuse/core";
|
||||
import { computed, defineComponent, inject, onMounted, ref } from "vue";
|
||||
//#region ../../packages/components/select/src/select-dropdown.vue?vue&type=script&lang.ts
|
||||
var select_dropdown_vue_vue_type_script_lang_default = defineComponent({
|
||||
name: "ElSelectDropdown",
|
||||
componentName: "ElSelectDropdown",
|
||||
setup() {
|
||||
const select = inject(selectKey);
|
||||
const ns = useNamespace("select");
|
||||
const popperClass = computed(() => select.props.popperClass);
|
||||
const isMultiple = computed(() => select.props.multiple);
|
||||
const isFitInputWidth = computed(() => select.props.fitInputWidth);
|
||||
const minWidth = ref("");
|
||||
function updateMinWidth() {
|
||||
const offsetWidth = select.selectRef?.offsetWidth;
|
||||
if (offsetWidth) minWidth.value = `${offsetWidth - 2}px`;
|
||||
else minWidth.value = "";
|
||||
}
|
||||
onMounted(() => {
|
||||
updateMinWidth();
|
||||
useResizeObserver(select.selectRef, updateMinWidth);
|
||||
});
|
||||
return {
|
||||
ns,
|
||||
minWidth,
|
||||
popperClass,
|
||||
isMultiple,
|
||||
isFitInputWidth
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { select_dropdown_vue_vue_type_script_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=select-dropdown.vue_vue_type_script_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"select-dropdown.vue_vue_type_script_lang.mjs","names":[],"sources":["../../../../../../packages/components/select/src/select-dropdown.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b('dropdown'), ns.is('multiple', isMultiple), popperClass]\"\n :style=\"{ [isFitInputWidth ? 'width' : 'minWidth']: minWidth }\"\n >\n <div v-if=\"$slots.header\" :class=\"ns.be('dropdown', 'header')\">\n <slot name=\"header\" />\n </div>\n <slot />\n <div v-if=\"$slots.footer\" :class=\"ns.be('dropdown', 'footer')\">\n <slot name=\"footer\" />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, inject, onMounted, ref } from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { useNamespace } from '@element-plus/hooks'\nimport { selectKey } from './token'\nimport { BORDER_HORIZONTAL_WIDTH } from '@element-plus/constants'\n\nexport default defineComponent({\n name: 'ElSelectDropdown',\n\n componentName: 'ElSelectDropdown',\n\n setup() {\n const select = inject(selectKey)!\n const ns = useNamespace('select')\n\n // computed\n const popperClass = computed(() => select.props.popperClass)\n const isMultiple = computed(() => select.props.multiple)\n const isFitInputWidth = computed(() => select.props.fitInputWidth)\n const minWidth = ref('')\n\n function updateMinWidth() {\n const offsetWidth = select.selectRef?.offsetWidth\n if (offsetWidth) {\n minWidth.value = `${offsetWidth - BORDER_HORIZONTAL_WIDTH}px`\n } else {\n minWidth.value = ''\n }\n }\n\n onMounted(() => {\n // TODO: updatePopper\n // popper.value.update()\n updateMinWidth()\n useResizeObserver(select.selectRef, updateMinWidth)\n })\n\n return {\n ns,\n minWidth,\n popperClass,\n isMultiple,\n isFitInputWidth,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;AAsBA,IAAA,mDAAe,gBAAgB;CAC7B,MAAM;CAEN,eAAe;CAEf,QAAQ;EACN,MAAM,SAAS,OAAO,UAAU;EAChC,MAAM,KAAK,aAAa,SAAQ;EAGhC,MAAM,cAAc,eAAe,OAAO,MAAM,YAAW;EAC3D,MAAM,aAAa,eAAe,OAAO,MAAM,SAAQ;EACvD,MAAM,kBAAkB,eAAe,OAAO,MAAM,cAAa;EACjE,MAAM,WAAW,IAAI,GAAE;EAEvB,SAAS,iBAAiB;GACxB,MAAM,cAAc,OAAO,WAAW;GACtC,IAAI,aACF,SAAS,QAAQ,GAAG,cAAA,EAAsC;QAE1D,SAAS,QAAQ;;EAIrB,gBAAgB;GAGd,gBAAe;GACf,kBAAkB,OAAO,WAAW,eAAc;IACnD;EAED,OAAO;GACL;GACA;GACA;GACA;GACA;GACF;;CAEH,CAAA"}
|
||||
154
frontend/node_modules/element-plus/es/components/select/src/select.d.ts
generated
vendored
Normal file
154
frontend/node_modules/element-plus/es/components/select/src/select.d.ts
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
import { EmitFn } from "../../../utils/vue/typescript.js";
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { PopperEffect } from "../../popper/src/popper.js";
|
||||
import { Options, Placement } from "../../popper/index.js";
|
||||
import { ScrollbarDirection } from "../../scrollbar/src/scrollbar.js";
|
||||
import { Props } from "../../select-v2/src/useProps.js";
|
||||
import _default from "./select.vue.js";
|
||||
import * as _$vue from "vue";
|
||||
import { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes } from "vue";
|
||||
|
||||
//#region ../../packages/components/select/src/select.d.ts
|
||||
/**
|
||||
* @description Tag tooltip configuration interface
|
||||
*/
|
||||
interface TagTooltipProps {
|
||||
appendTo?: string | HTMLElement;
|
||||
placement?: Placement;
|
||||
fallbackPlacements?: Placement[];
|
||||
effect?: PopperEffect;
|
||||
popperClass?: string;
|
||||
popperStyle?: string | CSSProperties;
|
||||
transition?: string;
|
||||
teleported?: boolean;
|
||||
popperOptions?: Partial<Options>;
|
||||
showAfter?: number;
|
||||
hideAfter?: number;
|
||||
autoClose?: number;
|
||||
offset?: number;
|
||||
}
|
||||
declare const selectProps: {
|
||||
ariaLabel: StringConstructor;
|
||||
emptyValues: ArrayConstructor;
|
||||
valueOnClear: 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>;
|
||||
name: StringConstructor;
|
||||
id: StringConstructor;
|
||||
modelValue: EpPropFinalized<(new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[] | null) | (((new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[] | null)) | null)[], unknown, unknown, undefined, boolean>;
|
||||
autocomplete: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
automaticDropdown: BooleanConstructor;
|
||||
size: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
effect: EpPropFinalized<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown, string, boolean>;
|
||||
disabled: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
clearable: BooleanConstructor;
|
||||
filterable: BooleanConstructor;
|
||||
allowCreate: BooleanConstructor;
|
||||
loading: BooleanConstructor;
|
||||
popperClass: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
popperStyle: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
popperOptions: EpPropFinalized<(new (...args: any[]) => Partial<Options>) | (() => Partial<Options>) | (((new (...args: any[]) => Partial<Options>) | (() => Partial<Options>)) | null)[], unknown, unknown, () => Partial<Options>, boolean>;
|
||||
remote: BooleanConstructor;
|
||||
debounce: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
loadingText: StringConstructor;
|
||||
noMatchText: StringConstructor;
|
||||
noDataText: StringConstructor;
|
||||
remoteMethod: {
|
||||
readonly type: _$vue.PropType<(query: string) => void>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
filterMethod: {
|
||||
readonly type: _$vue.PropType<(query: string) => void>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
multiple: BooleanConstructor;
|
||||
multipleLimit: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
placeholder: {
|
||||
readonly type: _$vue.PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultFirstOption: BooleanConstructor;
|
||||
reserveKeyword: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
valueKey: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
collapseTags: BooleanConstructor;
|
||||
collapseTagsTooltip: BooleanConstructor;
|
||||
tagTooltip: EpPropFinalized<(new (...args: any[]) => TagTooltipProps) | (() => TagTooltipProps) | (((new (...args: any[]) => TagTooltipProps) | (() => TagTooltipProps)) | null)[], unknown, unknown, () => {}, boolean>;
|
||||
maxCollapseTags: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
persistent: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
clearIcon: EpPropFinalized<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown, _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
fitInputWidth: BooleanConstructor;
|
||||
suffixIcon: EpPropFinalized<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown, _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
tagType: {
|
||||
default: string;
|
||||
type: _$vue.PropType<EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>>;
|
||||
required: false;
|
||||
validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
tagEffect: {
|
||||
default: string;
|
||||
type: _$vue.PropType<EpPropMergeType<StringConstructor, "light" | "dark" | "plain", unknown>>;
|
||||
required: false;
|
||||
validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
validateEvent: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
remoteShowSuffix: BooleanConstructor;
|
||||
showArrow: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
offset: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
placement: EpPropFinalized<(new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown, string, boolean>;
|
||||
fallbackPlacements: EpPropFinalized<(new (...args: any[]) => Placement[]) | (() => Placement[]) | (((new (...args: any[]) => Placement[]) | (() => Placement[])) | null)[], unknown, unknown, string[], boolean>;
|
||||
tabindex: EpPropFinalized<(StringConstructor | NumberConstructor)[], unknown, unknown, number, boolean>;
|
||||
appendTo: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
options: {
|
||||
readonly type: _$vue.PropType<Record<string, any>[]>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
props: EpPropFinalized<(new (...args: any[]) => Props) | (() => Props) | (((new (...args: any[]) => Props) | (() => Props)) | null)[], unknown, unknown, () => Required<Props>, boolean>;
|
||||
};
|
||||
declare const selectEmits: {
|
||||
"update:modelValue": (val: SelectProps["modelValue"] | any) => boolean;
|
||||
change: (val: SelectProps["modelValue"] | any) => boolean;
|
||||
'popup-scroll': ({
|
||||
scrollTop,
|
||||
scrollLeft
|
||||
}: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => boolean;
|
||||
'end-reached': (direction: ScrollbarDirection) => boolean;
|
||||
'remove-tag': (val: unknown) => boolean;
|
||||
'visible-change': (visible: boolean) => boolean;
|
||||
focus: (evt: FocusEvent) => boolean;
|
||||
blur: (evt: FocusEvent) => boolean;
|
||||
clear: () => boolean;
|
||||
};
|
||||
type SelectProps = ExtractPropTypes<typeof selectProps>;
|
||||
type SelectPropsPublic = ExtractPublicPropTypes<typeof selectProps>;
|
||||
type SelectEmits = EmitFn<typeof selectEmits>;
|
||||
type SelectInstance = InstanceType<typeof _default> & unknown;
|
||||
type SelectOptionProps = Props;
|
||||
//#endregion
|
||||
export { SelectEmits, SelectInstance, SelectOptionProps, SelectProps, SelectPropsPublic, TagTooltipProps, selectEmits, selectProps };
|
||||
306
frontend/node_modules/element-plus/es/components/select/src/select.mjs
generated
vendored
Normal file
306
frontend/node_modules/element-plus/es/components/select/src/select.mjs
generated
vendored
Normal file
@@ -0,0 +1,306 @@
|
||||
import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from "../../../constants/event.mjs";
|
||||
import { buildProps, definePropType } from "../../../utils/vue/props/runtime.mjs";
|
||||
import { iconPropType } from "../../../utils/vue/icon.mjs";
|
||||
import { useSizeProp } from "../../../hooks/use-size/index.mjs";
|
||||
import { useEmptyValuesProps } from "../../../hooks/use-empty-values/index.mjs";
|
||||
import { useAriaProps } from "../../../hooks/use-aria/index.mjs";
|
||||
import { useTooltipContentProps } from "../../tooltip/src/content.mjs";
|
||||
import { scrollbarEmits } from "../../scrollbar/src/scrollbar.mjs";
|
||||
import { tagProps } from "../../tag/src/tag.mjs";
|
||||
import { defaultProps } from "../../select-v2/src/useProps.mjs";
|
||||
import { ArrowDown, CircleClose } from "@element-plus/icons-vue";
|
||||
import { placements } from "@popperjs/core";
|
||||
//#region ../../packages/components/select/src/select.ts
|
||||
const selectProps = buildProps({
|
||||
/**
|
||||
* @description the name attribute of select input
|
||||
*/
|
||||
name: String,
|
||||
/**
|
||||
* @description native input id
|
||||
*/
|
||||
id: String,
|
||||
/**
|
||||
* @description binding value
|
||||
*/
|
||||
modelValue: {
|
||||
type: definePropType([
|
||||
Array,
|
||||
String,
|
||||
Number,
|
||||
Boolean,
|
||||
Object
|
||||
]),
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description the autocomplete attribute of select input
|
||||
*/
|
||||
autocomplete: {
|
||||
type: String,
|
||||
default: "off"
|
||||
},
|
||||
/**
|
||||
* @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused
|
||||
*/
|
||||
automaticDropdown: Boolean,
|
||||
/**
|
||||
* @description size of Input
|
||||
*/
|
||||
size: useSizeProp,
|
||||
/**
|
||||
* @description tooltip theme, built-in theme: `dark` / `light`
|
||||
*/
|
||||
effect: {
|
||||
type: definePropType(String),
|
||||
default: "light"
|
||||
},
|
||||
/**
|
||||
* @description whether Select is disabled
|
||||
*/
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
/**
|
||||
* @description whether select can be cleared
|
||||
*/
|
||||
clearable: Boolean,
|
||||
/**
|
||||
* @description whether Select is filterable
|
||||
*/
|
||||
filterable: Boolean,
|
||||
/**
|
||||
* @description whether creating new items is allowed. To use this, `filterable` must be true
|
||||
*/
|
||||
allowCreate: Boolean,
|
||||
/**
|
||||
* @description whether Select is loading data from server
|
||||
*/
|
||||
loading: Boolean,
|
||||
/**
|
||||
* @description custom class name for Select's dropdown
|
||||
*/
|
||||
popperClass: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
/**
|
||||
* @description custom style for Select's dropdown
|
||||
*/
|
||||
popperStyle: { type: definePropType([String, Object]) },
|
||||
/**
|
||||
* @description [popper.js](https://popper.js.org/docs/v2/) parameters
|
||||
*/
|
||||
popperOptions: {
|
||||
type: definePropType(Object),
|
||||
default: () => ({})
|
||||
},
|
||||
/**
|
||||
* @description whether options are loaded from server
|
||||
*/
|
||||
remote: Boolean,
|
||||
/**
|
||||
* @description debounce delay during remote search, in milliseconds
|
||||
*/
|
||||
debounce: {
|
||||
type: Number,
|
||||
default: 300
|
||||
},
|
||||
/**
|
||||
* @description displayed text while loading data from server, default is 'Loading'
|
||||
*/
|
||||
loadingText: String,
|
||||
/**
|
||||
* @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'
|
||||
*/
|
||||
noMatchText: String,
|
||||
/**
|
||||
* @description displayed text when there is no options, you can also use slot `empty`, default is 'No data'
|
||||
*/
|
||||
noDataText: String,
|
||||
/**
|
||||
* @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true
|
||||
*/
|
||||
remoteMethod: { type: definePropType(Function) },
|
||||
/**
|
||||
* @description custom filter method, the first parameter is the current input value. To use this, `filterable` must be true
|
||||
*/
|
||||
filterMethod: { type: definePropType(Function) },
|
||||
/**
|
||||
* @description whether multiple-select is activated
|
||||
*/
|
||||
multiple: Boolean,
|
||||
/**
|
||||
* @description maximum number of options user can select when `multiple` is `true`. No limit when set to 0
|
||||
*/
|
||||
multipleLimit: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
/**
|
||||
* @description placeholder, default is 'Select'
|
||||
*/
|
||||
placeholder: { type: String },
|
||||
/**
|
||||
* @description select first matching option on enter key. Use with `filterable` or `remote`
|
||||
*/
|
||||
defaultFirstOption: Boolean,
|
||||
/**
|
||||
* @description when `multiple` and `filter` is true, whether to reserve current keyword after selecting an option
|
||||
*/
|
||||
reserveKeyword: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* @description unique identity key name for value, required when value is an object
|
||||
*/
|
||||
valueKey: {
|
||||
type: String,
|
||||
default: "value"
|
||||
},
|
||||
/**
|
||||
* @description whether to collapse tags to a text when multiple selecting
|
||||
*/
|
||||
collapseTags: Boolean,
|
||||
/**
|
||||
* @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true
|
||||
*/
|
||||
collapseTagsTooltip: Boolean,
|
||||
/**
|
||||
* @description configuration object for the collapse-tags tooltip. To use this, `collapse-tags` and `collapse-tags-tooltip` must be true
|
||||
*/
|
||||
tagTooltip: {
|
||||
type: definePropType(Object),
|
||||
default: () => ({})
|
||||
},
|
||||
/**
|
||||
* @description the max tags number to be shown. To use this, `collapse-tags` must be true
|
||||
*/
|
||||
maxCollapseTags: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
/**
|
||||
* @description whether select dropdown is teleported, if `true` it will be teleported to where `append-to` sets
|
||||
*/
|
||||
teleported: useTooltipContentProps.teleported,
|
||||
/**
|
||||
* @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed
|
||||
*/
|
||||
persistent: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* @description custom clear icon component
|
||||
*/
|
||||
clearIcon: {
|
||||
type: iconPropType,
|
||||
default: CircleClose
|
||||
},
|
||||
/**
|
||||
* @description whether the width of the dropdown is the same as the input
|
||||
*/
|
||||
fitInputWidth: Boolean,
|
||||
/**
|
||||
* @description custom suffix icon component
|
||||
*/
|
||||
suffixIcon: {
|
||||
type: iconPropType,
|
||||
default: ArrowDown
|
||||
},
|
||||
/**
|
||||
* @description tag type
|
||||
*/
|
||||
tagType: {
|
||||
...tagProps.type,
|
||||
default: "info"
|
||||
},
|
||||
/**
|
||||
* @description tag effect
|
||||
*/
|
||||
tagEffect: {
|
||||
...tagProps.effect,
|
||||
default: "light"
|
||||
},
|
||||
/**
|
||||
* @description whether to trigger form validation
|
||||
*/
|
||||
validateEvent: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* @description in remote search method show suffix icon
|
||||
*/
|
||||
remoteShowSuffix: Boolean,
|
||||
/**
|
||||
* @description determines whether the arrow is displayed
|
||||
*/
|
||||
showArrow: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/**
|
||||
* @description offset of the dropdown
|
||||
*/
|
||||
offset: {
|
||||
type: Number,
|
||||
default: 12
|
||||
},
|
||||
/**
|
||||
* @description position of dropdown
|
||||
*/
|
||||
placement: {
|
||||
type: definePropType(String),
|
||||
values: placements,
|
||||
default: "bottom-start"
|
||||
},
|
||||
/**
|
||||
* @description list of possible positions for dropdown
|
||||
*/
|
||||
fallbackPlacements: {
|
||||
type: definePropType(Array),
|
||||
default: [
|
||||
"bottom-start",
|
||||
"top-start",
|
||||
"right",
|
||||
"left"
|
||||
]
|
||||
},
|
||||
/**
|
||||
* @description tabindex for input
|
||||
*/
|
||||
tabindex: {
|
||||
type: [String, Number],
|
||||
default: 0
|
||||
},
|
||||
/**
|
||||
* @description which element the selection dropdown appends to
|
||||
*/
|
||||
appendTo: useTooltipContentProps.appendTo,
|
||||
options: { type: definePropType(Array) },
|
||||
props: {
|
||||
type: definePropType(Object),
|
||||
default: () => defaultProps
|
||||
},
|
||||
...useEmptyValuesProps,
|
||||
...useAriaProps(["ariaLabel"])
|
||||
});
|
||||
const selectEmits = {
|
||||
[UPDATE_MODEL_EVENT]: (val) => true,
|
||||
[CHANGE_EVENT]: (val) => true,
|
||||
"popup-scroll": scrollbarEmits.scroll,
|
||||
"end-reached": scrollbarEmits["end-reached"],
|
||||
"remove-tag": (val) => true,
|
||||
"visible-change": (visible) => true,
|
||||
focus: (evt) => evt instanceof FocusEvent,
|
||||
blur: (evt) => evt instanceof FocusEvent,
|
||||
clear: () => true
|
||||
};
|
||||
//#endregion
|
||||
export { selectEmits, selectProps };
|
||||
|
||||
//# sourceMappingURL=select.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/select.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/select.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
928
frontend/node_modules/element-plus/es/components/select/src/select.vue.d.ts
generated
vendored
Normal file
928
frontend/node_modules/element-plus/es/components/select/src/select.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,928 @@
|
||||
import { SFCWithInstall } from "../../../utils/vue/typescript.js";
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { Arrayable } from "../../../utils/typescript.js";
|
||||
import { PopperEffect, PopperInstance, roleTypes } from "../../popper/src/popper.js";
|
||||
import { Options, Placement } from "../../popper/index.js";
|
||||
import { TooltipContentInstance } from "../../tooltip/src/content.js";
|
||||
import { TooltipTriggerType } from "../../tooltip/src/trigger.js";
|
||||
import { TooltipInstance, UseTooltipProps } from "../../tooltip/src/tooltip.js";
|
||||
import { TagProps } from "../../tag/src/tag.js";
|
||||
import { IconProps } from "../../icon/src/icon.js";
|
||||
import { ScrollbarDirection, ScrollbarInstance, ScrollbarProps } from "../../scrollbar/src/scrollbar.js";
|
||||
import { Option } from "../../select-v2/src/select.types.js";
|
||||
import { Props } from "../../select-v2/src/useProps.js";
|
||||
import { SelectProps, TagTooltipProps } from "./select.js";
|
||||
import { OptionBasic, OptionPublicInstance, OptionValue, SelectContext, SelectStates } from "./type.js";
|
||||
import * as _$vue from "vue";
|
||||
import { VNode } from "vue";
|
||||
import * as _$_vueuse_core0 from "@vueuse/core";
|
||||
|
||||
//#region ../../packages/components/select/src/select.vue.d.ts
|
||||
declare const _default: typeof __VLS_export;
|
||||
declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
||||
ariaLabel: StringConstructor;
|
||||
emptyValues: ArrayConstructor;
|
||||
valueOnClear: 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>;
|
||||
name: StringConstructor;
|
||||
id: StringConstructor;
|
||||
modelValue: EpPropFinalized<(new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[] | null) | (((new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[] | null)) | null)[], unknown, unknown, undefined, boolean>;
|
||||
autocomplete: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
automaticDropdown: BooleanConstructor;
|
||||
size: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
effect: EpPropFinalized<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown, string, boolean>;
|
||||
disabled: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
clearable: BooleanConstructor;
|
||||
filterable: BooleanConstructor;
|
||||
allowCreate: BooleanConstructor;
|
||||
loading: BooleanConstructor;
|
||||
popperClass: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
popperStyle: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | _$vue.CSSProperties) | (() => string | _$vue.CSSProperties) | (((new (...args: any[]) => string | _$vue.CSSProperties) | (() => string | _$vue.CSSProperties)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
popperOptions: EpPropFinalized<(new (...args: any[]) => Partial<Options>) | (() => Partial<Options>) | (((new (...args: any[]) => Partial<Options>) | (() => Partial<Options>)) | null)[], unknown, unknown, () => Partial<Options>, boolean>;
|
||||
remote: BooleanConstructor;
|
||||
debounce: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
loadingText: StringConstructor;
|
||||
noMatchText: StringConstructor;
|
||||
noDataText: StringConstructor;
|
||||
remoteMethod: {
|
||||
readonly type: _$vue.PropType<(query: string) => void>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
filterMethod: {
|
||||
readonly type: _$vue.PropType<(query: string) => void>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
multiple: BooleanConstructor;
|
||||
multipleLimit: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
placeholder: {
|
||||
readonly type: _$vue.PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultFirstOption: BooleanConstructor;
|
||||
reserveKeyword: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
valueKey: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
collapseTags: BooleanConstructor;
|
||||
collapseTagsTooltip: BooleanConstructor;
|
||||
tagTooltip: EpPropFinalized<(new (...args: any[]) => TagTooltipProps) | (() => TagTooltipProps) | (((new (...args: any[]) => TagTooltipProps) | (() => TagTooltipProps)) | null)[], unknown, unknown, () => {}, boolean>;
|
||||
maxCollapseTags: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
persistent: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
clearIcon: EpPropFinalized<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown, _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
fitInputWidth: BooleanConstructor;
|
||||
suffixIcon: EpPropFinalized<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown, _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
tagType: {
|
||||
default: string;
|
||||
type: _$vue.PropType<EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>>;
|
||||
required: false;
|
||||
validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
tagEffect: {
|
||||
default: string;
|
||||
type: _$vue.PropType<EpPropMergeType<StringConstructor, "light" | "dark" | "plain", unknown>>;
|
||||
required: false;
|
||||
validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
validateEvent: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
remoteShowSuffix: BooleanConstructor;
|
||||
showArrow: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
offset: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
placement: EpPropFinalized<(new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown, string, boolean>;
|
||||
fallbackPlacements: EpPropFinalized<(new (...args: any[]) => Placement[]) | (() => Placement[]) | (((new (...args: any[]) => Placement[]) | (() => Placement[])) | null)[], unknown, unknown, string[], boolean>;
|
||||
tabindex: EpPropFinalized<(StringConstructor | NumberConstructor)[], unknown, unknown, number, boolean>;
|
||||
appendTo: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
options: {
|
||||
readonly type: _$vue.PropType<Record<string, any>[]>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
props: EpPropFinalized<(new (...args: any[]) => Props) | (() => Props) | (((new (...args: any[]) => Props) | (() => Props)) | null)[], unknown, unknown, () => Required<Props>, boolean>;
|
||||
}>, {
|
||||
modelValue: _$vue.ComputedRef<string | number | boolean | any[] | Record<string, any> | null | undefined>;
|
||||
selectedLabel: _$vue.ComputedRef<string | string[]>;
|
||||
calculatorRef: _$vue.ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
inputStyle: _$vue.ComputedRef<{
|
||||
minWidth: string;
|
||||
}>;
|
||||
getLabel: (option: Option) => any;
|
||||
getValue: (option: Option) => any;
|
||||
getOptions: (option: Option) => any;
|
||||
getDisabled: (option: Option) => any;
|
||||
getOptionProps: (option: Record<string, any>) => {
|
||||
label: any;
|
||||
value: any;
|
||||
disabled: any;
|
||||
};
|
||||
inputId: _$vue.Ref<string | undefined, string | undefined>;
|
||||
contentId: _$vue.Ref<string, string>;
|
||||
nsSelect: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
nsInput: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
states: {
|
||||
inputValue: string;
|
||||
options: Map<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>, OptionPublicInstance> & Omit<Map<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>, OptionPublicInstance>, keyof Map<any, any>>;
|
||||
cachedOptions: Map<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>, OptionPublicInstance> & Omit<Map<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>, OptionPublicInstance>, keyof Map<any, any>>;
|
||||
optionValues: OptionValue[];
|
||||
selected: {
|
||||
index: number;
|
||||
value: OptionValue;
|
||||
currentLabel: OptionPublicInstance["currentLabel"];
|
||||
isDisabled?: OptionPublicInstance["isDisabled"] | undefined;
|
||||
}[];
|
||||
hoveringIndex: number;
|
||||
inputHovering: boolean;
|
||||
selectionWidth: number;
|
||||
collapseItemWidth: number;
|
||||
previousQuery: string | null;
|
||||
selectedLabel: string;
|
||||
menuVisibleOnFocus: boolean;
|
||||
isBeforeHide: boolean;
|
||||
};
|
||||
isFocused: _$vue.Ref<boolean, boolean>;
|
||||
expanded: _$vue.Ref<boolean, boolean>;
|
||||
optionsArray: _$vue.ComputedRef<OptionPublicInstance[]>;
|
||||
hoverOption: _$vue.Ref<any, any>;
|
||||
selectSize: _$vue.ComputedRef<"" | "default" | "small" | "large">;
|
||||
filteredOptionsCount: _$vue.ComputedRef<number>;
|
||||
updateTooltip: () => void;
|
||||
updateTagTooltip: () => void;
|
||||
debouncedOnInputChange: _$_vueuse_core0.UseDebounceFnReturn<() => void>;
|
||||
onInput: (event: Event) => void;
|
||||
deletePrevTag: (e: KeyboardEvent) => void;
|
||||
deleteTag: (event: MouseEvent, tag: OptionBasic) => void;
|
||||
deleteSelected: (event: Event) => void;
|
||||
handleOptionSelect: (option: OptionPublicInstance) => void;
|
||||
scrollToOption: (option: OptionPublicInstance | OptionPublicInstance[] | SelectStates["selected"]) => void;
|
||||
hasModelValue: _$vue.ComputedRef<boolean>;
|
||||
shouldShowPlaceholder: _$vue.ComputedRef<boolean>;
|
||||
currentPlaceholder: _$vue.ComputedRef<string>;
|
||||
mouseEnterEventName: string | null;
|
||||
needStatusIcon: _$vue.ComputedRef<boolean>;
|
||||
showClearBtn: _$vue.ComputedRef<boolean>;
|
||||
iconComponent: _$vue.ComputedRef<EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>>;
|
||||
iconReverse: _$vue.ComputedRef<string>;
|
||||
validateState: _$vue.ComputedRef<"" | "error" | "success" | "validating">;
|
||||
validateIcon: _$vue.ComputedRef<"" | _$vue.Component>;
|
||||
showNewOption: _$vue.ComputedRef<boolean>;
|
||||
updateOptions: () => void;
|
||||
collapseTagSize: _$vue.ComputedRef<"default" | "small">;
|
||||
setSelected: () => void;
|
||||
selectDisabled: _$vue.ComputedRef<boolean>;
|
||||
emptyText: _$vue.ComputedRef<string | null>;
|
||||
handleCompositionStart: (event: CompositionEvent) => void;
|
||||
handleCompositionUpdate: (event: CompositionEvent) => void;
|
||||
handleCompositionEnd: (event: CompositionEvent) => void;
|
||||
handleKeydown: (e: KeyboardEvent) => void;
|
||||
onOptionCreate: (vm: OptionPublicInstance) => void;
|
||||
onOptionDestroy: (key: OptionValue, vm: OptionPublicInstance) => void;
|
||||
handleMenuEnter: () => void;
|
||||
focus: () => void;
|
||||
blur: () => void;
|
||||
handleClearClick: (event: Event) => void;
|
||||
handleClickOutside: (event: Event) => void;
|
||||
handleEsc: () => void;
|
||||
toggleMenu: (event?: Event) => void;
|
||||
selectOption: () => void;
|
||||
getValueKey: (item: OptionPublicInstance | SelectStates["selected"][0]) => any;
|
||||
navigateOptions: (direction: "prev" | "next") => void;
|
||||
dropdownMenuVisible: _$vue.WritableComputedRef<boolean, boolean>;
|
||||
showTagList: _$vue.ComputedRef<{
|
||||
index: number;
|
||||
value: OptionValue;
|
||||
currentLabel: OptionPublicInstance["currentLabel"];
|
||||
isDisabled?: OptionPublicInstance["isDisabled"] | undefined;
|
||||
}[]>;
|
||||
collapseTagList: _$vue.ComputedRef<{
|
||||
index: number;
|
||||
value: OptionValue;
|
||||
currentLabel: OptionPublicInstance["currentLabel"];
|
||||
isDisabled?: OptionPublicInstance["isDisabled"] | undefined;
|
||||
}[]>;
|
||||
popupScroll: (data: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => void;
|
||||
getOption: (value: OptionValue) => {
|
||||
index: number;
|
||||
value: EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
||||
currentLabel: any;
|
||||
} | {
|
||||
index: number;
|
||||
value: EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
||||
currentLabel: string | number | boolean;
|
||||
readonly isDisabled: boolean;
|
||||
};
|
||||
endReached: (direction: ScrollbarDirection) => void;
|
||||
tagStyle: _$vue.ComputedRef<{
|
||||
maxWidth: string;
|
||||
}>;
|
||||
collapseTagStyle: _$vue.ComputedRef<{
|
||||
maxWidth: string;
|
||||
}>;
|
||||
popperRef: _$vue.ComputedRef<HTMLElement | undefined>;
|
||||
inputRef: _$vue.Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
||||
tooltipRef: _$vue.Ref<TooltipInstance | undefined, TooltipInstance | undefined>;
|
||||
tagTooltipRef: _$vue.Ref<TooltipInstance | undefined, TooltipInstance | undefined>;
|
||||
prefixRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
suffixRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
selectRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
wrapperRef: _$vue.ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
selectionRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
scrollbarRef: _$vue.Ref<ScrollbarInstance | undefined, ScrollbarInstance | undefined>;
|
||||
menuRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
tagMenuRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
collapseItemRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
"update:modelValue": (val: SelectProps["modelValue"] | any) => boolean;
|
||||
change: (val: SelectProps["modelValue"] | any) => boolean;
|
||||
'popup-scroll': ({
|
||||
scrollTop,
|
||||
scrollLeft
|
||||
}: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => boolean;
|
||||
'end-reached': (direction: ScrollbarDirection) => boolean;
|
||||
'remove-tag': (val: unknown) => boolean;
|
||||
'visible-change': (visible: boolean) => boolean;
|
||||
focus: (evt: FocusEvent) => boolean;
|
||||
blur: (evt: FocusEvent) => boolean;
|
||||
clear: () => boolean;
|
||||
}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
||||
ariaLabel: StringConstructor;
|
||||
emptyValues: ArrayConstructor;
|
||||
valueOnClear: 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>;
|
||||
name: StringConstructor;
|
||||
id: StringConstructor;
|
||||
modelValue: EpPropFinalized<(new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[] | null) | (((new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[] | null)) | null)[], unknown, unknown, undefined, boolean>;
|
||||
autocomplete: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
automaticDropdown: BooleanConstructor;
|
||||
size: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
effect: EpPropFinalized<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown, string, boolean>;
|
||||
disabled: EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
||||
clearable: BooleanConstructor;
|
||||
filterable: BooleanConstructor;
|
||||
allowCreate: BooleanConstructor;
|
||||
loading: BooleanConstructor;
|
||||
popperClass: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
popperStyle: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | _$vue.CSSProperties) | (() => string | _$vue.CSSProperties) | (((new (...args: any[]) => string | _$vue.CSSProperties) | (() => string | _$vue.CSSProperties)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
popperOptions: EpPropFinalized<(new (...args: any[]) => Partial<Options>) | (() => Partial<Options>) | (((new (...args: any[]) => Partial<Options>) | (() => Partial<Options>)) | null)[], unknown, unknown, () => Partial<Options>, boolean>;
|
||||
remote: BooleanConstructor;
|
||||
debounce: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
loadingText: StringConstructor;
|
||||
noMatchText: StringConstructor;
|
||||
noDataText: StringConstructor;
|
||||
remoteMethod: {
|
||||
readonly type: _$vue.PropType<(query: string) => void>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
filterMethod: {
|
||||
readonly type: _$vue.PropType<(query: string) => void>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
multiple: BooleanConstructor;
|
||||
multipleLimit: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
placeholder: {
|
||||
readonly type: _$vue.PropType<string>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultFirstOption: BooleanConstructor;
|
||||
reserveKeyword: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
valueKey: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
collapseTags: BooleanConstructor;
|
||||
collapseTagsTooltip: BooleanConstructor;
|
||||
tagTooltip: EpPropFinalized<(new (...args: any[]) => TagTooltipProps) | (() => TagTooltipProps) | (((new (...args: any[]) => TagTooltipProps) | (() => TagTooltipProps)) | null)[], unknown, unknown, () => {}, boolean>;
|
||||
maxCollapseTags: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
persistent: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
clearIcon: EpPropFinalized<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown, _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
fitInputWidth: BooleanConstructor;
|
||||
suffixIcon: EpPropFinalized<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown, _$vue.DefineComponent<{}, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
tagType: {
|
||||
default: string;
|
||||
type: _$vue.PropType<EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>>;
|
||||
required: false;
|
||||
validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
tagEffect: {
|
||||
default: string;
|
||||
type: _$vue.PropType<EpPropMergeType<StringConstructor, "light" | "dark" | "plain", unknown>>;
|
||||
required: false;
|
||||
validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
validateEvent: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
remoteShowSuffix: BooleanConstructor;
|
||||
showArrow: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
||||
offset: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
||||
placement: EpPropFinalized<(new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown, string, boolean>;
|
||||
fallbackPlacements: EpPropFinalized<(new (...args: any[]) => Placement[]) | (() => Placement[]) | (((new (...args: any[]) => Placement[]) | (() => Placement[])) | null)[], unknown, unknown, string[], boolean>;
|
||||
tabindex: EpPropFinalized<(StringConstructor | NumberConstructor)[], unknown, unknown, number, boolean>;
|
||||
appendTo: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
options: {
|
||||
readonly type: _$vue.PropType<Record<string, any>[]>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
props: EpPropFinalized<(new (...args: any[]) => Props) | (() => Props) | (((new (...args: any[]) => Props) | (() => Props)) | null)[], unknown, unknown, () => Required<Props>, boolean>;
|
||||
}>> & Readonly<{
|
||||
onClear?: (() => any) | undefined;
|
||||
"onUpdate:modelValue"?: ((val: any) => any) | undefined;
|
||||
onChange?: ((val: any) => any) | undefined;
|
||||
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
||||
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
||||
"onEnd-reached"?: ((direction: ScrollbarDirection) => any) | undefined;
|
||||
"onRemove-tag"?: ((val: unknown) => any) | undefined;
|
||||
"onVisible-change"?: ((visible: boolean) => any) | undefined;
|
||||
"onPopup-scroll"?: ((args_0: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => any) | undefined;
|
||||
}>, {
|
||||
loading: boolean;
|
||||
disabled: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
||||
modelValue: EpPropMergeType<(new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[] | null) | (((new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown> | EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>[] | null)) | null)[], unknown, unknown>;
|
||||
offset: number;
|
||||
teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
||||
props: Props;
|
||||
effect: EpPropMergeType<(new (...args: any[]) => string) | (() => PopperEffect) | (((new (...args: any[]) => string) | (() => PopperEffect)) | null)[], unknown, unknown>;
|
||||
autocomplete: string;
|
||||
clearable: boolean;
|
||||
clearIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
|
||||
suffixIcon: EpPropMergeType<(new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component) | (((new (...args: any[]) => (string | _$vue.Component) & {}) | (() => string | _$vue.Component)) | null)[], unknown, unknown>;
|
||||
tabindex: EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>;
|
||||
validateEvent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
||||
multiple: boolean;
|
||||
popperClass: string;
|
||||
fallbackPlacements: Placement[];
|
||||
placement: EpPropMergeType<(new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "top" | "auto" | "bottom" | "left" | "right" | "auto-start" | "auto-end" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown>;
|
||||
popperOptions: Partial<Options>;
|
||||
showArrow: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
||||
persistent: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
||||
valueKey: string;
|
||||
debounce: number;
|
||||
fitInputWidth: boolean;
|
||||
tagTooltip: TagTooltipProps;
|
||||
maxCollapseTags: number;
|
||||
multipleLimit: number;
|
||||
reserveKeyword: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
||||
tagType: EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>;
|
||||
tagEffect: EpPropMergeType<StringConstructor, "light" | "dark" | "plain", unknown>;
|
||||
valueOnClear: EpPropMergeType<(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>;
|
||||
allowCreate: boolean;
|
||||
automaticDropdown: boolean;
|
||||
collapseTags: boolean;
|
||||
collapseTagsTooltip: boolean;
|
||||
defaultFirstOption: boolean;
|
||||
filterable: boolean;
|
||||
remote: boolean;
|
||||
remoteShowSuffix: boolean;
|
||||
}, {}, {
|
||||
ElSelectMenu: _$vue.DefineComponent<{}, {
|
||||
ns: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
minWidth: _$vue.Ref<string, string>;
|
||||
popperClass: _$vue.ComputedRef<string>;
|
||||
isMultiple: _$vue.ComputedRef<boolean>;
|
||||
isFitInputWidth: _$vue.ComputedRef<boolean>;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
ElOption: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
||||
value: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: true;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
label: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
created: BooleanConstructor;
|
||||
disabled: BooleanConstructor;
|
||||
}>, {
|
||||
ns: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
id: _$vue.Ref<string, string>;
|
||||
containerKls: _$vue.ComputedRef<string[]>;
|
||||
currentLabel: _$vue.ComputedRef<boolean | EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
itemSelected: _$vue.ComputedRef<boolean>;
|
||||
isDisabled: _$vue.ComputedRef<boolean>;
|
||||
select: SelectContext;
|
||||
visible: _$vue.Ref<boolean, boolean>;
|
||||
hover: _$vue.Ref<boolean, boolean>;
|
||||
states: {
|
||||
index: number;
|
||||
groupDisabled: boolean;
|
||||
visible: boolean;
|
||||
hover: boolean;
|
||||
};
|
||||
hoverItem: () => void;
|
||||
handleMousedown: (event: MouseEvent) => void;
|
||||
updateOption: (query: string) => void;
|
||||
selectOptionClick: () => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
||||
value: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: true;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
label: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
created: BooleanConstructor;
|
||||
disabled: BooleanConstructor;
|
||||
}>> & Readonly<{}>, {
|
||||
disabled: boolean;
|
||||
created: boolean;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
ElOptions: _$vue.DefineComponent<{}, () => VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[], {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
ElOptionGroup: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
||||
label: StringConstructor;
|
||||
disabled: BooleanConstructor;
|
||||
}>, {
|
||||
groupRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
visible: _$vue.ComputedRef<boolean>;
|
||||
ns: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
||||
label: StringConstructor;
|
||||
disabled: BooleanConstructor;
|
||||
}>> & Readonly<{}>, {
|
||||
disabled: boolean;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
ElTag: SFCWithInstall<{
|
||||
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<TagProps> & Readonly<{
|
||||
onClose?: ((evt: MouseEvent) => any) | undefined;
|
||||
onClick?: ((evt: MouseEvent) => any) | undefined;
|
||||
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
close: (evt: MouseEvent) => void;
|
||||
click: (evt: MouseEvent) => void;
|
||||
}, _$vue.PublicProps, {
|
||||
type: "primary" | "success" | "info" | "warning" | "danger";
|
||||
effect: "dark" | "light" | "plain";
|
||||
}, false, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<TagProps> & Readonly<{
|
||||
onClose?: ((evt: MouseEvent) => any) | undefined;
|
||||
onClick?: ((evt: MouseEvent) => any) | undefined;
|
||||
}>, {}, {}, {}, {}, {
|
||||
type: "primary" | "success" | "info" | "warning" | "danger";
|
||||
effect: "dark" | "light" | "plain";
|
||||
}>;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
} & _$vue.ComponentOptionsBase<Readonly<TagProps> & Readonly<{
|
||||
onClose?: ((evt: MouseEvent) => any) | undefined;
|
||||
onClick?: ((evt: MouseEvent) => any) | undefined;
|
||||
}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
close: (evt: MouseEvent) => void;
|
||||
click: (evt: MouseEvent) => void;
|
||||
}, string, {
|
||||
type: "primary" | "success" | "info" | "warning" | "danger";
|
||||
effect: "dark" | "light" | "plain";
|
||||
}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
|
||||
$slots: {
|
||||
default?: (props: {}) => any;
|
||||
} & {
|
||||
default?: (props: {}) => any;
|
||||
};
|
||||
})>;
|
||||
ElScrollbar: SFCWithInstall<{
|
||||
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<ScrollbarProps> & Readonly<{
|
||||
onScroll?: ((args_0: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => any) | undefined;
|
||||
"onEnd-reached"?: ((direction: ScrollbarDirection) => any) | undefined;
|
||||
}>, {
|
||||
wrapRef: _$vue.Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
||||
update: () => void;
|
||||
scrollTo: {
|
||||
(xCord: number, yCord?: number): void;
|
||||
(options: ScrollToOptions): void;
|
||||
};
|
||||
setScrollTop: (value: number) => void;
|
||||
setScrollLeft: (value: number) => void;
|
||||
handleScroll: () => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
scroll: (args_0: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => void;
|
||||
"end-reached": (direction: ScrollbarDirection) => void;
|
||||
}, _$vue.PublicProps, {
|
||||
tag: keyof HTMLElementTagNameMap | (string & {});
|
||||
tabindex: number | string;
|
||||
height: number | string;
|
||||
maxHeight: number | string;
|
||||
distance: number;
|
||||
wrapStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
wrapClass: string | string[];
|
||||
viewClass: string | string[];
|
||||
viewStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
minSize: number;
|
||||
}, false, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<ScrollbarProps> & Readonly<{
|
||||
onScroll?: ((args_0: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => any) | undefined;
|
||||
"onEnd-reached"?: ((direction: ScrollbarDirection) => any) | undefined;
|
||||
}>, {
|
||||
wrapRef: _$vue.Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
||||
update: () => void;
|
||||
scrollTo: {
|
||||
(xCord: number, yCord?: number): void;
|
||||
(options: ScrollToOptions): void;
|
||||
};
|
||||
setScrollTop: (value: number) => void;
|
||||
setScrollLeft: (value: number) => void;
|
||||
handleScroll: () => void;
|
||||
}, {}, {}, {}, {
|
||||
tag: keyof HTMLElementTagNameMap | (string & {});
|
||||
tabindex: number | string;
|
||||
height: number | string;
|
||||
maxHeight: number | string;
|
||||
distance: number;
|
||||
wrapStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
wrapClass: string | string[];
|
||||
viewClass: string | string[];
|
||||
viewStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
minSize: number;
|
||||
}>;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
} & _$vue.ComponentOptionsBase<Readonly<ScrollbarProps> & Readonly<{
|
||||
onScroll?: ((args_0: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => any) | undefined;
|
||||
"onEnd-reached"?: ((direction: ScrollbarDirection) => any) | undefined;
|
||||
}>, {
|
||||
wrapRef: _$vue.Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
|
||||
update: () => void;
|
||||
scrollTo: {
|
||||
(xCord: number, yCord?: number): void;
|
||||
(options: ScrollToOptions): void;
|
||||
};
|
||||
setScrollTop: (value: number) => void;
|
||||
setScrollLeft: (value: number) => void;
|
||||
handleScroll: () => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
scroll: (args_0: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => void;
|
||||
"end-reached": (direction: ScrollbarDirection) => void;
|
||||
}, string, {
|
||||
tag: keyof HTMLElementTagNameMap | (string & {});
|
||||
tabindex: number | string;
|
||||
height: number | string;
|
||||
maxHeight: number | string;
|
||||
distance: number;
|
||||
wrapStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
wrapClass: string | string[];
|
||||
viewClass: string | string[];
|
||||
viewStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
minSize: number;
|
||||
}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
|
||||
$slots: {
|
||||
default?: (props: {}) => any;
|
||||
};
|
||||
})>;
|
||||
ElTooltip: SFCWithInstall<{
|
||||
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<UseTooltipProps> & Readonly<{
|
||||
onClose?: ((...args: any[]) => any) | undefined;
|
||||
onHide?: ((...args: any[]) => any) | undefined;
|
||||
onShow?: ((...args: any[]) => any) | undefined;
|
||||
onOpen?: ((...args: any[]) => any) | undefined;
|
||||
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
||||
"onBefore-show"?: ((...args: any[]) => any) | undefined;
|
||||
"onBefore-hide"?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
popperRef: _$vue.Ref<PopperInstance | undefined, PopperInstance | undefined>;
|
||||
contentRef: _$vue.Ref<TooltipContentInstance | undefined, TooltipContentInstance | undefined>;
|
||||
isFocusInsideContent: (event?: FocusEvent) => boolean | undefined;
|
||||
updatePopper: () => void;
|
||||
onOpen: (event?: Event, delay?: number) => void;
|
||||
onClose: (event?: Event, delay?: number) => void;
|
||||
hide: (event?: Event) => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
close: (...args: any[]) => void;
|
||||
hide: (...args: any[]) => void;
|
||||
show: (...args: any[]) => void;
|
||||
open: (...args: any[]) => void;
|
||||
"update:visible": (...args: any[]) => void;
|
||||
"before-show": (...args: any[]) => void;
|
||||
"before-hide": (...args: any[]) => void;
|
||||
}, _$vue.PublicProps, {
|
||||
offset: number;
|
||||
teleported: boolean;
|
||||
effect: PopperEffect;
|
||||
visible: boolean | null;
|
||||
content: string;
|
||||
style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
enterable: boolean;
|
||||
pure: boolean;
|
||||
focusOnShow: boolean;
|
||||
trapping: boolean;
|
||||
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
stopPopperMouseEvent: boolean;
|
||||
virtualTriggering: boolean;
|
||||
loop: boolean;
|
||||
boundariesPadding: number;
|
||||
gpuAcceleration: boolean;
|
||||
placement: Placement;
|
||||
popperOptions: Partial<Options>;
|
||||
strategy: "fixed" | "absolute";
|
||||
arrowOffset: number;
|
||||
showArrow: boolean;
|
||||
role: typeof roleTypes[number];
|
||||
showAfter: number;
|
||||
hideAfter: number;
|
||||
autoClose: number;
|
||||
trigger: Arrayable<TooltipTriggerType>;
|
||||
triggerKeys: string[];
|
||||
}, false, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<UseTooltipProps> & Readonly<{
|
||||
onClose?: ((...args: any[]) => any) | undefined;
|
||||
onHide?: ((...args: any[]) => any) | undefined;
|
||||
onShow?: ((...args: any[]) => any) | undefined;
|
||||
onOpen?: ((...args: any[]) => any) | undefined;
|
||||
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
||||
"onBefore-show"?: ((...args: any[]) => any) | undefined;
|
||||
"onBefore-hide"?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
popperRef: _$vue.Ref<PopperInstance | undefined, PopperInstance | undefined>;
|
||||
contentRef: _$vue.Ref<TooltipContentInstance | undefined, TooltipContentInstance | undefined>;
|
||||
isFocusInsideContent: (event?: FocusEvent) => boolean | undefined;
|
||||
updatePopper: () => void;
|
||||
onOpen: (event?: Event, delay?: number) => void;
|
||||
onClose: (event?: Event, delay?: number) => void;
|
||||
hide: (event?: Event) => void;
|
||||
}, {}, {}, {}, {
|
||||
offset: number;
|
||||
teleported: boolean;
|
||||
effect: PopperEffect;
|
||||
visible: boolean | null;
|
||||
content: string;
|
||||
style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
enterable: boolean;
|
||||
pure: boolean;
|
||||
focusOnShow: boolean;
|
||||
trapping: boolean;
|
||||
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
stopPopperMouseEvent: boolean;
|
||||
virtualTriggering: boolean;
|
||||
loop: boolean;
|
||||
boundariesPadding: number;
|
||||
gpuAcceleration: boolean;
|
||||
placement: Placement;
|
||||
popperOptions: Partial<Options>;
|
||||
strategy: "fixed" | "absolute";
|
||||
arrowOffset: number;
|
||||
showArrow: boolean;
|
||||
role: typeof roleTypes[number];
|
||||
showAfter: number;
|
||||
hideAfter: number;
|
||||
autoClose: number;
|
||||
trigger: Arrayable<TooltipTriggerType>;
|
||||
triggerKeys: string[];
|
||||
}>;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
} & _$vue.ComponentOptionsBase<Readonly<UseTooltipProps> & Readonly<{
|
||||
onClose?: ((...args: any[]) => any) | undefined;
|
||||
onHide?: ((...args: any[]) => any) | undefined;
|
||||
onShow?: ((...args: any[]) => any) | undefined;
|
||||
onOpen?: ((...args: any[]) => any) | undefined;
|
||||
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
||||
"onBefore-show"?: ((...args: any[]) => any) | undefined;
|
||||
"onBefore-hide"?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
popperRef: _$vue.Ref<PopperInstance | undefined, PopperInstance | undefined>;
|
||||
contentRef: _$vue.Ref<TooltipContentInstance | undefined, TooltipContentInstance | undefined>;
|
||||
isFocusInsideContent: (event?: FocusEvent) => boolean | undefined;
|
||||
updatePopper: () => void;
|
||||
onOpen: (event?: Event, delay?: number) => void;
|
||||
onClose: (event?: Event, delay?: number) => void;
|
||||
hide: (event?: Event) => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
||||
close: (...args: any[]) => void;
|
||||
hide: (...args: any[]) => void;
|
||||
show: (...args: any[]) => void;
|
||||
open: (...args: any[]) => void;
|
||||
"update:visible": (...args: any[]) => void;
|
||||
"before-show": (...args: any[]) => void;
|
||||
"before-hide": (...args: any[]) => void;
|
||||
}, string, {
|
||||
offset: number;
|
||||
teleported: boolean;
|
||||
effect: PopperEffect;
|
||||
visible: boolean | null;
|
||||
content: string;
|
||||
style: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
enterable: boolean;
|
||||
pure: boolean;
|
||||
focusOnShow: boolean;
|
||||
trapping: boolean;
|
||||
popperStyle: string | false | _$vue.CSSProperties | _$vue.StyleValue[] | null;
|
||||
stopPopperMouseEvent: boolean;
|
||||
virtualTriggering: boolean;
|
||||
loop: boolean;
|
||||
boundariesPadding: number;
|
||||
gpuAcceleration: boolean;
|
||||
placement: Placement;
|
||||
popperOptions: Partial<Options>;
|
||||
strategy: "fixed" | "absolute";
|
||||
arrowOffset: number;
|
||||
showArrow: boolean;
|
||||
role: typeof roleTypes[number];
|
||||
showAfter: number;
|
||||
hideAfter: number;
|
||||
autoClose: number;
|
||||
trigger: Arrayable<TooltipTriggerType>;
|
||||
triggerKeys: string[];
|
||||
}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
|
||||
$slots: {
|
||||
default?: (props: {}) => any;
|
||||
} & {
|
||||
content?: (props: {}) => any;
|
||||
};
|
||||
})>;
|
||||
ElIcon: SFCWithInstall<{
|
||||
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, _$vue.PublicProps, {}, false, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
} & _$vue.ComponentOptionsBase<Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & (new () => {
|
||||
$slots: {
|
||||
default?: (props: {}) => any;
|
||||
};
|
||||
})>;
|
||||
}, {
|
||||
ClickOutside: _$vue.ObjectDirective<HTMLElement, any, string, any>;
|
||||
}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
153
frontend/node_modules/element-plus/es/components/select/src/select.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
153
frontend/node_modules/element-plus/es/components/select/src/select.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
import { isArray, isObject } from "../../../utils/types.mjs";
|
||||
import { flattedChildren } from "../../../utils/vue/vnode.mjs";
|
||||
import { useCalcInputWidth } from "../../../hooks/use-calc-input-width/index.mjs";
|
||||
import { ElIcon } from "../../icon/index.mjs";
|
||||
import { ElTooltip } from "../../tooltip/index.mjs";
|
||||
import { ElScrollbar } from "../../scrollbar/index.mjs";
|
||||
import ClickOutside from "../../../directives/click-outside/index.mjs";
|
||||
import { ElTag } from "../../tag/index.mjs";
|
||||
import { useProps } from "../../select-v2/src/useProps.mjs";
|
||||
import { selectKey } from "./token.mjs";
|
||||
import option_default from "./option2.mjs";
|
||||
import select_dropdown_default from "./select-dropdown.mjs";
|
||||
import { useSelect } from "./useSelect.mjs";
|
||||
import options_default from "./options.mjs";
|
||||
import { selectEmits, selectProps } from "./select.mjs";
|
||||
import option_group_default from "./option-group.mjs";
|
||||
import { computed, defineComponent, getCurrentInstance, onBeforeUnmount, provide, reactive, toRefs, watch } from "vue";
|
||||
//#region ../../packages/components/select/src/select.vue?vue&type=script&lang.ts
|
||||
const COMPONENT_NAME = "ElSelect";
|
||||
const warnHandlerMap = /* @__PURE__ */ new WeakMap();
|
||||
const createSelectWarnHandler = (appContext) => {
|
||||
return (...args) => {
|
||||
const message = args[0];
|
||||
if (!message || message.includes("Slot \"default\" invoked outside of the render function") && args[2]?.includes("ElTreeSelect")) return;
|
||||
const original = warnHandlerMap.get(appContext)?.originalWarnHandler;
|
||||
if (original) {
|
||||
original(...args);
|
||||
return;
|
||||
}
|
||||
console.warn(...args);
|
||||
};
|
||||
};
|
||||
const getWarnHandlerRecord = (appContext) => {
|
||||
let record = warnHandlerMap.get(appContext);
|
||||
if (!record) {
|
||||
record = {
|
||||
originalWarnHandler: appContext.config.warnHandler,
|
||||
handler: createSelectWarnHandler(appContext),
|
||||
count: 0
|
||||
};
|
||||
warnHandlerMap.set(appContext, record);
|
||||
}
|
||||
return record;
|
||||
};
|
||||
var select_vue_vue_type_script_lang_default = defineComponent({
|
||||
name: COMPONENT_NAME,
|
||||
componentName: COMPONENT_NAME,
|
||||
components: {
|
||||
ElSelectMenu: select_dropdown_default,
|
||||
ElOption: option_default,
|
||||
ElOptions: options_default,
|
||||
ElOptionGroup: option_group_default,
|
||||
ElTag,
|
||||
ElScrollbar,
|
||||
ElTooltip,
|
||||
ElIcon
|
||||
},
|
||||
directives: { ClickOutside },
|
||||
props: selectProps,
|
||||
emits: selectEmits,
|
||||
setup(props, { emit, slots }) {
|
||||
const instance = getCurrentInstance();
|
||||
const warnRecord = getWarnHandlerRecord(instance.appContext);
|
||||
warnRecord.count += 1;
|
||||
instance.appContext.config.warnHandler = warnRecord.handler;
|
||||
const modelValue = computed(() => {
|
||||
const { modelValue: rawModelValue, multiple } = props;
|
||||
const fallback = multiple ? [] : void 0;
|
||||
if (isArray(rawModelValue)) return multiple ? rawModelValue : fallback;
|
||||
return multiple ? fallback : rawModelValue;
|
||||
});
|
||||
const _props = reactive({
|
||||
...toRefs(props),
|
||||
modelValue
|
||||
});
|
||||
const API = useSelect(_props, emit);
|
||||
const { calculatorRef, inputStyle } = useCalcInputWidth();
|
||||
const { getLabel, getValue, getOptions, getDisabled } = useProps(props);
|
||||
const getOptionProps = (option) => ({
|
||||
label: getLabel(option),
|
||||
value: getValue(option),
|
||||
disabled: getDisabled(option)
|
||||
});
|
||||
const flatTreeSelectData = (data) => {
|
||||
return data.reduce((acc, item) => {
|
||||
acc.push(item);
|
||||
if (item.children && item.children.length > 0) acc.push(...flatTreeSelectData(item.children));
|
||||
return acc;
|
||||
}, []);
|
||||
};
|
||||
const manuallyRenderSlots = (vnodes) => {
|
||||
flattedChildren(vnodes || []).forEach((item) => {
|
||||
if (isObject(item) && (item.type.name === "ElOption" || item.type.name === "ElTree")) {
|
||||
const _name = item.type.name;
|
||||
if (_name === "ElTree") flatTreeSelectData(item.props?.data || []).forEach((treeItem) => {
|
||||
treeItem.currentLabel = treeItem.label ?? (isObject(treeItem.value) ? "" : treeItem.value);
|
||||
API.onOptionCreate(treeItem);
|
||||
});
|
||||
else if (_name === "ElOption") {
|
||||
const obj = { ...item.props };
|
||||
obj.currentLabel = obj.label ?? (isObject(obj.value) ? "" : obj.value);
|
||||
API.onOptionCreate(obj);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
watch(() => [props.persistent || API.expanded.value || !slots.default ? void 0 : slots.default?.(), modelValue.value], () => {
|
||||
if (props.persistent || API.expanded.value) return;
|
||||
if (!slots.default) return;
|
||||
API.states.options.clear();
|
||||
manuallyRenderSlots(slots.default?.());
|
||||
}, { immediate: true });
|
||||
provide(selectKey, reactive({
|
||||
props: _props,
|
||||
states: API.states,
|
||||
selectRef: API.selectRef,
|
||||
optionsArray: API.optionsArray,
|
||||
setSelected: API.setSelected,
|
||||
handleOptionSelect: API.handleOptionSelect,
|
||||
onOptionCreate: API.onOptionCreate,
|
||||
onOptionDestroy: API.onOptionDestroy
|
||||
}));
|
||||
const selectedLabel = computed(() => {
|
||||
if (!props.multiple) return API.states.selectedLabel;
|
||||
return API.states.selected.map((i) => i.currentLabel);
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
const record = warnHandlerMap.get(instance.appContext);
|
||||
if (!record) return;
|
||||
record.count -= 1;
|
||||
if (record.count <= 0) {
|
||||
instance.appContext.config.warnHandler = record.originalWarnHandler;
|
||||
warnHandlerMap.delete(instance.appContext);
|
||||
}
|
||||
});
|
||||
return {
|
||||
...API,
|
||||
modelValue,
|
||||
selectedLabel,
|
||||
calculatorRef,
|
||||
inputStyle,
|
||||
getLabel,
|
||||
getValue,
|
||||
getOptions,
|
||||
getDisabled,
|
||||
getOptionProps
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { select_vue_vue_type_script_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=select.vue_vue_type_script_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/select.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/select.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
381
frontend/node_modules/element-plus/es/components/select/src/select2.mjs
generated
vendored
Normal file
381
frontend/node_modules/element-plus/es/components/select/src/select2.mjs
generated
vendored
Normal file
@@ -0,0 +1,381 @@
|
||||
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
||||
import select_vue_vue_type_script_lang_default from "./select.vue_vue_type_script_lang.mjs";
|
||||
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, mergeProps, normalizeClass, normalizeStyle, openBlock, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, toDisplayString, toHandlerKey, vShow, withCtx, withDirectives, withModifiers } from "vue";
|
||||
//#region ../../packages/components/select/src/select.vue
|
||||
const _hoisted_1 = [
|
||||
"id",
|
||||
"value",
|
||||
"name",
|
||||
"disabled",
|
||||
"autocomplete",
|
||||
"tabindex",
|
||||
"readonly",
|
||||
"aria-activedescendant",
|
||||
"aria-controls",
|
||||
"aria-expanded",
|
||||
"aria-label"
|
||||
];
|
||||
const _hoisted_2 = ["textContent"];
|
||||
const _hoisted_3 = { key: 1 };
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
const _component_el_tag = resolveComponent("el-tag");
|
||||
const _component_el_tooltip = resolveComponent("el-tooltip");
|
||||
const _component_el_icon = resolveComponent("el-icon");
|
||||
const _component_el_option = resolveComponent("el-option");
|
||||
const _component_el_option_group = resolveComponent("el-option-group");
|
||||
const _component_el_options = resolveComponent("el-options");
|
||||
const _component_el_scrollbar = resolveComponent("el-scrollbar");
|
||||
const _component_el_select_menu = resolveComponent("el-select-menu");
|
||||
const _directive_click_outside = resolveDirective("click-outside");
|
||||
return withDirectives((openBlock(), createElementBlock("div", mergeProps({
|
||||
ref: "selectRef",
|
||||
class: [_ctx.nsSelect.b(), _ctx.nsSelect.m(_ctx.selectSize)]
|
||||
}, { [toHandlerKey(_ctx.mouseEnterEventName)]: _cache[11] || (_cache[11] = ($event) => _ctx.states.inputHovering = true) }, { onMouseleave: _cache[12] || (_cache[12] = ($event) => _ctx.states.inputHovering = false) }), [createVNode(_component_el_tooltip, {
|
||||
ref: "tooltipRef",
|
||||
visible: _ctx.dropdownMenuVisible,
|
||||
placement: _ctx.placement,
|
||||
teleported: _ctx.teleported,
|
||||
"popper-class": [_ctx.nsSelect.e("popper"), _ctx.popperClass],
|
||||
"popper-style": _ctx.popperStyle,
|
||||
"popper-options": _ctx.popperOptions,
|
||||
"fallback-placements": _ctx.fallbackPlacements,
|
||||
effect: _ctx.effect,
|
||||
pure: "",
|
||||
trigger: "click",
|
||||
transition: `${_ctx.nsSelect.namespace.value}-zoom-in-top`,
|
||||
"stop-popper-mouse-event": false,
|
||||
"gpu-acceleration": false,
|
||||
persistent: _ctx.persistent,
|
||||
"append-to": _ctx.appendTo,
|
||||
"show-arrow": _ctx.showArrow,
|
||||
offset: _ctx.offset,
|
||||
onBeforeShow: _ctx.handleMenuEnter,
|
||||
onHide: _cache[10] || (_cache[10] = ($event) => _ctx.states.isBeforeHide = false)
|
||||
}, {
|
||||
default: withCtx(() => [createElementVNode("div", {
|
||||
ref: "wrapperRef",
|
||||
class: normalizeClass([
|
||||
_ctx.nsSelect.e("wrapper"),
|
||||
_ctx.nsSelect.is("focused", _ctx.isFocused),
|
||||
_ctx.nsSelect.is("hovering", _ctx.states.inputHovering),
|
||||
_ctx.nsSelect.is("filterable", _ctx.filterable),
|
||||
_ctx.nsSelect.is("disabled", _ctx.selectDisabled)
|
||||
]),
|
||||
onClick: _cache[7] || (_cache[7] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["prevent"]))
|
||||
}, [
|
||||
_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", {
|
||||
key: 0,
|
||||
ref: "prefixRef",
|
||||
class: normalizeClass(_ctx.nsSelect.e("prefix"))
|
||||
}, [renderSlot(_ctx.$slots, "prefix")], 2)) : createCommentVNode("v-if", true),
|
||||
createElementVNode("div", {
|
||||
ref: "selectionRef",
|
||||
class: normalizeClass([_ctx.nsSelect.e("selection"), _ctx.nsSelect.is("near", _ctx.multiple && !_ctx.$slots.prefix && !!_ctx.states.selected.length)])
|
||||
}, [
|
||||
_ctx.multiple ? renderSlot(_ctx.$slots, "tag", {
|
||||
key: 0,
|
||||
data: _ctx.states.selected,
|
||||
deleteTag: _ctx.deleteTag,
|
||||
selectDisabled: _ctx.selectDisabled
|
||||
}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.showTagList, (item) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
key: _ctx.getValueKey(item),
|
||||
class: normalizeClass(_ctx.nsSelect.e("selected-item"))
|
||||
}, [createVNode(_component_el_tag, {
|
||||
closable: !_ctx.selectDisabled && !item.isDisabled,
|
||||
size: _ctx.collapseTagSize,
|
||||
type: _ctx.tagType,
|
||||
effect: _ctx.tagEffect,
|
||||
"disable-transitions": "",
|
||||
style: normalizeStyle(_ctx.tagStyle),
|
||||
onClose: ($event) => _ctx.deleteTag($event, item)
|
||||
}, {
|
||||
default: withCtx(() => [createElementVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
|
||||
index: item.index,
|
||||
label: item.currentLabel,
|
||||
value: item.value
|
||||
}, () => [createTextVNode(toDisplayString(item.currentLabel), 1)])], 2)]),
|
||||
_: 2
|
||||
}, 1032, [
|
||||
"closable",
|
||||
"size",
|
||||
"type",
|
||||
"effect",
|
||||
"style",
|
||||
"onClose"
|
||||
])], 2);
|
||||
}), 128)), _ctx.collapseTags && _ctx.states.selected.length > _ctx.maxCollapseTags ? (openBlock(), createBlock(_component_el_tooltip, {
|
||||
key: 0,
|
||||
ref: "tagTooltipRef",
|
||||
disabled: _ctx.dropdownMenuVisible || !_ctx.collapseTagsTooltip,
|
||||
"fallback-placements": _ctx.tagTooltip?.fallbackPlacements ?? [
|
||||
"bottom",
|
||||
"top",
|
||||
"right",
|
||||
"left"
|
||||
],
|
||||
effect: _ctx.tagTooltip?.effect ?? _ctx.effect,
|
||||
placement: _ctx.tagTooltip?.placement ?? "bottom",
|
||||
"popper-class": _ctx.tagTooltip?.popperClass ?? _ctx.popperClass,
|
||||
"popper-style": _ctx.tagTooltip?.popperStyle ?? _ctx.popperStyle,
|
||||
teleported: _ctx.tagTooltip?.teleported ?? _ctx.teleported,
|
||||
"append-to": _ctx.tagTooltip?.appendTo ?? _ctx.appendTo,
|
||||
"popper-options": _ctx.tagTooltip?.popperOptions ?? _ctx.popperOptions,
|
||||
transition: _ctx.tagTooltip?.transition,
|
||||
"show-after": _ctx.tagTooltip?.showAfter,
|
||||
"hide-after": _ctx.tagTooltip?.hideAfter,
|
||||
"auto-close": _ctx.tagTooltip?.autoClose,
|
||||
offset: _ctx.tagTooltip?.offset
|
||||
}, {
|
||||
default: withCtx(() => [createElementVNode("div", {
|
||||
ref: "collapseItemRef",
|
||||
class: normalizeClass(_ctx.nsSelect.e("selected-item"))
|
||||
}, [createVNode(_component_el_tag, {
|
||||
closable: false,
|
||||
size: _ctx.collapseTagSize,
|
||||
type: _ctx.tagType,
|
||||
effect: _ctx.tagEffect,
|
||||
"disable-transitions": "",
|
||||
style: normalizeStyle(_ctx.collapseTagStyle)
|
||||
}, {
|
||||
default: withCtx(() => [createElementVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, " + " + toDisplayString(_ctx.states.selected.length - _ctx.maxCollapseTags), 3)]),
|
||||
_: 1
|
||||
}, 8, [
|
||||
"size",
|
||||
"type",
|
||||
"effect",
|
||||
"style"
|
||||
])], 2)]),
|
||||
content: withCtx(() => [createElementVNode("div", {
|
||||
ref: "tagMenuRef",
|
||||
class: normalizeClass(_ctx.nsSelect.e("selection"))
|
||||
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.collapseTagList, (item) => {
|
||||
return openBlock(), createElementBlock("div", {
|
||||
key: _ctx.getValueKey(item),
|
||||
class: normalizeClass(_ctx.nsSelect.e("selected-item"))
|
||||
}, [createVNode(_component_el_tag, {
|
||||
class: "in-tooltip",
|
||||
closable: !_ctx.selectDisabled && !item.isDisabled,
|
||||
size: _ctx.collapseTagSize,
|
||||
type: _ctx.tagType,
|
||||
effect: _ctx.tagEffect,
|
||||
"disable-transitions": "",
|
||||
onClose: ($event) => _ctx.deleteTag($event, item)
|
||||
}, {
|
||||
default: withCtx(() => [createElementVNode("span", { class: normalizeClass(_ctx.nsSelect.e("tags-text")) }, [renderSlot(_ctx.$slots, "label", {
|
||||
index: item.index,
|
||||
label: item.currentLabel,
|
||||
value: item.value
|
||||
}, () => [createTextVNode(toDisplayString(item.currentLabel), 1)])], 2)]),
|
||||
_: 2
|
||||
}, 1032, [
|
||||
"closable",
|
||||
"size",
|
||||
"type",
|
||||
"effect",
|
||||
"onClose"
|
||||
])], 2);
|
||||
}), 128))], 2)]),
|
||||
_: 3
|
||||
}, 8, [
|
||||
"disabled",
|
||||
"fallback-placements",
|
||||
"effect",
|
||||
"placement",
|
||||
"popper-class",
|
||||
"popper-style",
|
||||
"teleported",
|
||||
"append-to",
|
||||
"popper-options",
|
||||
"transition",
|
||||
"show-after",
|
||||
"hide-after",
|
||||
"auto-close",
|
||||
"offset"
|
||||
])) : createCommentVNode("v-if", true)]) : createCommentVNode("v-if", true),
|
||||
createElementVNode("div", { class: normalizeClass([
|
||||
_ctx.nsSelect.e("selected-item"),
|
||||
_ctx.nsSelect.e("input-wrapper"),
|
||||
_ctx.nsSelect.is("hidden", !_ctx.filterable || _ctx.selectDisabled || !_ctx.states.inputValue && !_ctx.isFocused)
|
||||
]) }, [createElementVNode("input", {
|
||||
id: _ctx.inputId,
|
||||
ref: "inputRef",
|
||||
value: _ctx.states.inputValue,
|
||||
type: "text",
|
||||
name: _ctx.name,
|
||||
class: normalizeClass([_ctx.nsSelect.e("input"), _ctx.nsSelect.is(_ctx.selectSize)]),
|
||||
disabled: _ctx.selectDisabled,
|
||||
autocomplete: _ctx.autocomplete,
|
||||
style: normalizeStyle(_ctx.inputStyle),
|
||||
tabindex: _ctx.tabindex,
|
||||
role: "combobox",
|
||||
readonly: !_ctx.filterable,
|
||||
spellcheck: "false",
|
||||
"aria-activedescendant": _ctx.hoverOption?.id || "",
|
||||
"aria-controls": _ctx.contentId,
|
||||
"aria-expanded": _ctx.dropdownMenuVisible,
|
||||
"aria-label": _ctx.ariaLabel,
|
||||
"aria-autocomplete": "none",
|
||||
"aria-haspopup": "listbox",
|
||||
onKeydown: _cache[0] || (_cache[0] = (...args) => _ctx.handleKeydown && _ctx.handleKeydown(...args)),
|
||||
onCompositionstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleCompositionStart && _ctx.handleCompositionStart(...args)),
|
||||
onCompositionupdate: _cache[2] || (_cache[2] = (...args) => _ctx.handleCompositionUpdate && _ctx.handleCompositionUpdate(...args)),
|
||||
onCompositionend: _cache[3] || (_cache[3] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args)),
|
||||
onInput: _cache[4] || (_cache[4] = (...args) => _ctx.onInput && _ctx.onInput(...args)),
|
||||
onChange: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"])),
|
||||
onClick: _cache[6] || (_cache[6] = withModifiers((...args) => _ctx.toggleMenu && _ctx.toggleMenu(...args), ["stop"]))
|
||||
}, null, 46, _hoisted_1), _ctx.filterable ? (openBlock(), createElementBlock("span", {
|
||||
key: 0,
|
||||
ref: "calculatorRef",
|
||||
"aria-hidden": "true",
|
||||
class: normalizeClass(_ctx.nsSelect.e("input-calculator")),
|
||||
textContent: toDisplayString(_ctx.states.inputValue)
|
||||
}, null, 10, _hoisted_2)) : createCommentVNode("v-if", true)], 2),
|
||||
_ctx.shouldShowPlaceholder ? (openBlock(), createElementBlock("div", {
|
||||
key: 1,
|
||||
class: normalizeClass([
|
||||
_ctx.nsSelect.e("selected-item"),
|
||||
_ctx.nsSelect.e("placeholder"),
|
||||
_ctx.nsSelect.is("transparent", !_ctx.hasModelValue || _ctx.expanded && !_ctx.states.inputValue)
|
||||
])
|
||||
}, [_ctx.hasModelValue ? renderSlot(_ctx.$slots, "label", {
|
||||
key: 0,
|
||||
index: _ctx.getOption(_ctx.modelValue).index,
|
||||
label: _ctx.currentPlaceholder,
|
||||
value: _ctx.modelValue
|
||||
}, () => [createElementVNode("span", null, toDisplayString(_ctx.currentPlaceholder), 1)]) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.currentPlaceholder), 1))], 2)) : createCommentVNode("v-if", true)
|
||||
], 2),
|
||||
createElementVNode("div", {
|
||||
ref: "suffixRef",
|
||||
class: normalizeClass(_ctx.nsSelect.e("suffix"))
|
||||
}, [
|
||||
_ctx.iconComponent && !_ctx.showClearBtn ? (openBlock(), createBlock(_component_el_icon, {
|
||||
key: 0,
|
||||
class: normalizeClass([
|
||||
_ctx.nsSelect.e("caret"),
|
||||
_ctx.nsSelect.e("icon"),
|
||||
_ctx.iconReverse
|
||||
])
|
||||
}, {
|
||||
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))]),
|
||||
_: 1
|
||||
}, 8, ["class"])) : createCommentVNode("v-if", true),
|
||||
_ctx.showClearBtn && _ctx.clearIcon ? (openBlock(), createBlock(_component_el_icon, {
|
||||
key: 1,
|
||||
class: normalizeClass([
|
||||
_ctx.nsSelect.e("caret"),
|
||||
_ctx.nsSelect.e("icon"),
|
||||
_ctx.nsSelect.e("clear")
|
||||
]),
|
||||
onClick: _ctx.handleClearClick
|
||||
}, {
|
||||
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.clearIcon)))]),
|
||||
_: 1
|
||||
}, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
|
||||
_ctx.validateState && _ctx.validateIcon && _ctx.needStatusIcon ? (openBlock(), createBlock(_component_el_icon, {
|
||||
key: 2,
|
||||
class: normalizeClass([
|
||||
_ctx.nsInput.e("icon"),
|
||||
_ctx.nsInput.e("validateIcon"),
|
||||
_ctx.nsInput.is("loading", _ctx.validateState === "validating")
|
||||
])
|
||||
}, {
|
||||
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_ctx.validateIcon)))]),
|
||||
_: 1
|
||||
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
||||
], 2)
|
||||
], 2)]),
|
||||
content: withCtx(() => [createVNode(_component_el_select_menu, { ref: "menuRef" }, {
|
||||
default: withCtx(() => [
|
||||
_ctx.$slots.header ? (openBlock(), createElementBlock("div", {
|
||||
key: 0,
|
||||
class: normalizeClass(_ctx.nsSelect.be("dropdown", "header")),
|
||||
onClick: _cache[8] || (_cache[8] = withModifiers(() => {}, ["stop"]))
|
||||
}, [renderSlot(_ctx.$slots, "header")], 2)) : createCommentVNode("v-if", true),
|
||||
withDirectives(createVNode(_component_el_scrollbar, {
|
||||
id: _ctx.contentId,
|
||||
ref: "scrollbarRef",
|
||||
tag: "ul",
|
||||
"wrap-class": _ctx.nsSelect.be("dropdown", "wrap"),
|
||||
"view-class": _ctx.nsSelect.be("dropdown", "list"),
|
||||
class: normalizeClass([_ctx.nsSelect.is("empty", _ctx.filteredOptionsCount === 0)]),
|
||||
role: "listbox",
|
||||
"aria-label": _ctx.ariaLabel,
|
||||
"aria-orientation": "vertical",
|
||||
onScroll: _ctx.popupScroll,
|
||||
onEndReached: _ctx.endReached
|
||||
}, {
|
||||
default: withCtx(() => [_ctx.showNewOption ? (openBlock(), createBlock(_component_el_option, {
|
||||
key: 0,
|
||||
value: _ctx.states.inputValue,
|
||||
created: true
|
||||
}, null, 8, ["value"])) : createCommentVNode("v-if", true), createVNode(_component_el_options, null, {
|
||||
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
|
||||
return openBlock(), createElementBlock(Fragment, { key: index }, [_ctx.getOptions(option)?.length ? (openBlock(), createBlock(_component_el_option_group, {
|
||||
key: 0,
|
||||
label: _ctx.getLabel(option),
|
||||
disabled: _ctx.getDisabled(option)
|
||||
}, {
|
||||
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.getOptions(option), (item) => {
|
||||
return openBlock(), createBlock(_component_el_option, mergeProps({ key: _ctx.getValue(item) }, { ref_for: true }, _ctx.getOptionProps(item)), null, 16);
|
||||
}), 128))]),
|
||||
_: 2
|
||||
}, 1032, ["label", "disabled"])) : (openBlock(), createBlock(_component_el_option, mergeProps({
|
||||
key: 1,
|
||||
ref_for: true
|
||||
}, _ctx.getOptionProps(option)), null, 16))], 64);
|
||||
}), 128))])]),
|
||||
_: 3
|
||||
})]),
|
||||
_: 3
|
||||
}, 8, [
|
||||
"id",
|
||||
"wrap-class",
|
||||
"view-class",
|
||||
"class",
|
||||
"aria-label",
|
||||
"onScroll",
|
||||
"onEndReached"
|
||||
]), [[vShow, _ctx.states.options.size > 0 && !_ctx.loading]]),
|
||||
_ctx.$slots.loading && _ctx.loading ? (openBlock(), createElementBlock("div", {
|
||||
key: 1,
|
||||
class: normalizeClass(_ctx.nsSelect.be("dropdown", "loading"))
|
||||
}, [renderSlot(_ctx.$slots, "loading")], 2)) : _ctx.loading || _ctx.filteredOptionsCount === 0 ? (openBlock(), createElementBlock("div", {
|
||||
key: 2,
|
||||
class: normalizeClass(_ctx.nsSelect.be("dropdown", "empty"))
|
||||
}, [renderSlot(_ctx.$slots, "empty", {}, () => [createElementVNode("span", null, toDisplayString(_ctx.emptyText), 1)])], 2)) : createCommentVNode("v-if", true),
|
||||
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
||||
key: 3,
|
||||
class: normalizeClass(_ctx.nsSelect.be("dropdown", "footer")),
|
||||
onClick: _cache[9] || (_cache[9] = withModifiers(() => {}, ["stop"]))
|
||||
}, [renderSlot(_ctx.$slots, "footer")], 2)) : createCommentVNode("v-if", true)
|
||||
]),
|
||||
_: 3
|
||||
}, 512)]),
|
||||
_: 3
|
||||
}, 8, [
|
||||
"visible",
|
||||
"placement",
|
||||
"teleported",
|
||||
"popper-class",
|
||||
"popper-style",
|
||||
"popper-options",
|
||||
"fallback-placements",
|
||||
"effect",
|
||||
"transition",
|
||||
"persistent",
|
||||
"append-to",
|
||||
"show-arrow",
|
||||
"offset",
|
||||
"onBeforeShow"
|
||||
])], 16)), [[
|
||||
_directive_click_outside,
|
||||
_ctx.handleClickOutside,
|
||||
_ctx.popperRef
|
||||
]]);
|
||||
}
|
||||
var select_default = /* @__PURE__ */ _plugin_vue_export_helper_default(select_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
||||
//#endregion
|
||||
export { select_default as default };
|
||||
|
||||
//# sourceMappingURL=select2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/select2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/select2.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
8
frontend/node_modules/element-plus/es/components/select/src/token.d.ts
generated
vendored
Normal file
8
frontend/node_modules/element-plus/es/components/select/src/token.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { SelectContext, SelectGroupContext } from "./type.js";
|
||||
import { InjectionKey } from "vue";
|
||||
|
||||
//#region ../../packages/components/select/src/token.d.ts
|
||||
declare const selectGroupKey: InjectionKey<SelectGroupContext>;
|
||||
declare const selectKey: InjectionKey<SelectContext>;
|
||||
//#endregion
|
||||
export { selectGroupKey, selectKey };
|
||||
7
frontend/node_modules/element-plus/es/components/select/src/token.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/select/src/token.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
//#region ../../packages/components/select/src/token.ts
|
||||
const selectGroupKey = Symbol("ElSelectGroup");
|
||||
const selectKey = Symbol("ElSelect");
|
||||
//#endregion
|
||||
export { selectGroupKey, selectKey };
|
||||
|
||||
//# sourceMappingURL=token.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/token.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/token.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"token.mjs","names":[],"sources":["../../../../../../packages/components/select/src/token.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport type { SelectContext, SelectGroupContext } from './type'\n\n// For individual build sharing injection key, we had to make `Symbol` to string\nexport const selectGroupKey: InjectionKey<SelectGroupContext> =\n Symbol('ElSelectGroup')\n\nexport const selectKey: InjectionKey<SelectContext> = Symbol('ElSelect')\n"],"mappings":";AAIA,MAAa,iBACX,OAAO,gBAAgB;AAEzB,MAAa,YAAyC,OAAO,WAAW"}
|
||||
70
frontend/node_modules/element-plus/es/components/select/src/type.d.ts
generated
vendored
Normal file
70
frontend/node_modules/element-plus/es/components/select/src/type.d.ts
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
import { SelectProps } from "./select.js";
|
||||
import { optionProps } from "./option.js";
|
||||
import { ComponentInternalInstance, ComponentPublicInstance, ComputedRef, ExtractPropTypes, ExtractPublicPropTypes, Ref } from "vue";
|
||||
|
||||
//#region ../../packages/components/select/src/type.d.ts
|
||||
interface SelectGroupContext {
|
||||
disabled: boolean;
|
||||
}
|
||||
interface SelectContext {
|
||||
props: SelectProps;
|
||||
states: SelectStates;
|
||||
selectRef: HTMLElement | undefined;
|
||||
optionsArray: OptionPublicInstance[];
|
||||
setSelected(): void;
|
||||
onOptionCreate(vm: OptionPublicInstance): void;
|
||||
onOptionDestroy(key: OptionValue, vm: OptionPublicInstance): void;
|
||||
handleOptionSelect(vm: OptionPublicInstance): void;
|
||||
}
|
||||
type SelectStates = {
|
||||
inputValue: string;
|
||||
options: Map<OptionValue, OptionPublicInstance>;
|
||||
cachedOptions: Map<OptionValue, OptionPublicInstance>;
|
||||
optionValues: OptionValue[];
|
||||
selected: OptionBasic[];
|
||||
hoveringIndex: number;
|
||||
inputHovering: boolean;
|
||||
selectionWidth: number;
|
||||
collapseItemWidth: number;
|
||||
previousQuery: string | null;
|
||||
selectedLabel: string;
|
||||
menuVisibleOnFocus: boolean;
|
||||
isBeforeHide: boolean;
|
||||
};
|
||||
type OptionProps = ExtractPropTypes<typeof optionProps>;
|
||||
type OptionPropsPublic = ExtractPublicPropTypes<typeof optionProps>;
|
||||
interface OptionStates {
|
||||
index: number;
|
||||
groupDisabled: boolean;
|
||||
visible: boolean;
|
||||
hover: boolean;
|
||||
}
|
||||
interface OptionExposed {
|
||||
ns: unknown;
|
||||
id: unknown;
|
||||
containerKls: unknown;
|
||||
currentLabel: ComputedRef<string | number | boolean>;
|
||||
itemSelected: ComputedRef<boolean>;
|
||||
isDisabled: ComputedRef<boolean>;
|
||||
visible: Ref<boolean>;
|
||||
hover: Ref<boolean>;
|
||||
states: OptionStates;
|
||||
select: SelectContext;
|
||||
hoverItem: () => void;
|
||||
handleMousedown: (event: MouseEvent) => void;
|
||||
updateOption: (query: string) => void;
|
||||
selectOptionClick: () => void;
|
||||
}
|
||||
type OptionPublicInstance = ComponentPublicInstance<OptionProps, OptionExposed>;
|
||||
type OptionInternalInstance = ComponentInternalInstance & {
|
||||
proxy: OptionPublicInstance;
|
||||
};
|
||||
type OptionValue = OptionProps['value'];
|
||||
type OptionBasic = {
|
||||
index: number;
|
||||
value: OptionValue;
|
||||
currentLabel: OptionPublicInstance['currentLabel'];
|
||||
isDisabled?: OptionPublicInstance['isDisabled'];
|
||||
};
|
||||
//#endregion
|
||||
export { OptionBasic, OptionExposed, OptionInternalInstance, OptionProps, OptionPropsPublic, OptionPublicInstance, OptionStates, OptionValue, SelectContext, SelectGroupContext, SelectStates };
|
||||
0
frontend/node_modules/element-plus/es/components/select/src/type.mjs
generated
vendored
Normal file
0
frontend/node_modules/element-plus/es/components/select/src/type.mjs
generated
vendored
Normal file
16
frontend/node_modules/element-plus/es/components/select/src/useOption.d.ts
generated
vendored
Normal file
16
frontend/node_modules/element-plus/es/components/select/src/useOption.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { OptionProps, OptionStates, SelectContext } from "./type.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/select/src/useOption.d.ts
|
||||
declare function useOption(props: OptionProps, states: OptionStates): {
|
||||
select: SelectContext;
|
||||
currentLabel: _$vue.ComputedRef<boolean | EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
currentValue: _$vue.ComputedRef<true | Record<string, any> | EpPropMergeType<(StringConstructor | NumberConstructor)[], unknown, unknown>>;
|
||||
itemSelected: _$vue.ComputedRef<boolean>;
|
||||
isDisabled: _$vue.ComputedRef<boolean>;
|
||||
hoverItem: () => void;
|
||||
updateOption: (query: string) => void;
|
||||
};
|
||||
//#endregion
|
||||
export { useOption };
|
||||
78
frontend/node_modules/element-plus/es/components/select/src/useOption.mjs
generated
vendored
Normal file
78
frontend/node_modules/element-plus/es/components/select/src/useOption.mjs
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
import { isObject } from "../../../utils/types.mjs";
|
||||
import { escapeStringRegexp } from "../../../utils/strings.mjs";
|
||||
import { throwError } from "../../../utils/error.mjs";
|
||||
import { ensureArray } from "../../../utils/arrays.mjs";
|
||||
import { selectGroupKey, selectKey } from "./token.mjs";
|
||||
import { COMPONENT_NAME } from "./option.mjs";
|
||||
import { get, isEqual } from "lodash-unified";
|
||||
import { computed, getCurrentInstance, inject, toRaw, watch } from "vue";
|
||||
//#region ../../packages/components/select/src/useOption.ts
|
||||
function useOption(props, states) {
|
||||
const select = inject(selectKey);
|
||||
if (!select) throwError(COMPONENT_NAME, "usage: <el-select><el-option /></el-select/>");
|
||||
const selectGroup = inject(selectGroupKey, { disabled: false });
|
||||
const itemSelected = computed(() => {
|
||||
return contains(ensureArray(select.props.modelValue), props.value);
|
||||
});
|
||||
const limitReached = computed(() => {
|
||||
if (select.props.multiple) {
|
||||
const modelValue = ensureArray(select.props.modelValue ?? []);
|
||||
return !itemSelected.value && modelValue.length >= select.props.multipleLimit && select.props.multipleLimit > 0;
|
||||
} else return false;
|
||||
});
|
||||
const currentLabel = computed(() => {
|
||||
return props.label ?? (isObject(props.value) ? "" : props.value);
|
||||
});
|
||||
const currentValue = computed(() => {
|
||||
return props.value || props.label || "";
|
||||
});
|
||||
const isDisabled = computed(() => {
|
||||
return props.disabled || states.groupDisabled || limitReached.value;
|
||||
});
|
||||
const instance = getCurrentInstance();
|
||||
const contains = (arr = [], target) => {
|
||||
if (!isObject(props.value)) return arr && arr.includes(target);
|
||||
else {
|
||||
const valueKey = select.props.valueKey;
|
||||
return arr && arr.some((item) => {
|
||||
return toRaw(get(item, valueKey)) === get(target, valueKey);
|
||||
});
|
||||
}
|
||||
};
|
||||
const hoverItem = () => {
|
||||
if (!isDisabled.value) select.states.hoveringIndex = select.optionsArray.indexOf(instance.proxy);
|
||||
};
|
||||
const updateOption = (query) => {
|
||||
states.visible = new RegExp(escapeStringRegexp(query), "i").test(String(currentLabel.value)) || props.created;
|
||||
};
|
||||
watch(() => currentLabel.value, () => {
|
||||
if (!props.created && !select.props.remote) select.setSelected();
|
||||
});
|
||||
watch(() => props.value, (val, oldVal) => {
|
||||
const { remote, valueKey } = select.props;
|
||||
if (remote ? val !== oldVal : !isEqual(val, oldVal)) {
|
||||
select.onOptionDestroy(oldVal, instance.proxy);
|
||||
select.onOptionCreate(instance.proxy);
|
||||
}
|
||||
if (!props.created && !remote) {
|
||||
if (valueKey && isObject(val) && isObject(oldVal) && val[valueKey] === oldVal[valueKey]) return;
|
||||
select.setSelected();
|
||||
}
|
||||
});
|
||||
watch(() => selectGroup.disabled, () => {
|
||||
states.groupDisabled = selectGroup.disabled;
|
||||
}, { immediate: true });
|
||||
return {
|
||||
select,
|
||||
currentLabel,
|
||||
currentValue,
|
||||
itemSelected,
|
||||
isDisabled,
|
||||
hoverItem,
|
||||
updateOption
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
export { useOption };
|
||||
|
||||
//# sourceMappingURL=useOption.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/useOption.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/useOption.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
166
frontend/node_modules/element-plus/es/components/select/src/useSelect.d.ts
generated
vendored
Normal file
166
frontend/node_modules/element-plus/es/components/select/src/useSelect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
import { EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { TooltipInstance } from "../../tooltip/src/tooltip.js";
|
||||
import { ScrollbarDirection, ScrollbarInstance } from "../../scrollbar/src/scrollbar.js";
|
||||
import { SelectEmits, SelectProps } from "./select.js";
|
||||
import { OptionBasic, OptionPublicInstance, OptionValue, SelectStates } from "./type.js";
|
||||
import * as _$vue from "vue";
|
||||
import { Component } from "vue";
|
||||
import * as _$_vueuse_core0 from "@vueuse/core";
|
||||
|
||||
//#region ../../packages/components/select/src/useSelect.d.ts
|
||||
declare const useSelect: (props: SelectProps, emit: SelectEmits) => {
|
||||
inputId: _$vue.Ref<string | undefined, string | undefined>;
|
||||
contentId: _$vue.Ref<string, string>;
|
||||
nsSelect: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
nsInput: {
|
||||
namespace: _$vue.ComputedRef<string>;
|
||||
b: (blockSuffix?: string) => string;
|
||||
e: (element?: string) => string;
|
||||
m: (modifier?: string) => string;
|
||||
be: (blockSuffix?: string, element?: string) => string;
|
||||
em: (element?: string, modifier?: string) => string;
|
||||
bm: (blockSuffix?: string, modifier?: string) => string;
|
||||
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
||||
is: {
|
||||
(name: string, state: boolean | undefined): string;
|
||||
(name: string): string;
|
||||
};
|
||||
cssVar: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarName: (name: string) => string;
|
||||
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
||||
cssVarBlockName: (name: string) => string;
|
||||
};
|
||||
states: {
|
||||
inputValue: string;
|
||||
options: Map<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>, OptionPublicInstance> & Omit<Map<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>, OptionPublicInstance>, keyof Map<any, any>>;
|
||||
cachedOptions: Map<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>, OptionPublicInstance> & Omit<Map<EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>, OptionPublicInstance>, keyof Map<any, any>>;
|
||||
optionValues: OptionValue[];
|
||||
selected: {
|
||||
index: number;
|
||||
value: OptionValue;
|
||||
currentLabel: OptionPublicInstance["currentLabel"];
|
||||
isDisabled?: OptionPublicInstance["isDisabled"] | undefined;
|
||||
}[];
|
||||
hoveringIndex: number;
|
||||
inputHovering: boolean;
|
||||
selectionWidth: number;
|
||||
collapseItemWidth: number;
|
||||
previousQuery: string | null;
|
||||
selectedLabel: string;
|
||||
menuVisibleOnFocus: boolean;
|
||||
isBeforeHide: boolean;
|
||||
};
|
||||
isFocused: _$vue.Ref<boolean, boolean>;
|
||||
expanded: _$vue.Ref<boolean, boolean>;
|
||||
optionsArray: _$vue.ComputedRef<OptionPublicInstance[]>;
|
||||
hoverOption: _$vue.Ref<any, any>;
|
||||
selectSize: _$vue.ComputedRef<"" | "default" | "small" | "large">;
|
||||
filteredOptionsCount: _$vue.ComputedRef<number>;
|
||||
updateTooltip: () => void;
|
||||
updateTagTooltip: () => void;
|
||||
debouncedOnInputChange: _$_vueuse_core0.UseDebounceFnReturn<() => void>;
|
||||
onInput: (event: Event) => void;
|
||||
deletePrevTag: (e: KeyboardEvent) => void;
|
||||
deleteTag: (event: MouseEvent, tag: OptionBasic) => void;
|
||||
deleteSelected: (event: Event) => void;
|
||||
handleOptionSelect: (option: OptionPublicInstance) => void;
|
||||
scrollToOption: (option: OptionPublicInstance | OptionPublicInstance[] | SelectStates["selected"]) => void;
|
||||
hasModelValue: _$vue.ComputedRef<boolean>;
|
||||
shouldShowPlaceholder: _$vue.ComputedRef<boolean>;
|
||||
currentPlaceholder: _$vue.ComputedRef<string>;
|
||||
mouseEnterEventName: string | null;
|
||||
needStatusIcon: _$vue.ComputedRef<boolean>;
|
||||
showClearBtn: _$vue.ComputedRef<boolean>;
|
||||
iconComponent: _$vue.ComputedRef<EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | (((new (...args: any[]) => (string | Component) & {}) | (() => string | Component)) | null)[], unknown, unknown>>;
|
||||
iconReverse: _$vue.ComputedRef<string>;
|
||||
validateState: _$vue.ComputedRef<"" | "error" | "success" | "validating">;
|
||||
validateIcon: _$vue.ComputedRef<"" | Component>;
|
||||
showNewOption: _$vue.ComputedRef<boolean>;
|
||||
updateOptions: () => void;
|
||||
collapseTagSize: _$vue.ComputedRef<"default" | "small">;
|
||||
setSelected: () => void;
|
||||
selectDisabled: _$vue.ComputedRef<boolean>;
|
||||
emptyText: _$vue.ComputedRef<string | null>;
|
||||
handleCompositionStart: (event: CompositionEvent) => void;
|
||||
handleCompositionUpdate: (event: CompositionEvent) => void;
|
||||
handleCompositionEnd: (event: CompositionEvent) => void;
|
||||
handleKeydown: (e: KeyboardEvent) => void;
|
||||
onOptionCreate: (vm: OptionPublicInstance) => void;
|
||||
onOptionDestroy: (key: OptionValue, vm: OptionPublicInstance) => void;
|
||||
handleMenuEnter: () => void;
|
||||
focus: () => void;
|
||||
blur: () => void;
|
||||
handleClearClick: (event: Event) => void;
|
||||
handleClickOutside: (event: Event) => void;
|
||||
handleEsc: () => void;
|
||||
toggleMenu: (event?: Event) => void;
|
||||
selectOption: () => void;
|
||||
getValueKey: (item: OptionPublicInstance | SelectStates["selected"][0]) => any;
|
||||
navigateOptions: (direction: "prev" | "next") => void;
|
||||
dropdownMenuVisible: _$vue.WritableComputedRef<boolean, boolean>;
|
||||
showTagList: _$vue.ComputedRef<{
|
||||
index: number;
|
||||
value: OptionValue;
|
||||
currentLabel: OptionPublicInstance["currentLabel"];
|
||||
isDisabled?: OptionPublicInstance["isDisabled"] | undefined;
|
||||
}[]>;
|
||||
collapseTagList: _$vue.ComputedRef<{
|
||||
index: number;
|
||||
value: OptionValue;
|
||||
currentLabel: OptionPublicInstance["currentLabel"];
|
||||
isDisabled?: OptionPublicInstance["isDisabled"] | undefined;
|
||||
}[]>;
|
||||
popupScroll: (data: {
|
||||
scrollTop: number;
|
||||
scrollLeft: number;
|
||||
}) => void;
|
||||
getOption: (value: OptionValue) => {
|
||||
index: number;
|
||||
value: EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
||||
currentLabel: any;
|
||||
} | {
|
||||
index: number;
|
||||
value: EpPropMergeType<(BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[], unknown, unknown>;
|
||||
currentLabel: string | number | boolean;
|
||||
readonly isDisabled: boolean;
|
||||
};
|
||||
endReached: (direction: ScrollbarDirection) => void;
|
||||
tagStyle: _$vue.ComputedRef<{
|
||||
maxWidth: string;
|
||||
}>;
|
||||
collapseTagStyle: _$vue.ComputedRef<{
|
||||
maxWidth: string;
|
||||
}>;
|
||||
popperRef: _$vue.ComputedRef<HTMLElement | undefined>;
|
||||
inputRef: _$vue.Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
||||
tooltipRef: _$vue.Ref<TooltipInstance | undefined, TooltipInstance | undefined>;
|
||||
tagTooltipRef: _$vue.Ref<TooltipInstance | undefined, TooltipInstance | undefined>;
|
||||
prefixRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
suffixRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
selectRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
wrapperRef: _$vue.ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
selectionRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
scrollbarRef: _$vue.Ref<ScrollbarInstance | undefined, ScrollbarInstance | undefined>;
|
||||
menuRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
tagMenuRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
collapseItemRef: _$vue.Ref<HTMLElement | undefined, HTMLElement | undefined>;
|
||||
};
|
||||
//#endregion
|
||||
export { useSelect };
|
||||
634
frontend/node_modules/element-plus/es/components/select/src/useSelect.mjs
generated
vendored
Normal file
634
frontend/node_modules/element-plus/es/components/select/src/useSelect.mjs
generated
vendored
Normal file
@@ -0,0 +1,634 @@
|
||||
import { EVENT_CODE } from "../../../constants/aria.mjs";
|
||||
import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from "../../../constants/event.mjs";
|
||||
import "../../../constants/form.mjs";
|
||||
import { isClient as isClient$1, isIOS } from "../../../utils/browser.mjs";
|
||||
import { getEventCode } from "../../../utils/dom/event.mjs";
|
||||
import { isArray, isEmpty, isFunction, isNumber, isObject, isPlainObject as isPlainObject$1, isUndefined as isUndefined$1 } from "../../../utils/types.mjs";
|
||||
import { scrollIntoView } from "../../../utils/dom/scroll.mjs";
|
||||
import { ValidateComponentsMap } from "../../../utils/vue/icon.mjs";
|
||||
import { NOOP } from "../../../utils/functions.mjs";
|
||||
import { ensureArray } from "../../../utils/arrays.mjs";
|
||||
import { useLocale } from "../../../hooks/use-locale/index.mjs";
|
||||
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
||||
import { useId } from "../../../hooks/use-id/index.mjs";
|
||||
import { useFocusController } from "../../../hooks/use-focus-controller/index.mjs";
|
||||
import { useComposition } from "../../../hooks/use-composition/index.mjs";
|
||||
import { useEmptyValues } from "../../../hooks/use-empty-values/index.mjs";
|
||||
import { useFormDisabled, useFormSize } from "../../form/src/hooks/use-form-common-props.mjs";
|
||||
import { useFormItem, useFormItemInputId } from "../../form/src/hooks/use-form-item.mjs";
|
||||
import { useDebounceFn, useResizeObserver } from "@vueuse/core";
|
||||
import { clamp as clamp$1, findLastIndex, get, isEqual, isNil } from "lodash-unified";
|
||||
import { computed, nextTick, onMounted, reactive, ref, useSlots, watch, watchEffect } from "vue";
|
||||
//#region ../../packages/components/select/src/useSelect.ts
|
||||
const useSelect = (props, emit) => {
|
||||
const { t } = useLocale();
|
||||
const slots = useSlots();
|
||||
const contentId = useId();
|
||||
const nsSelect = useNamespace("select");
|
||||
const nsInput = useNamespace("input");
|
||||
const states = reactive({
|
||||
inputValue: "",
|
||||
options: /* @__PURE__ */ new Map(),
|
||||
cachedOptions: /* @__PURE__ */ new Map(),
|
||||
optionValues: [],
|
||||
selected: [],
|
||||
selectionWidth: 0,
|
||||
collapseItemWidth: 0,
|
||||
selectedLabel: "",
|
||||
hoveringIndex: -1,
|
||||
previousQuery: null,
|
||||
inputHovering: false,
|
||||
menuVisibleOnFocus: false,
|
||||
isBeforeHide: false
|
||||
});
|
||||
const selectRef = ref();
|
||||
const selectionRef = ref();
|
||||
const tooltipRef = ref();
|
||||
const tagTooltipRef = ref();
|
||||
const inputRef = ref();
|
||||
const prefixRef = ref();
|
||||
const suffixRef = ref();
|
||||
const menuRef = ref();
|
||||
const tagMenuRef = ref();
|
||||
const collapseItemRef = ref();
|
||||
const scrollbarRef = ref();
|
||||
const expanded = ref(false);
|
||||
const hoverOption = ref();
|
||||
const debouncing = ref(false);
|
||||
const { form, formItem } = useFormItem();
|
||||
const { inputId } = useFormItemInputId(props, { formItemContext: formItem });
|
||||
const { valueOnClear, isEmptyValue } = useEmptyValues(props);
|
||||
const { isComposing, handleCompositionStart, handleCompositionUpdate, handleCompositionEnd } = useComposition({ afterComposition: (e) => onInput(e) });
|
||||
const selectDisabled = useFormDisabled();
|
||||
const { wrapperRef, isFocused, handleBlur } = useFocusController(inputRef, {
|
||||
disabled: selectDisabled,
|
||||
afterFocus() {
|
||||
if (props.automaticDropdown && !expanded.value) {
|
||||
expanded.value = true;
|
||||
states.menuVisibleOnFocus = true;
|
||||
}
|
||||
},
|
||||
beforeBlur(event) {
|
||||
return tooltipRef.value?.isFocusInsideContent(event) || tagTooltipRef.value?.isFocusInsideContent(event);
|
||||
},
|
||||
afterBlur() {
|
||||
expanded.value = false;
|
||||
states.menuVisibleOnFocus = false;
|
||||
if (props.validateEvent) formItem?.validate?.("blur").catch(NOOP);
|
||||
}
|
||||
});
|
||||
const hasModelValue = computed(() => {
|
||||
return isArray(props.modelValue) ? props.modelValue.length > 0 : !isEmptyValue(props.modelValue);
|
||||
});
|
||||
const needStatusIcon = computed(() => form?.statusIcon ?? false);
|
||||
const showClearBtn = computed(() => {
|
||||
return props.clearable && !selectDisabled.value && hasModelValue.value && (isFocused.value || states.inputHovering);
|
||||
});
|
||||
const iconComponent = computed(() => props.remote && props.filterable && !props.remoteShowSuffix ? "" : props.suffixIcon);
|
||||
const iconReverse = computed(() => nsSelect.is("reverse", !!(iconComponent.value && expanded.value)));
|
||||
const validateState = computed(() => formItem?.validateState || "");
|
||||
const validateIcon = computed(() => validateState.value && ValidateComponentsMap[validateState.value]);
|
||||
const debounce = computed(() => props.remote ? props.debounce : 0);
|
||||
const isRemoteSearchEmpty = computed(() => props.remote && !states.inputValue && states.options.size === 0);
|
||||
const emptyText = computed(() => {
|
||||
if (props.loading) return props.loadingText || t("el.select.loading");
|
||||
else {
|
||||
if (props.filterable && states.inputValue && states.options.size > 0 && filteredOptionsCount.value === 0) return props.noMatchText || t("el.select.noMatch");
|
||||
if (states.options.size === 0) return props.noDataText || t("el.select.noData");
|
||||
}
|
||||
return null;
|
||||
});
|
||||
const filteredOptionsCount = computed(() => optionsArray.value.filter((option) => option.visible).length);
|
||||
const optionsArray = computed(() => {
|
||||
const list = Array.from(states.options.values());
|
||||
const newList = [];
|
||||
states.optionValues.forEach((item) => {
|
||||
const index = list.findIndex((i) => i.value === item);
|
||||
if (index > -1) newList.push(list[index]);
|
||||
});
|
||||
return newList.length >= list.length ? newList : list;
|
||||
});
|
||||
const cachedOptionsArray = computed(() => Array.from(states.cachedOptions.values()));
|
||||
const showNewOption = computed(() => {
|
||||
const hasExistingOption = optionsArray.value.filter((option) => {
|
||||
return !option.created;
|
||||
}).some((option) => {
|
||||
return option.currentLabel === states.inputValue;
|
||||
});
|
||||
return props.filterable && props.allowCreate && states.inputValue !== "" && !hasExistingOption;
|
||||
});
|
||||
const updateOptions = () => {
|
||||
if (props.filterable && isFunction(props.filterMethod)) return;
|
||||
if (props.filterable && props.remote && isFunction(props.remoteMethod)) return;
|
||||
optionsArray.value.forEach((option) => {
|
||||
option.updateOption?.(states.inputValue);
|
||||
});
|
||||
};
|
||||
const selectSize = useFormSize();
|
||||
const collapseTagSize = computed(() => ["small"].includes(selectSize.value) ? "small" : "default");
|
||||
const dropdownMenuVisible = computed({
|
||||
get() {
|
||||
return expanded.value && (props.loading || !isRemoteSearchEmpty.value || props.remote && !!slots.empty) && (!debouncing.value || !isEmpty(states.previousQuery) || states.options.size > 0);
|
||||
},
|
||||
set(val) {
|
||||
expanded.value = val;
|
||||
}
|
||||
});
|
||||
const shouldShowPlaceholder = computed(() => {
|
||||
if (props.multiple && !isUndefined$1(props.modelValue)) return ensureArray(props.modelValue).length === 0 && !states.inputValue;
|
||||
const value = isArray(props.modelValue) ? props.modelValue[0] : props.modelValue;
|
||||
return props.filterable || isUndefined$1(value) ? !states.inputValue : true;
|
||||
});
|
||||
const currentPlaceholder = computed(() => {
|
||||
const _placeholder = props.placeholder ?? t("el.select.placeholder");
|
||||
return props.multiple || !hasModelValue.value ? _placeholder : states.selectedLabel;
|
||||
});
|
||||
const mouseEnterEventName = isIOS ? null : "mouseenter";
|
||||
watch(() => props.modelValue, (val, oldVal) => {
|
||||
if (props.multiple) {
|
||||
if (props.filterable && !props.reserveKeyword) {
|
||||
states.inputValue = "";
|
||||
handleQueryChange("");
|
||||
}
|
||||
}
|
||||
setSelected();
|
||||
if (!isEqual(val, oldVal) && props.validateEvent) formItem?.validate("change").catch(NOOP);
|
||||
}, {
|
||||
flush: "post",
|
||||
deep: true
|
||||
});
|
||||
watch(() => expanded.value, (val) => {
|
||||
if (val) handleQueryChange(states.inputValue);
|
||||
else {
|
||||
states.inputValue = "";
|
||||
states.previousQuery = null;
|
||||
states.isBeforeHide = true;
|
||||
states.menuVisibleOnFocus = false;
|
||||
}
|
||||
});
|
||||
watch(() => states.options.entries(), () => {
|
||||
if (!isClient$1) return;
|
||||
setSelected();
|
||||
if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) checkDefaultFirstOption();
|
||||
}, { flush: "post" });
|
||||
watch([() => states.hoveringIndex, optionsArray], ([val]) => {
|
||||
if (isNumber(val) && val > -1) hoverOption.value = optionsArray.value[val] || {};
|
||||
else hoverOption.value = {};
|
||||
optionsArray.value.forEach((option) => {
|
||||
option.hover = hoverOption.value === option;
|
||||
});
|
||||
});
|
||||
watchEffect(() => {
|
||||
if (states.isBeforeHide) return;
|
||||
updateOptions();
|
||||
});
|
||||
const handleQueryChange = (val) => {
|
||||
if (states.previousQuery === val || isComposing.value) return;
|
||||
states.previousQuery = val;
|
||||
if (props.filterable && isFunction(props.filterMethod)) props.filterMethod(val);
|
||||
else if (props.filterable && props.remote && isFunction(props.remoteMethod)) props.remoteMethod(val);
|
||||
if (props.defaultFirstOption && (props.filterable || props.remote) && filteredOptionsCount.value) nextTick(checkDefaultFirstOption);
|
||||
else nextTick(updateHoveringIndex);
|
||||
};
|
||||
/**
|
||||
* find and highlight first option as default selected
|
||||
* @remark
|
||||
* - if the first option in dropdown list is user-created,
|
||||
* it would be at the end of the optionsArray
|
||||
* so find it and set hover.
|
||||
* (NOTE: there must be only one user-created option in dropdown list with query)
|
||||
* - if there's no user-created option in list, just find the first one as usual
|
||||
* (NOTE: exclude options that are disabled or in disabled-group)
|
||||
*/
|
||||
const checkDefaultFirstOption = () => {
|
||||
const optionsInDropdown = optionsArray.value.filter((n) => n.visible && !n.disabled && !n.states.groupDisabled);
|
||||
const userCreatedOption = optionsInDropdown.find((n) => n.created);
|
||||
const firstOriginOption = optionsInDropdown[0];
|
||||
states.hoveringIndex = getValueIndex(optionsArray.value.map((item) => item.value), userCreatedOption || firstOriginOption);
|
||||
};
|
||||
const setSelected = () => {
|
||||
if (!props.multiple) {
|
||||
const option = getOption(isArray(props.modelValue) ? props.modelValue[0] : props.modelValue);
|
||||
states.selectedLabel = option.currentLabel;
|
||||
states.selected = [option];
|
||||
return;
|
||||
} else states.selectedLabel = "";
|
||||
const result = [];
|
||||
if (!isUndefined$1(props.modelValue)) ensureArray(props.modelValue).forEach((value) => {
|
||||
result.push(getOption(value));
|
||||
});
|
||||
states.selected = result;
|
||||
};
|
||||
const getOption = (value) => {
|
||||
let option;
|
||||
const isObjectValue = isPlainObject$1(value);
|
||||
for (let i = states.cachedOptions.size - 1; i >= 0; i--) {
|
||||
const cachedOption = cachedOptionsArray.value[i];
|
||||
if (isObjectValue ? get(cachedOption.value, props.valueKey) === get(value, props.valueKey) : cachedOption.value === value) {
|
||||
option = {
|
||||
index: optionsArray.value.filter((opt) => !opt.created).indexOf(cachedOption),
|
||||
value,
|
||||
currentLabel: cachedOption.currentLabel,
|
||||
get isDisabled() {
|
||||
return cachedOption.isDisabled;
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (option) return option;
|
||||
const existingSelected = states.selected.find((item) => isObjectValue ? get(item.value, props.valueKey) === get(value, props.valueKey) : item.value === value);
|
||||
return {
|
||||
index: -1,
|
||||
value,
|
||||
currentLabel: isObjectValue ? value.label : existingSelected ? existingSelected.currentLabel : value ?? ""
|
||||
};
|
||||
};
|
||||
const updateHoveringIndex = () => {
|
||||
const length = states.selected.length;
|
||||
if (length > 0) {
|
||||
const lastOption = states.selected[length - 1];
|
||||
states.hoveringIndex = optionsArray.value.findIndex((item) => getValueKey(lastOption) === getValueKey(item));
|
||||
} else states.hoveringIndex = -1;
|
||||
};
|
||||
const resetSelectionWidth = () => {
|
||||
states.selectionWidth = Number.parseFloat(window.getComputedStyle(selectionRef.value).width);
|
||||
};
|
||||
const resetCollapseItemWidth = () => {
|
||||
states.collapseItemWidth = collapseItemRef.value.getBoundingClientRect().width;
|
||||
};
|
||||
const updateTooltip = () => {
|
||||
tooltipRef.value?.updatePopper?.();
|
||||
};
|
||||
const updateTagTooltip = () => {
|
||||
tagTooltipRef.value?.updatePopper?.();
|
||||
};
|
||||
const onInputChange = () => {
|
||||
if (states.inputValue.length > 0 && !expanded.value) expanded.value = true;
|
||||
handleQueryChange(states.inputValue);
|
||||
};
|
||||
const onInput = (event) => {
|
||||
states.inputValue = event.target.value;
|
||||
if (props.remote) {
|
||||
debouncing.value = true;
|
||||
debouncedOnInputChange();
|
||||
} else return onInputChange();
|
||||
};
|
||||
const debouncedOnInputChange = useDebounceFn(() => {
|
||||
onInputChange();
|
||||
debouncing.value = false;
|
||||
}, debounce);
|
||||
const emitChange = (val) => {
|
||||
if (!isEqual(props.modelValue, val)) emit(CHANGE_EVENT, val);
|
||||
};
|
||||
const getLastNotDisabledIndex = (value) => findLastIndex(value, (it) => {
|
||||
const option = states.cachedOptions.get(it);
|
||||
return !option?.disabled && !option?.states.groupDisabled;
|
||||
});
|
||||
const deletePrevTag = (e) => {
|
||||
const code = getEventCode(e);
|
||||
if (!props.multiple) return;
|
||||
if (code === EVENT_CODE.delete) return;
|
||||
if (e.target.value.length <= 0) {
|
||||
const value = ensureArray(props.modelValue).slice();
|
||||
const lastNotDisabledIndex = getLastNotDisabledIndex(value);
|
||||
if (lastNotDisabledIndex < 0) return;
|
||||
const removeTagValue = value[lastNotDisabledIndex];
|
||||
value.splice(lastNotDisabledIndex, 1);
|
||||
emit(UPDATE_MODEL_EVENT, value);
|
||||
emitChange(value);
|
||||
emit("remove-tag", removeTagValue);
|
||||
}
|
||||
};
|
||||
const deleteTag = (event, tag) => {
|
||||
const index = states.selected.indexOf(tag);
|
||||
if (index > -1 && !selectDisabled.value) {
|
||||
const value = ensureArray(props.modelValue).slice();
|
||||
value.splice(index, 1);
|
||||
emit(UPDATE_MODEL_EVENT, value);
|
||||
emitChange(value);
|
||||
emit("remove-tag", tag.value);
|
||||
}
|
||||
event.stopPropagation();
|
||||
focus();
|
||||
};
|
||||
const deleteSelected = (event) => {
|
||||
event.stopPropagation();
|
||||
const value = props.multiple ? [] : valueOnClear.value;
|
||||
if (props.multiple) {
|
||||
for (const item of states.selected) if (item.isDisabled) value.push(item.value);
|
||||
}
|
||||
emit(UPDATE_MODEL_EVENT, value);
|
||||
emitChange(value);
|
||||
states.hoveringIndex = -1;
|
||||
expanded.value = false;
|
||||
emit("clear");
|
||||
focus();
|
||||
};
|
||||
const handleOptionSelect = (option) => {
|
||||
if (props.multiple) {
|
||||
const value = ensureArray(props.modelValue ?? []).slice();
|
||||
const optionIndex = getValueIndex(value, option);
|
||||
if (optionIndex > -1) value.splice(optionIndex, 1);
|
||||
else if (props.multipleLimit <= 0 || value.length < props.multipleLimit) value.push(option.value);
|
||||
emit(UPDATE_MODEL_EVENT, value);
|
||||
emitChange(value);
|
||||
if (option.created) handleQueryChange("");
|
||||
if (props.filterable && (option.created || !props.reserveKeyword)) states.inputValue = "";
|
||||
} else {
|
||||
!isEqual(props.modelValue, option.value) && emit("update:modelValue", option.value);
|
||||
emitChange(option.value);
|
||||
expanded.value = false;
|
||||
}
|
||||
focus();
|
||||
if (expanded.value) return;
|
||||
nextTick(() => {
|
||||
scrollToOption(option);
|
||||
});
|
||||
};
|
||||
const getValueIndex = (arr, option) => {
|
||||
if (isUndefined$1(option)) return -1;
|
||||
if (!isObject(option.value)) return arr.indexOf(option.value);
|
||||
return arr.findIndex((item) => {
|
||||
return isEqual(get(item, props.valueKey), getValueKey(option));
|
||||
});
|
||||
};
|
||||
const scrollToOption = (option) => {
|
||||
const targetOption = isArray(option) ? option[option.length - 1] : option;
|
||||
let target = null;
|
||||
if (!isNil(targetOption?.value)) {
|
||||
const options = optionsArray.value.filter((item) => item.value === targetOption.value);
|
||||
if (options.length > 0) target = options[0].$el;
|
||||
}
|
||||
if (tooltipRef.value && target) {
|
||||
const menu = tooltipRef.value?.popperRef?.contentRef?.querySelector?.(`.${nsSelect.be("dropdown", "wrap")}`);
|
||||
if (menu) scrollIntoView(menu, target);
|
||||
}
|
||||
scrollbarRef.value?.handleScroll();
|
||||
};
|
||||
const onOptionCreate = (vm) => {
|
||||
states.options.set(vm.value, vm);
|
||||
states.cachedOptions.set(vm.value, vm);
|
||||
};
|
||||
const onOptionDestroy = (key, vm) => {
|
||||
if (states.options.get(key) === vm) states.options.delete(key);
|
||||
};
|
||||
const popperRef = computed(() => {
|
||||
return tooltipRef.value?.popperRef?.contentRef;
|
||||
});
|
||||
const handleMenuEnter = () => {
|
||||
states.isBeforeHide = false;
|
||||
nextTick(() => {
|
||||
scrollbarRef.value?.update();
|
||||
scrollToOption(states.selected);
|
||||
});
|
||||
};
|
||||
const focus = () => {
|
||||
inputRef.value?.focus();
|
||||
};
|
||||
const blur = () => {
|
||||
if (expanded.value) {
|
||||
expanded.value = false;
|
||||
nextTick(() => inputRef.value?.blur());
|
||||
return;
|
||||
}
|
||||
inputRef.value?.blur();
|
||||
};
|
||||
const handleClearClick = (event) => {
|
||||
deleteSelected(event);
|
||||
};
|
||||
const handleClickOutside = (event) => {
|
||||
expanded.value = false;
|
||||
if (isFocused.value) {
|
||||
const _event = new FocusEvent("blur", event);
|
||||
nextTick(() => handleBlur(_event));
|
||||
}
|
||||
};
|
||||
const handleEsc = () => {
|
||||
if (states.inputValue.length > 0) states.inputValue = "";
|
||||
else expanded.value = false;
|
||||
};
|
||||
const toggleMenu = (event) => {
|
||||
if (selectDisabled.value || props.filterable && expanded.value && event && !suffixRef.value?.contains(event.target)) return;
|
||||
if (isIOS) states.inputHovering = true;
|
||||
if (states.menuVisibleOnFocus) states.menuVisibleOnFocus = false;
|
||||
else expanded.value = !expanded.value;
|
||||
};
|
||||
const selectOption = () => {
|
||||
if (!expanded.value) toggleMenu();
|
||||
else {
|
||||
const option = optionsArray.value[states.hoveringIndex];
|
||||
if (option && !option.isDisabled) handleOptionSelect(option);
|
||||
}
|
||||
};
|
||||
const getValueKey = (item) => {
|
||||
return isObject(item.value) ? get(item.value, props.valueKey) : item.value;
|
||||
};
|
||||
const optionsAllDisabled = computed(() => optionsArray.value.filter((option) => option.visible).every((option) => option.isDisabled));
|
||||
const showTagList = computed(() => {
|
||||
if (!props.multiple) return [];
|
||||
return props.collapseTags ? states.selected.slice(0, props.maxCollapseTags) : states.selected;
|
||||
});
|
||||
const collapseTagList = computed(() => {
|
||||
if (!props.multiple) return [];
|
||||
return props.collapseTags ? states.selected.slice(props.maxCollapseTags) : [];
|
||||
});
|
||||
const navigateOptions = (direction) => {
|
||||
if (!expanded.value) {
|
||||
expanded.value = true;
|
||||
return;
|
||||
}
|
||||
if (states.options.size === 0 || filteredOptionsCount.value === 0 || isComposing.value) return;
|
||||
if (!optionsAllDisabled.value) {
|
||||
if (direction === "next") {
|
||||
states.hoveringIndex++;
|
||||
if (states.hoveringIndex === states.options.size) states.hoveringIndex = 0;
|
||||
} else if (direction === "prev") {
|
||||
states.hoveringIndex--;
|
||||
if (states.hoveringIndex < 0) states.hoveringIndex = states.options.size - 1;
|
||||
}
|
||||
const option = optionsArray.value[states.hoveringIndex];
|
||||
if (option.isDisabled || !option.visible) navigateOptions(direction);
|
||||
nextTick(() => scrollToOption(hoverOption.value));
|
||||
}
|
||||
};
|
||||
const findFocusableIndex = (arr, start, step, len) => {
|
||||
for (let i = start; i >= 0 && i < len; i += step) {
|
||||
const obj = arr[i];
|
||||
if (!obj?.isDisabled && obj?.visible) return i;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
const focusOption = (targetIndex, mode) => {
|
||||
const len = states.options.size;
|
||||
if (len === 0) return;
|
||||
const start = clamp$1(targetIndex, 0, len - 1);
|
||||
const options = optionsArray.value;
|
||||
const direction = mode === "up" ? -1 : 1;
|
||||
const newIndex = findFocusableIndex(options, start, direction, len) ?? findFocusableIndex(options, start - direction, -direction, len);
|
||||
if (newIndex != null) {
|
||||
states.hoveringIndex = newIndex;
|
||||
nextTick(() => scrollToOption(hoverOption.value));
|
||||
}
|
||||
};
|
||||
const handleKeydown = (e) => {
|
||||
const code = getEventCode(e);
|
||||
let isPreventDefault = true;
|
||||
switch (code) {
|
||||
case EVENT_CODE.up:
|
||||
navigateOptions("prev");
|
||||
break;
|
||||
case EVENT_CODE.down:
|
||||
navigateOptions("next");
|
||||
break;
|
||||
case EVENT_CODE.enter:
|
||||
case EVENT_CODE.numpadEnter:
|
||||
if (!isComposing.value) selectOption();
|
||||
break;
|
||||
case EVENT_CODE.esc:
|
||||
handleEsc();
|
||||
break;
|
||||
case EVENT_CODE.backspace:
|
||||
isPreventDefault = false;
|
||||
deletePrevTag(e);
|
||||
return;
|
||||
case EVENT_CODE.home:
|
||||
if (!expanded.value) return;
|
||||
focusOption(0, "down");
|
||||
break;
|
||||
case EVENT_CODE.end:
|
||||
if (!expanded.value) return;
|
||||
focusOption(states.options.size - 1, "up");
|
||||
break;
|
||||
case EVENT_CODE.pageUp:
|
||||
if (!expanded.value) return;
|
||||
focusOption(states.hoveringIndex - 10, "up");
|
||||
break;
|
||||
case EVENT_CODE.pageDown:
|
||||
if (!expanded.value) return;
|
||||
focusOption(states.hoveringIndex + 10, "down");
|
||||
break;
|
||||
default:
|
||||
isPreventDefault = false;
|
||||
break;
|
||||
}
|
||||
if (isPreventDefault) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
};
|
||||
const getGapWidth = () => {
|
||||
if (!selectionRef.value) return 0;
|
||||
const style = window.getComputedStyle(selectionRef.value);
|
||||
return Number.parseFloat(style.gap || "6px");
|
||||
};
|
||||
const tagStyle = computed(() => {
|
||||
const gapWidth = getGapWidth();
|
||||
const inputSlotWidth = props.filterable ? gapWidth + 11 : 0;
|
||||
return { maxWidth: `${collapseItemRef.value && props.maxCollapseTags === 1 ? states.selectionWidth - states.collapseItemWidth - gapWidth - inputSlotWidth : states.selectionWidth - inputSlotWidth}px` };
|
||||
});
|
||||
const collapseTagStyle = computed(() => {
|
||||
return { maxWidth: `${states.selectionWidth}px` };
|
||||
});
|
||||
const popupScroll = (data) => {
|
||||
emit("popup-scroll", data);
|
||||
};
|
||||
const endReached = (direction) => {
|
||||
emit("end-reached", direction);
|
||||
};
|
||||
useResizeObserver(selectionRef, resetSelectionWidth);
|
||||
useResizeObserver(wrapperRef, updateTooltip);
|
||||
useResizeObserver(tagMenuRef, updateTagTooltip);
|
||||
useResizeObserver(collapseItemRef, resetCollapseItemWidth);
|
||||
let stop;
|
||||
watch(() => dropdownMenuVisible.value, (newVal) => {
|
||||
if (newVal) stop = useResizeObserver(menuRef, updateTooltip).stop;
|
||||
else {
|
||||
stop?.();
|
||||
stop = void 0;
|
||||
}
|
||||
emit("visible-change", newVal);
|
||||
});
|
||||
onMounted(() => {
|
||||
setSelected();
|
||||
});
|
||||
return {
|
||||
inputId,
|
||||
contentId,
|
||||
nsSelect,
|
||||
nsInput,
|
||||
states,
|
||||
isFocused,
|
||||
expanded,
|
||||
optionsArray,
|
||||
hoverOption,
|
||||
selectSize,
|
||||
filteredOptionsCount,
|
||||
updateTooltip,
|
||||
updateTagTooltip,
|
||||
debouncedOnInputChange,
|
||||
onInput,
|
||||
deletePrevTag,
|
||||
deleteTag,
|
||||
deleteSelected,
|
||||
handleOptionSelect,
|
||||
scrollToOption,
|
||||
hasModelValue,
|
||||
shouldShowPlaceholder,
|
||||
currentPlaceholder,
|
||||
mouseEnterEventName,
|
||||
needStatusIcon,
|
||||
showClearBtn,
|
||||
iconComponent,
|
||||
iconReverse,
|
||||
validateState,
|
||||
validateIcon,
|
||||
showNewOption,
|
||||
updateOptions,
|
||||
collapseTagSize,
|
||||
setSelected,
|
||||
selectDisabled,
|
||||
emptyText,
|
||||
handleCompositionStart,
|
||||
handleCompositionUpdate,
|
||||
handleCompositionEnd,
|
||||
handleKeydown,
|
||||
onOptionCreate,
|
||||
onOptionDestroy,
|
||||
handleMenuEnter,
|
||||
focus,
|
||||
blur,
|
||||
handleClearClick,
|
||||
handleClickOutside,
|
||||
handleEsc,
|
||||
toggleMenu,
|
||||
selectOption,
|
||||
getValueKey,
|
||||
navigateOptions,
|
||||
dropdownMenuVisible,
|
||||
showTagList,
|
||||
collapseTagList,
|
||||
popupScroll,
|
||||
getOption,
|
||||
endReached,
|
||||
tagStyle,
|
||||
collapseTagStyle,
|
||||
popperRef,
|
||||
inputRef,
|
||||
tooltipRef,
|
||||
tagTooltipRef,
|
||||
prefixRef,
|
||||
suffixRef,
|
||||
selectRef,
|
||||
wrapperRef,
|
||||
selectionRef,
|
||||
scrollbarRef,
|
||||
menuRef,
|
||||
tagMenuRef,
|
||||
collapseItemRef
|
||||
};
|
||||
};
|
||||
//#endregion
|
||||
export { useSelect };
|
||||
|
||||
//# sourceMappingURL=useSelect.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/select/src/useSelect.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/select/src/useSelect.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
frontend/node_modules/element-plus/es/components/select/style/css.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/select/style/css.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import "../../base/style/css.mjs";
|
||||
import "../../scrollbar/style/css.mjs";
|
||||
import "../../popper/style/css.mjs";
|
||||
import "../../tag/style/css.mjs";
|
||||
import "../../option/style/css.mjs";
|
||||
import "../../option-group/style/css.mjs";
|
||||
import "element-plus/theme-chalk/el-select.css";
|
||||
7
frontend/node_modules/element-plus/es/components/select/style/index.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/select/style/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import "../../base/style/index.mjs";
|
||||
import "../../scrollbar/style/index.mjs";
|
||||
import "../../popper/style/index.mjs";
|
||||
import "../../tag/style/index.mjs";
|
||||
import "../../option/style/index.mjs";
|
||||
import "../../option-group/style/index.mjs";
|
||||
import "element-plus/theme-chalk/src/select.scss";
|
||||
Reference in New Issue
Block a user