This commit is contained in:
dopamine
2025-07-29 20:21:46 +08:00
parent 60190d1b84
commit 94aef5d1ed
2 changed files with 14 additions and 4 deletions

View File

@@ -323,13 +323,14 @@ import ElTag from '@element-plus/components/tag'
import ElIcon from '@element-plus/components/icon'
import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'
import { flattedChildren, isArray, isObject } from '@element-plus/utils'
import { useCalcInputWidth } from '@element-plus/hooks'
import { useCalcInputWidth, useOrderedChildren } from '@element-plus/hooks'
import ElOption from './option.vue'
import ElSelectMenu from './select-dropdown.vue'
import { useSelect } from './useSelect'
import { selectKey } from './token'
import ElOptions from './options'
import { selectProps } from './select'
import { COMPONENT_NAME as OPTION_COMPONET_NAME } from './option'
import type { VNode } from 'vue';
import type { SelectContext } from './type'
@@ -362,6 +363,8 @@ export default defineComponent({
setup(props, { emit, slots }) {
const instance = getCurrentInstance()!
const { } = useOrderedChildren(instance, )
instance.appContext.config.warnHandler = (...args) => {
// Overrides warnings about slots not being executable outside of a render function.
// We call slot below just to simulate data when persist is false, this warning message should be ignored

View File

@@ -4,14 +4,12 @@ import type {
ComputedRef,
ExtractPropTypes,
Ref,
VNode,
__ExtractPublicPropTypes,
} from 'vue'
import type { SelectProps } from './select'
import type { optionProps } from './option'
export interface SelectGroupContext {
disabled: boolean
}
export interface SelectContext {
props: SelectProps
states: SelectStates
@@ -37,6 +35,15 @@ export type SelectStates = {
menuVisibleOnFocus: boolean
isBeforeHide: boolean
}
export interface SelectGroupContext {
disabled: boolean
}
export type OptionContext = {
uid: number
getVnode: () => VNode
}
export type OptionProps = ExtractPropTypes<typeof optionProps>
export type OptionPropsPublic = __ExtractPublicPropTypes<typeof optionProps>
export interface OptionStates {