mirror of
https://github.com/element-plus/element-plus.git
synced 2025-03-25 16:10:53 +08:00
chore: emits smaller declaration files (#20109)
* Revert "fix(types): packing unexpected types (#19419)" This reverts commit 13506ffb814d2b1300bf57c06648b6b27281c7c5. * Revert "chore: add explicit type annoation (#19352)" * fix(typescript): borken import paths in declaration files * chore: emits smaller declaration files
This commit is contained in:
parent
d4123cd558
commit
7be4a3765e
@ -49,4 +49,4 @@ export const affixEmits = {
|
||||
}
|
||||
export type AffixEmits = typeof affixEmits
|
||||
|
||||
export type AffixInstance = InstanceType<typeof Affix>
|
||||
export type AffixInstance = InstanceType<typeof Affix> & unknown
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Alert from './alert.vue'
|
||||
|
||||
export type AlertInstance = InstanceType<typeof Alert>
|
||||
export type AlertInstance = InstanceType<typeof Alert> & unknown
|
||||
|
@ -70,7 +70,7 @@ export const anchorProps = buildProps({
|
||||
})
|
||||
|
||||
export type AnchorProps = ExtractPropTypes<typeof anchorProps>
|
||||
export type AnchorInstance = InstanceType<typeof Anchor>
|
||||
export type AnchorInstance = InstanceType<typeof Anchor> & unknown
|
||||
|
||||
export const anchorEmits = {
|
||||
change: (href: string) => isString(href),
|
||||
|
@ -149,4 +149,4 @@ export const autocompleteEmits = {
|
||||
}
|
||||
export type AutocompleteEmits = typeof autocompleteEmits
|
||||
|
||||
export type AutocompleteInstance = InstanceType<typeof Autocomplete>
|
||||
export type AutocompleteInstance = InstanceType<typeof Autocomplete> & unknown
|
||||
|
@ -129,7 +129,7 @@ import { useFormDisabled } from '@element-plus/components/form'
|
||||
import { autocompleteEmits, autocompleteProps } from './autocomplete'
|
||||
import type { AutocompleteData } from './autocomplete'
|
||||
|
||||
import type { Ref, StyleValue } from 'vue'
|
||||
import type { StyleValue } from 'vue'
|
||||
import type { TooltipInstance } from '@element-plus/components/tooltip'
|
||||
import type { InputInstance } from '@element-plus/components/input'
|
||||
|
||||
@ -379,21 +379,7 @@ onMounted(() => {
|
||||
readonly = (inputRef.value as any).ref!.hasAttribute('readonly')
|
||||
})
|
||||
|
||||
defineExpose<{
|
||||
highlightedIndex: Ref<number>
|
||||
activated: Ref<boolean>
|
||||
loading: Ref<boolean>
|
||||
inputRef: Ref<InputInstance | undefined>
|
||||
popperRef: Ref<TooltipInstance | undefined>
|
||||
suggestions: Ref<AutocompleteData>
|
||||
handleSelect: (item: any) => void
|
||||
handleKeyEnter: () => void
|
||||
focus: () => void
|
||||
blur: () => void
|
||||
close: () => void
|
||||
highlight: (index: number) => void
|
||||
getData: (queryString: string) => void
|
||||
}>({
|
||||
defineExpose({
|
||||
/** @description the index of the currently highlighted item */
|
||||
highlightedIndex,
|
||||
/** @description autocomplete whether activated */
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Avatar from './avatar.vue'
|
||||
|
||||
export type AvatarInstance = InstanceType<typeof Avatar>
|
||||
export type AvatarInstance = InstanceType<typeof Avatar> & unknown
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Backtop from './backtop.vue'
|
||||
|
||||
export type BacktopInstance = InstanceType<typeof Backtop>
|
||||
export type BacktopInstance = InstanceType<typeof Backtop> & unknown
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Badge from './badge.vue'
|
||||
|
||||
export type BadgeInstance = InstanceType<typeof Badge>
|
||||
export type BadgeInstance = InstanceType<typeof Badge> & unknown
|
||||
|
@ -1,5 +1,6 @@
|
||||
import type Breadcrumb from './breadcrumb.vue'
|
||||
import type BreadcrumbItem from './breadcrumb-item.vue'
|
||||
|
||||
export type BreadcrumbItemInstance = InstanceType<typeof BreadcrumbItem>
|
||||
export type BreadcrumbInstance = InstanceType<typeof Breadcrumb>
|
||||
export type BreadcrumbItemInstance = InstanceType<typeof BreadcrumbItem> &
|
||||
unknown
|
||||
export type BreadcrumbInstance = InstanceType<typeof Breadcrumb> & unknown
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type Button from './button.vue'
|
||||
import type ButtonGroup from './button-group.vue'
|
||||
|
||||
export type ButtonInstance = InstanceType<typeof Button>
|
||||
export type ButtonGroupInstance = InstanceType<typeof ButtonGroup>
|
||||
export type ButtonInstance = InstanceType<typeof Button> & unknown
|
||||
export type ButtonGroupInstance = InstanceType<typeof ButtonGroup> & unknown
|
||||
|
@ -1,6 +1,6 @@
|
||||
import type DateTable from './date-table.vue'
|
||||
import type Calendar from './calendar.vue'
|
||||
|
||||
export type DateTableInstance = InstanceType<typeof DateTable>
|
||||
export type DateTableInstance = InstanceType<typeof DateTable> & unknown
|
||||
export type CalendarDateTableInstance = DateTableInstance
|
||||
export type CalendarInstance = InstanceType<typeof Calendar>
|
||||
export type CalendarInstance = InstanceType<typeof Calendar> & unknown
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Card from './card.vue'
|
||||
|
||||
export type CardInstance = InstanceType<typeof Card>
|
||||
export type CardInstance = InstanceType<typeof Card> & unknown
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type Carousel from './carousel.vue'
|
||||
import type CarouselItem from './carousel-item.vue'
|
||||
|
||||
export type CarouselInstance = InstanceType<typeof Carousel>
|
||||
export type CarouselItemInstance = InstanceType<typeof CarouselItem>
|
||||
export type CarouselInstance = InstanceType<typeof Carousel> & unknown
|
||||
export type CarouselItemInstance = InstanceType<typeof CarouselItem> & unknown
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type CascaderPanel from './index.vue'
|
||||
|
||||
export type CascaderPanelInstance = InstanceType<typeof CascaderPanel>
|
||||
export type CascaderPanelInstance = InstanceType<typeof CascaderPanel> & unknown
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Cascader from './cascader.vue'
|
||||
|
||||
export type CascaderInstance = InstanceType<typeof Cascader>
|
||||
export type CascaderInstance = InstanceType<typeof Cascader> & unknown
|
||||
|
@ -30,4 +30,4 @@ export const checkTagEmits = {
|
||||
}
|
||||
export type CheckTagEmits = typeof checkTagEmits
|
||||
|
||||
export type CheckTagInstance = InstanceType<typeof CheckTag>
|
||||
export type CheckTagInstance = InstanceType<typeof CheckTag> & unknown
|
||||
|
@ -64,4 +64,4 @@ export const checkboxGroupEmits = {
|
||||
|
||||
export type CheckboxGroupProps = ExtractPropTypes<typeof checkboxGroupProps>
|
||||
export type CheckboxGroupEmits = typeof checkboxGroupEmits
|
||||
export type CheckboxGroupInstance = InstanceType<typeof checkboxGroup>
|
||||
export type CheckboxGroupInstance = InstanceType<typeof checkboxGroup> & unknown
|
||||
|
@ -116,4 +116,4 @@ export const checkboxEmits = {
|
||||
|
||||
export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>
|
||||
export type CheckboxEmits = typeof checkboxEmits
|
||||
export type CheckboxInstance = InstanceType<typeof Checkbox>
|
||||
export type CheckboxInstance = InstanceType<typeof Checkbox> & unknown
|
||||
|
@ -83,4 +83,4 @@ export const colProps = buildProps({
|
||||
},
|
||||
} as const)
|
||||
export type ColProps = ExtractPropTypes<typeof colProps>
|
||||
export type ColInstance = InstanceType<typeof Col>
|
||||
export type ColInstance = InstanceType<typeof Col> & unknown
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type Collapse from './collapse.vue'
|
||||
import type CollapseItem from './collapse-item.vue'
|
||||
|
||||
export type CollapseInstance = InstanceType<typeof Collapse>
|
||||
export type CollapseItemInstance = InstanceType<typeof CollapseItem>
|
||||
export type CollapseInstance = InstanceType<typeof Collapse> & unknown
|
||||
export type CollapseItemInstance = InstanceType<typeof CollapseItem> & unknown
|
||||
|
@ -75,7 +75,7 @@ export const colorPickerEmits = {
|
||||
|
||||
export type ColorPickerProps = ExtractPropTypes<typeof colorPickerProps>
|
||||
export type ColorPickerEmits = typeof colorPickerEmits
|
||||
export type ColorPickerInstance = InstanceType<typeof ColorPicker>
|
||||
export type ColorPickerInstance = InstanceType<typeof ColorPicker> & unknown
|
||||
|
||||
export interface ColorPickerContext {
|
||||
currentColor: ComputedRef<string>
|
||||
|
@ -22,6 +22,7 @@ const ConfigProvider = defineComponent({
|
||||
return () => renderSlot(slots, 'default', { config: config?.value })
|
||||
},
|
||||
})
|
||||
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>
|
||||
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider> &
|
||||
unknown
|
||||
|
||||
export default ConfigProvider
|
||||
|
@ -25,8 +25,8 @@ export const ElFooter: SFCWithInstall<typeof Footer> = withNoopInstall(Footer)
|
||||
export const ElHeader: SFCWithInstall<typeof Header> = withNoopInstall(Header)
|
||||
export const ElMain: SFCWithInstall<typeof Main> = withNoopInstall(Main)
|
||||
|
||||
export type ContainerInstance = InstanceType<typeof Container>
|
||||
export type AsideInstance = InstanceType<typeof Aside>
|
||||
export type FooterInstance = InstanceType<typeof Footer>
|
||||
export type HeaderInstance = InstanceType<typeof Header>
|
||||
export type MainInstance = InstanceType<typeof Main>
|
||||
export type ContainerInstance = InstanceType<typeof Container> & unknown
|
||||
export type AsideInstance = InstanceType<typeof Aside> & unknown
|
||||
export type FooterInstance = InstanceType<typeof Footer> & unknown
|
||||
export type HeaderInstance = InstanceType<typeof Header> & unknown
|
||||
export type MainInstance = InstanceType<typeof Main> & unknown
|
||||
|
@ -47,4 +47,4 @@ export const countdownEmits = {
|
||||
}
|
||||
export type CountdownEmits = typeof countdownEmits
|
||||
|
||||
export type CountdownInstance = InstanceType<typeof Countdown>
|
||||
export type CountdownInstance = InstanceType<typeof Countdown> & unknown
|
||||
|
@ -52,4 +52,4 @@ export const descriptionProps = buildProps({
|
||||
} as const)
|
||||
|
||||
export type DescriptionProps = ExtractPropTypes<typeof descriptionProps>
|
||||
export type DescriptionInstance = InstanceType<typeof Description>
|
||||
export type DescriptionInstance = InstanceType<typeof Description> & unknown
|
||||
|
@ -133,4 +133,4 @@ export const dialogEmits = {
|
||||
closeAutoFocus: () => true,
|
||||
}
|
||||
export type DialogEmits = typeof dialogEmits
|
||||
export type DialogInstance = InstanceType<typeof Dialog>
|
||||
export type DialogInstance = InstanceType<typeof Dialog> & unknown
|
||||
|
@ -31,4 +31,4 @@ export const dividerProps = buildProps({
|
||||
} as const)
|
||||
export type DividerProps = ExtractPropTypes<typeof dividerProps>
|
||||
|
||||
export type DividerInstance = InstanceType<typeof Divider>
|
||||
export type DividerInstance = InstanceType<typeof Divider> & unknown
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Dropdown from './dropdown.vue'
|
||||
|
||||
export type DropdownInstance = InstanceType<typeof Dropdown>
|
||||
export type DropdownInstance = InstanceType<typeof Dropdown> & unknown
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PopperProps } from '@element-plus/element-plus'
|
||||
import { PopperProps } from '@element-plus/components/popper'
|
||||
import type { ComputedRef, InjectionKey, Ref } from 'vue'
|
||||
|
||||
export type ElDropdownInjectionContext = {
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Empty from './empty.vue'
|
||||
|
||||
export type EmptyInstance = InstanceType<typeof Empty>
|
||||
export type EmptyInstance = InstanceType<typeof Empty> & unknown
|
||||
|
@ -18,5 +18,5 @@ export * from './src/types'
|
||||
export * from './src/constants'
|
||||
export * from './src/hooks'
|
||||
|
||||
export type FormInstance = InstanceType<typeof Form>
|
||||
export type FormItemInstance = InstanceType<typeof FormItem>
|
||||
export type FormInstance = InstanceType<typeof Form> & unknown
|
||||
export type FormItemInstance = InstanceType<typeof FormItem> & unknown
|
||||
|
@ -17,4 +17,4 @@ export const iconProps = buildProps({
|
||||
},
|
||||
} as const)
|
||||
export type IconProps = ExtractPropTypes<typeof iconProps>
|
||||
export type IconInstance = InstanceType<typeof Icon>
|
||||
export type IconInstance = InstanceType<typeof Icon> & unknown
|
||||
|
@ -106,4 +106,4 @@ export interface ImageViewerMode {
|
||||
icon: Component
|
||||
}
|
||||
|
||||
export type ImageViewerInstance = InstanceType<typeof ImageViewer>
|
||||
export type ImageViewerInstance = InstanceType<typeof ImageViewer> & unknown
|
||||
|
@ -128,4 +128,4 @@ export const imageEmits = {
|
||||
show: () => true,
|
||||
}
|
||||
export type ImageEmits = typeof imageEmits
|
||||
export type ImageInstance = InstanceType<typeof Image>
|
||||
export type ImageInstance = InstanceType<typeof Image> & unknown
|
||||
|
@ -121,4 +121,4 @@ export const inputNumberEmits = {
|
||||
}
|
||||
export type InputNumberEmits = typeof inputNumberEmits
|
||||
|
||||
export type InputNumberInstance = InstanceType<typeof InputNumber>
|
||||
export type InputNumberInstance = InstanceType<typeof InputNumber> & unknown
|
||||
|
@ -2,7 +2,7 @@ import { nextTick, ref } from 'vue'
|
||||
import { mount } from '@vue/test-utils'
|
||||
import { describe, expect, test, vi } from 'vitest'
|
||||
import { ComponentSize, EVENT_CODE } from '@element-plus/constants'
|
||||
import { InputTagInstance } from '@element-plus/element-plus'
|
||||
import { InputTagInstance } from '@element-plus/components/input-tag'
|
||||
import FormItem from '@element-plus/components/form/src/form-item.vue'
|
||||
import InputTag from '../src/input-tag.vue'
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type InputTag from './input-tag.vue'
|
||||
|
||||
export type InputTagInstance = InstanceType<typeof InputTag>
|
||||
export type InputTagInstance = InstanceType<typeof InputTag> & unknown
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Input from './input.vue'
|
||||
|
||||
export type InputInstance = InstanceType<typeof Input>
|
||||
export type InputInstance = InstanceType<typeof Input> & unknown
|
||||
|
@ -47,4 +47,4 @@ export const linkEmits = {
|
||||
}
|
||||
export type LinkEmits = typeof linkEmits
|
||||
|
||||
export type LinkInstance = InstanceType<typeof Link>
|
||||
export type LinkInstance = InstanceType<typeof Link> & unknown
|
||||
|
@ -118,6 +118,6 @@ export const mentionEmits = {
|
||||
|
||||
export type MentionEmits = typeof mentionEmits
|
||||
export type MentionProps = ExtractPropTypes<typeof mentionProps>
|
||||
export type MentionInstance = InstanceType<typeof Mention>
|
||||
export type MentionInstance = InstanceType<typeof Mention> & unknown
|
||||
|
||||
export type { MentionOption } from './types'
|
||||
|
@ -69,7 +69,7 @@ import { getCursorPosition, getMentionCtx } from './helper'
|
||||
import ElMentionDropdown from './mention-dropdown.vue'
|
||||
|
||||
import type { Placement } from '@popperjs/core'
|
||||
import type { CSSProperties, ComputedRef, Ref } from 'vue'
|
||||
import type { CSSProperties } from 'vue'
|
||||
import type { InputInstance } from '@element-plus/components/input'
|
||||
import type { TooltipInstance } from '@element-plus/components/tooltip'
|
||||
import type { MentionCtx, MentionOption } from './types'
|
||||
@ -280,11 +280,7 @@ const syncDropdownVisible = () => {
|
||||
visible.value = false
|
||||
}
|
||||
|
||||
defineExpose<{
|
||||
input: Ref<InputInstance | undefined>
|
||||
tooltip: Ref<TooltipInstance | undefined>
|
||||
dropdownVisible: ComputedRef<boolean>
|
||||
}>({
|
||||
defineExpose({
|
||||
input: elInputRef,
|
||||
tooltip: tooltipRef,
|
||||
dropdownVisible,
|
||||
|
@ -9,6 +9,6 @@ export type MenuInstance = InstanceType<typeof Menu> & {
|
||||
handleResize: () => void
|
||||
}
|
||||
|
||||
export type MenuItemInstance = InstanceType<typeof MenuItem>
|
||||
export type MenuItemGroupInstance = InstanceType<typeof MenuItemGroup>
|
||||
export type SubMenuInstance = InstanceType<typeof SubMenu>
|
||||
export type MenuItemInstance = InstanceType<typeof MenuItem> & unknown
|
||||
export type MenuItemGroupInstance = InstanceType<typeof MenuItemGroup> & unknown
|
||||
export type SubMenuInstance = InstanceType<typeof SubMenu> & unknown
|
||||
|
@ -159,7 +159,7 @@ export const messageEmits = {
|
||||
}
|
||||
export type MessageEmits = typeof messageEmits
|
||||
|
||||
export type MessageInstance = InstanceType<typeof MessageConstructor>
|
||||
export type MessageInstance = InstanceType<typeof MessageConstructor> & unknown
|
||||
|
||||
export type MessageOptions = Partial<
|
||||
Mutable<
|
||||
|
@ -116,7 +116,7 @@ export const notificationEmits = {
|
||||
}
|
||||
export type NotificationEmits = typeof notificationEmits
|
||||
|
||||
export type NotificationInstance = InstanceType<typeof Notification>
|
||||
export type NotificationInstance = InstanceType<typeof Notification> & unknown
|
||||
|
||||
export type NotificationOptions = Omit<NotificationProps, 'id' | 'onClose'> & {
|
||||
/**
|
||||
|
@ -30,4 +30,4 @@ export const pageHeaderEmits = {
|
||||
}
|
||||
export type PageHeaderEmits = typeof pageHeaderEmits
|
||||
|
||||
export type PageHeaderInstance = InstanceType<typeof PageHeader>
|
||||
export type PageHeaderInstance = InstanceType<typeof PageHeader> & unknown
|
||||
|
@ -14,4 +14,4 @@ export type PaginationJumperProps = ExtractPropTypes<
|
||||
typeof paginationJumperProps
|
||||
>
|
||||
|
||||
export type PaginationJumperInstance = InstanceType<typeof Jumper>
|
||||
export type PaginationJumperInstance = InstanceType<typeof Jumper> & unknown
|
||||
|
@ -22,4 +22,4 @@ export const paginationNextProps = buildProps({
|
||||
|
||||
export type PaginationNextProps = ExtractPropTypes<typeof paginationNextProps>
|
||||
|
||||
export type NextInstance = InstanceType<typeof Next>
|
||||
export type NextInstance = InstanceType<typeof Next> & unknown
|
||||
|
@ -20,4 +20,4 @@ export const paginationPagerProps = buildProps({
|
||||
|
||||
export type PaginationPagerProps = ExtractPropTypes<typeof paginationPagerProps>
|
||||
|
||||
export type PagerInstance = InstanceType<typeof Pager>
|
||||
export type PagerInstance = InstanceType<typeof Pager> & unknown
|
||||
|
@ -22,4 +22,4 @@ export const paginationPrevEmits = {
|
||||
|
||||
export type PaginationPrevProps = ExtractPropTypes<typeof paginationPrevProps>
|
||||
|
||||
export type PrevInstance = InstanceType<typeof Prev>
|
||||
export type PrevInstance = InstanceType<typeof Prev> & unknown
|
||||
|
@ -26,4 +26,4 @@ export const paginationSizesProps = buildProps({
|
||||
|
||||
export type PaginationSizesProps = ExtractPropTypes<typeof paginationSizesProps>
|
||||
|
||||
export type SizesInstance = InstanceType<typeof Sizes>
|
||||
export type SizesInstance = InstanceType<typeof Sizes> & unknown
|
||||
|
@ -11,4 +11,4 @@ export const paginationTotalProps = buildProps({
|
||||
|
||||
export type PaginationTotalProps = ExtractPropTypes<typeof paginationTotalProps>
|
||||
|
||||
export type TotalInstance = InstanceType<typeof Total>
|
||||
export type TotalInstance = InstanceType<typeof Total> & unknown
|
||||
|
@ -94,4 +94,4 @@ export type PopconfirmEmits = typeof popconfirmEmits
|
||||
|
||||
export type PopconfirmProps = ExtractPropTypes<typeof popconfirmProps>
|
||||
|
||||
export type PopconfirmInstance = InstanceType<typeof Popconfirm>
|
||||
export type PopconfirmInstance = InstanceType<typeof Popconfirm> & unknown
|
||||
|
@ -131,4 +131,4 @@ export const popoverEmits = {
|
||||
}
|
||||
export type PopoverEmits = typeof popoverEmits
|
||||
|
||||
export type PopoverInstance = InstanceType<typeof Popover>
|
||||
export type PopoverInstance = InstanceType<typeof Popover> & unknown
|
||||
|
@ -11,7 +11,7 @@ export const popperArrowProps = buildProps({
|
||||
} as const)
|
||||
export type PopperArrowProps = ExtractPropTypes<typeof popperArrowProps>
|
||||
|
||||
export type PopperArrowInstance = InstanceType<typeof Arrow>
|
||||
export type PopperArrowInstance = InstanceType<typeof Arrow> & unknown
|
||||
|
||||
/** @deprecated use `popperArrowProps` instead, and it will be deprecated in the next major version */
|
||||
export const usePopperArrowProps = popperArrowProps
|
||||
|
@ -122,7 +122,7 @@ export const popperContentEmits = {
|
||||
}
|
||||
export type PopperContentEmits = typeof popperContentEmits
|
||||
|
||||
export type PopperContentInstance = InstanceType<typeof Content>
|
||||
export type PopperContentInstance = InstanceType<typeof Content> & unknown
|
||||
|
||||
/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */
|
||||
export const usePopperCoreConfigProps = popperCoreConfigProps
|
||||
|
@ -39,7 +39,7 @@ export const popperProps = buildProps({
|
||||
|
||||
export type PopperProps = ExtractPropTypes<typeof popperProps>
|
||||
|
||||
export type PopperInstance = InstanceType<typeof Popper>
|
||||
export type PopperInstance = InstanceType<typeof Popper> & unknown
|
||||
|
||||
/** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */
|
||||
export const usePopperProps = popperProps
|
||||
|
@ -35,7 +35,7 @@ export const popperTriggerProps = buildProps({
|
||||
|
||||
export type PopperTriggerProps = typeof popperTriggerProps
|
||||
|
||||
export type PopperTriggerInstance = InstanceType<typeof Trigger>
|
||||
export type PopperTriggerInstance = InstanceType<typeof Trigger> & unknown
|
||||
|
||||
/** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */
|
||||
export const usePopperTriggerProps = popperTriggerProps
|
||||
|
@ -102,4 +102,4 @@ export const progressProps = buildProps({
|
||||
} as const)
|
||||
|
||||
export type ProgressProps = ExtractPropTypes<typeof progressProps>
|
||||
export type ProgressInstance = InstanceType<typeof Progress>
|
||||
export type ProgressInstance = InstanceType<typeof Progress> & unknown
|
||||
|
@ -8,4 +8,4 @@ export const radioButtonProps = buildProps({
|
||||
} as const)
|
||||
|
||||
export type RadioButtonProps = ExtractPropTypes<typeof radioButtonProps>
|
||||
export type RadioButtonInstance = InstanceType<typeof RadioButton>
|
||||
export type RadioButtonInstance = InstanceType<typeof RadioButton> & unknown
|
||||
|
@ -61,4 +61,4 @@ export type RadioGroupProps = ExtractPropTypes<typeof radioGroupProps>
|
||||
|
||||
export const radioGroupEmits = radioEmits
|
||||
export type RadioGroupEmits = typeof radioGroupEmits
|
||||
export type RadioGroupInstance = InstanceType<typeof RadioGroup>
|
||||
export type RadioGroupInstance = InstanceType<typeof RadioGroup> & unknown
|
||||
|
@ -60,4 +60,4 @@ export const radioEmits = {
|
||||
|
||||
export type RadioProps = ExtractPropTypes<typeof radioProps>
|
||||
export type RadioEmits = typeof radioEmits
|
||||
export type RadioInstance = InstanceType<typeof Radio>
|
||||
export type RadioInstance = InstanceType<typeof Radio> & unknown
|
||||
|
@ -155,4 +155,4 @@ export const rateEmits = {
|
||||
}
|
||||
export type RateEmits = typeof rateEmits
|
||||
|
||||
export type RateInstance = InstanceType<typeof Rate>
|
||||
export type RateInstance = InstanceType<typeof Rate> & unknown
|
||||
|
@ -52,4 +52,4 @@ export const resultProps = buildProps({
|
||||
|
||||
export type ResultProps = ExtractPropTypes<typeof resultProps>
|
||||
|
||||
export type ResultInstance = InstanceType<typeof Result>
|
||||
export type ResultInstance = InstanceType<typeof Result> & unknown
|
||||
|
@ -46,4 +46,4 @@ export const rowProps = buildProps({
|
||||
} as const)
|
||||
|
||||
export type RowProps = ExtractPropTypes<typeof rowProps>
|
||||
export type RowInstance = InstanceType<typeof Row>
|
||||
export type RowInstance = InstanceType<typeof Row> & unknown
|
||||
|
@ -14,4 +14,4 @@ export const barProps = buildProps({
|
||||
} as const)
|
||||
export type BarProps = ExtractPropTypes<typeof barProps>
|
||||
|
||||
export type BarInstance = InstanceType<typeof Bar>
|
||||
export type BarInstance = InstanceType<typeof Bar> & unknown
|
||||
|
@ -105,4 +105,4 @@ export const scrollbarEmits = {
|
||||
}
|
||||
export type ScrollbarEmits = typeof scrollbarEmits
|
||||
|
||||
export type ScrollbarInstance = InstanceType<typeof Scrollbar>
|
||||
export type ScrollbarInstance = InstanceType<typeof Scrollbar> & unknown
|
||||
|
@ -14,4 +14,4 @@ export const thumbProps = buildProps({
|
||||
} as const)
|
||||
export type ThumbProps = ExtractPropTypes<typeof thumbProps>
|
||||
|
||||
export type ThumbInstance = InstanceType<typeof Thumb>
|
||||
export type ThumbInstance = InstanceType<typeof Thumb> & unknown
|
||||
|
@ -71,4 +71,4 @@ export const segmentedEmits = {
|
||||
}
|
||||
export type SegmentedEmits = typeof segmentedEmits
|
||||
|
||||
export type SegmentedInstance = InstanceType<typeof Segmented>
|
||||
export type SegmentedInstance = InstanceType<typeof Segmented> & unknown
|
||||
|
@ -50,90 +50,8 @@ import type { ISelectV2Props } from './token'
|
||||
import type { SelectEmitFn } from './defaults'
|
||||
import type { TooltipInstance } from '@element-plus/components/tooltip'
|
||||
import type { SelectDropdownInstance } from './select-dropdown'
|
||||
import type { Component, ComputedRef, Ref, WritableComputedRef } from 'vue'
|
||||
|
||||
type useSelectReturnType = (
|
||||
props: ISelectV2Props,
|
||||
emit: SelectEmitFn
|
||||
) => {
|
||||
inputId: Ref<string | undefined>
|
||||
collapseTagSize: ComputedRef<'default' | 'small'>
|
||||
currentPlaceholder: ComputedRef<string>
|
||||
expanded: Ref<boolean>
|
||||
emptyText: ComputedRef<string | false | null>
|
||||
popupHeight: ComputedRef<number>
|
||||
debounce: ComputedRef<0 | 300>
|
||||
allOptions: ComputedRef<OptionType[]>
|
||||
filteredOptions: Ref<OptionType[]>
|
||||
iconComponent: ComputedRef<any>
|
||||
iconReverse: ComputedRef<any>
|
||||
tagStyle: ComputedRef<{ maxWidth: string }>
|
||||
collapseTagStyle: ComputedRef<{ maxWidth: string }>
|
||||
popperSize: Ref<number>
|
||||
dropdownMenuVisible: WritableComputedRef<boolean>
|
||||
hasModelValue: ComputedRef<boolean>
|
||||
shouldShowPlaceholder: ComputedRef<boolean>
|
||||
selectDisabled: ComputedRef<boolean | undefined>
|
||||
selectSize: ComputedRef<string>
|
||||
needStatusIcon: ComputedRef<boolean>
|
||||
showClearBtn: ComputedRef<boolean>
|
||||
states: SelectStates
|
||||
isFocused: Ref<boolean>
|
||||
nsSelect: ReturnType<typeof useNamespace>
|
||||
nsInput: ReturnType<typeof useNamespace>
|
||||
inputRef: Ref<HTMLElement | undefined>
|
||||
menuRef: Ref<SelectDropdownInstance | undefined>
|
||||
tagMenuRef: Ref<HTMLElement | undefined>
|
||||
tooltipRef: Ref<TooltipInstance | undefined>
|
||||
tagTooltipRef: Ref<TooltipInstance | undefined>
|
||||
selectRef: Ref<HTMLElement | undefined>
|
||||
wrapperRef: Ref<HTMLElement | undefined>
|
||||
selectionRef: Ref<HTMLElement | undefined>
|
||||
prefixRef: Ref<HTMLElement | undefined>
|
||||
suffixRef: Ref<HTMLElement | undefined>
|
||||
collapseItemRef: Ref<HTMLElement | undefined>
|
||||
popperRef: ComputedRef<HTMLElement | undefined>
|
||||
validateState: ComputedRef<string>
|
||||
validateIcon: ComputedRef<Component | undefined>
|
||||
showTagList: ComputedRef<Option[]>
|
||||
collapseTagList: ComputedRef<Option[]>
|
||||
debouncedOnInputChange: () => void
|
||||
deleteTag: (event: MouseEvent, option: Option) => void
|
||||
getLabel: (option: Option) => string
|
||||
getValue: (option: Option) => unknown
|
||||
getDisabled: (option: Option) => boolean
|
||||
getValueKey: (item: unknown) => any
|
||||
handleClear: () => void
|
||||
handleClickOutside: (event: Event) => void
|
||||
handleDel: (e: KeyboardEvent) => void
|
||||
handleEsc: () => void
|
||||
focus: () => void
|
||||
blur: () => void
|
||||
handleMenuEnter: () => void
|
||||
handleResize: () => void
|
||||
resetSelectionWidth: () => void
|
||||
updateTooltip: () => void
|
||||
updateTagTooltip: () => void
|
||||
updateOptions: () => void
|
||||
toggleMenu: () => void
|
||||
scrollTo: (index: number) => void
|
||||
onInput: (event: Event) => void
|
||||
onKeyboardNavigate: (
|
||||
direction: 'forward' | 'backward',
|
||||
hoveringIndex?: number
|
||||
) => void
|
||||
onKeyboardSelect: () => void
|
||||
onSelect: (option: Option) => void
|
||||
onHover: (idx?: number) => void
|
||||
handleCompositionStart: (event: CompositionEvent) => void
|
||||
handleCompositionEnd: (event: CompositionEvent) => void
|
||||
handleCompositionUpdate: (event: CompositionEvent) => void
|
||||
}
|
||||
|
||||
const useSelect: useSelectReturnType = (
|
||||
props: ISelectV2Props,
|
||||
emit: SelectEmitFn
|
||||
) => {
|
||||
const useSelect = (props: ISelectV2Props, emit: SelectEmitFn) => {
|
||||
// inject
|
||||
const { t } = useLocale()
|
||||
const nsSelect = useNamespace('select')
|
||||
|
@ -383,7 +383,7 @@ export default defineComponent({
|
||||
if (!props.multiple) {
|
||||
return API.states.selectedLabel
|
||||
}
|
||||
return API.states.selected.map((i: any) => i.currentLabel as string)
|
||||
return API.states.selected.map((i) => i.currentLabel as string)
|
||||
})
|
||||
|
||||
return {
|
||||
|
@ -48,92 +48,10 @@ import {
|
||||
useFormSize,
|
||||
} from '@element-plus/components/form'
|
||||
|
||||
import type ElTooltip from '@element-plus/components/tooltip'
|
||||
import type { TooltipInstance } from '@element-plus/components/tooltip'
|
||||
import type { ISelectProps, SelectOptionProxy } from './token'
|
||||
|
||||
type useSelectType = (
|
||||
props: ISelectProps,
|
||||
emit: any
|
||||
) => {
|
||||
inputId: Ref<string | undefined>
|
||||
contentId: Ref<string | undefined>
|
||||
nsSelect: Ref<string | undefined>
|
||||
nsInput: Ref<string | undefined>
|
||||
states: Reactive<Record<string, any>>
|
||||
isFocused: Ref<boolean>
|
||||
expanded: Ref<boolean>
|
||||
optionsArray: ComputedRef<any[]>
|
||||
hoverOption: Ref<unknown>
|
||||
selectSize: ComputedRef<'' | 'default' | 'small' | 'large'>
|
||||
filteredOptionsCount: ComputedRef<number>
|
||||
resetCalculatorWidth: () => void
|
||||
updateTooltip: () => void
|
||||
updateTagTooltip: () => void
|
||||
debouncedOnInputChange: DebouncedFunc<() => void>
|
||||
onInput: (event: Event) => void
|
||||
deletePrevTag: (event: Event) => void
|
||||
deleteTag: (event: Event, tag: any) => void
|
||||
deleteSelected: (event: Event) => void
|
||||
handleOptionSelect: (option: any) => void
|
||||
scrollToOption: (option: any) => void
|
||||
hasModelValue: ComputedRef<boolean>
|
||||
shouldShowPlaceholder: ComputedRef<boolean>
|
||||
currentPlaceholder: ComputedRef<string>
|
||||
mouseEnterEventName: Ref<string | null>
|
||||
needStatusIcon: ComputedRef<boolean>
|
||||
showClose: ComputedRef<boolean>
|
||||
iconComponent: ComputedRef<string>
|
||||
iconReverse: ComputedRef<boolean>
|
||||
validateState: ComputedRef<string>
|
||||
popupScroll: (data: { scrollTop: number; scrollLeft: number }) => void
|
||||
|
||||
validateIcon: ComputedRef<unknown>
|
||||
showNewOption: ComputedRef<boolean>
|
||||
updateOptions: () => void
|
||||
collapseTagSize: ComputedRef<'default' | 'small'>
|
||||
setSelected: () => void
|
||||
selectDisabled: ComputedRef<boolean>
|
||||
emptyText: ComputedRef<string | null>
|
||||
handleCompositionStart: (e: Event) => void
|
||||
handleCompositionUpdate: (e: Event) => void
|
||||
handleCompositionEnd: (e: Event) => void
|
||||
onOptionCreate: (vm: SelectOptionProxy) => void
|
||||
onOptionDestroy: (key: any, vm: SelectOptionProxy) => void
|
||||
handleMenuEnter: () => void
|
||||
focus: () => void
|
||||
blur: () => void
|
||||
handleClearClick: (event: Event) => void
|
||||
handleClickOutside: (event: Event) => void
|
||||
handleEsc: () => void
|
||||
toggleMenu: () => void
|
||||
selectOption: () => void
|
||||
getValueKey: (item: any) => any
|
||||
navigateOptions: (direction: string) => void
|
||||
dropdownMenuVisible: WritableComputedRef<boolean>
|
||||
showTagList: ComputedRef<unknown[]>
|
||||
collapseTagList: ComputedRef<unknown[]>
|
||||
tagStyle: ComputedRef<unknown>
|
||||
collapseTagStyle: ComputedRef<unknown>
|
||||
inputStyle: ComputedRef<unknown>
|
||||
popperRef: ComputedRef<unknown>
|
||||
inputRef: Ref<HTMLInputElement | null>
|
||||
tooltipRef: Ref<InstanceType<typeof ElTooltip> | null>
|
||||
tagTooltipRef: Ref<InstanceType<typeof ElTooltip> | null>
|
||||
calculatorRef: Ref<HTMLElement>
|
||||
prefixRef: Ref<HTMLElement>
|
||||
suffixRef: Ref<HTMLElement>
|
||||
selectRef: Ref<HTMLElement>
|
||||
wrapperRef: Ref<HTMLElement>
|
||||
selectionRef: Ref<HTMLElement>
|
||||
scrollbarRef: Ref<{
|
||||
handleScroll: () => void
|
||||
} | null>
|
||||
menuRef: Ref<HTMLElement>
|
||||
tagMenuRef: Ref<HTMLElement>
|
||||
collapseItemRef: Ref<HTMLElement>
|
||||
}
|
||||
|
||||
export const useSelect: useSelectType = (props: ISelectProps, emit) => {
|
||||
export const useSelect = (props: ISelectProps, emit) => {
|
||||
const { t } = useLocale()
|
||||
const contentId = useId()
|
||||
const nsSelect = useNamespace('select')
|
||||
@ -158,8 +76,8 @@ export const useSelect: useSelectType = (props: ISelectProps, emit) => {
|
||||
// template refs
|
||||
const selectRef = ref<HTMLElement>(null)
|
||||
const selectionRef = ref<HTMLElement>(null)
|
||||
const tooltipRef = ref<InstanceType<typeof ElTooltip> | null>(null)
|
||||
const tagTooltipRef = ref<InstanceType<typeof ElTooltip> | null>(null)
|
||||
const tooltipRef = ref<TooltipInstance | null>(null)
|
||||
const tagTooltipRef = ref<TooltipInstance | null>(null)
|
||||
const inputRef = ref<HTMLInputElement | null>(null)
|
||||
const prefixRef = ref<HTMLElement>(null)
|
||||
const suffixRef = ref<HTMLElement>(null)
|
||||
|
@ -24,4 +24,4 @@ export const skeletonItemProps = buildProps({
|
||||
} as const)
|
||||
export type SkeletonItemProps = ExtractPropTypes<typeof skeletonItemProps>
|
||||
|
||||
export type SkeletonItemInstance = InstanceType<typeof SkeletonItem>
|
||||
export type SkeletonItemInstance = InstanceType<typeof SkeletonItem> & unknown
|
||||
|
@ -41,4 +41,4 @@ export const skeletonProps = buildProps({
|
||||
} as const)
|
||||
export type SkeletonProps = ExtractPropTypes<typeof skeletonProps>
|
||||
|
||||
export type SkeletonInstance = InstanceType<typeof Skeleton>
|
||||
export type SkeletonInstance = InstanceType<typeof Skeleton> & unknown
|
||||
|
@ -50,28 +50,7 @@ const useTooltip = (
|
||||
}
|
||||
}
|
||||
|
||||
type HTMLType = HTMLDivElement | undefined
|
||||
type useSliderButtonType = (
|
||||
props: SliderButtonProps,
|
||||
initData: SliderButtonInitData,
|
||||
emit: SetupContext<SliderButtonEmits>['emit']
|
||||
) => {
|
||||
disabled: Ref<boolean>
|
||||
button: Ref<HTMLType>
|
||||
tooltip: Ref<TooltipInstance | undefined>
|
||||
tooltipVisible: Ref<boolean>
|
||||
showTooltip: Ref<SliderProps['showTooltip']>
|
||||
persistent: Ref<SliderProps['persistent']>
|
||||
wrapperStyle: ComputedRef<CSSProperties>
|
||||
formatValue: ComputedRef<number | string>
|
||||
handleMouseEnter: () => void
|
||||
handleMouseLeave: () => void
|
||||
onButtonDown: (event: MouseEvent | TouchEvent) => void
|
||||
onKeyDown: (event: KeyboardEvent) => void
|
||||
setPosition: (newPosition: number) => Promise<void>
|
||||
}
|
||||
|
||||
export const useSliderButton: useSliderButtonType = (
|
||||
export const useSliderButton = (
|
||||
props: SliderButtonProps,
|
||||
initData: SliderButtonInitData,
|
||||
emit: SetupContext<SliderButtonEmits>['emit']
|
||||
|
@ -188,4 +188,4 @@ export const sliderEmits = {
|
||||
}
|
||||
export type SliderEmits = typeof sliderEmits
|
||||
|
||||
export type SliderInstance = InstanceType<typeof Slider>
|
||||
export type SliderInstance = InstanceType<typeof Slider> & unknown
|
||||
|
@ -25,6 +25,6 @@ const SpaceItem = defineComponent({
|
||||
h('div', { class: classes.value }, renderSlot(slots, 'default'))
|
||||
},
|
||||
})
|
||||
export type SpaceItemInstance = InstanceType<typeof SpaceItem>
|
||||
export type SpaceItemInstance = InstanceType<typeof SpaceItem> & unknown
|
||||
|
||||
export default SpaceItem
|
||||
|
@ -245,6 +245,6 @@ const Space = defineComponent({
|
||||
},
|
||||
})
|
||||
|
||||
export type SpaceInstance = InstanceType<typeof Space>
|
||||
export type SpaceInstance = InstanceType<typeof Space> & unknown
|
||||
|
||||
export default Space
|
||||
|
@ -59,4 +59,4 @@ export const statisticProps = buildProps({
|
||||
} as const)
|
||||
export type StatisticProps = ExtractPropTypes<typeof statisticProps>
|
||||
|
||||
export type StatisticInstance = InstanceType<typeof Statistic>
|
||||
export type StatisticInstance = InstanceType<typeof Statistic> & unknown
|
||||
|
@ -35,4 +35,4 @@ export const stepProps = buildProps({
|
||||
|
||||
export type StepProps = ExtractPropTypes<typeof stepProps>
|
||||
|
||||
export type StepInstance = InstanceType<typeof Step>
|
||||
export type StepInstance = InstanceType<typeof Step> & unknown
|
||||
|
@ -63,4 +63,4 @@ export const stepsEmits = {
|
||||
}
|
||||
export type StepsEmits = typeof stepsEmits
|
||||
|
||||
export type StepsInstance = InstanceType<typeof Steps>
|
||||
export type StepsInstance = InstanceType<typeof Steps> & unknown
|
||||
|
@ -148,4 +148,4 @@ export const switchEmits = {
|
||||
}
|
||||
export type SwitchEmits = typeof switchEmits
|
||||
|
||||
export type SwitchInstance = InstanceType<typeof Switch>
|
||||
export type SwitchInstance = InstanceType<typeof Switch> & unknown
|
||||
|
@ -12,9 +12,9 @@ export default ElTable
|
||||
export const ElTableColumn: SFCWithInstall<typeof TableColumn> =
|
||||
withNoopInstall(TableColumn)
|
||||
|
||||
export type TableInstance = InstanceType<typeof Table>
|
||||
export type TableInstance = InstanceType<typeof Table> & unknown
|
||||
|
||||
export type TableColumnInstance = InstanceType<typeof TableColumn>
|
||||
export type TableColumnInstance = InstanceType<typeof TableColumn> & unknown
|
||||
|
||||
export type {
|
||||
SummaryMethod,
|
||||
|
@ -100,6 +100,7 @@ import ElTooltip from '@element-plus/components/tooltip'
|
||||
import ElScrollbar from '@element-plus/components/scrollbar'
|
||||
import { isPropAbsent } from '@element-plus/utils'
|
||||
|
||||
import type { TooltipInstance } from '@element-plus/components/tooltip'
|
||||
import type { Placement } from '@element-plus/components/popper'
|
||||
import type { PropType, WritableComputedRef } from 'vue'
|
||||
import type { TableColumnCtx } from './table-column/defaults'
|
||||
@ -147,7 +148,7 @@ export default defineComponent({
|
||||
parent.filterPanels.value[props.column.id] = instance
|
||||
}
|
||||
const tooltipVisible = ref(false)
|
||||
const tooltip = ref<InstanceType<typeof ElTooltip> | null>(null)
|
||||
const tooltip = ref<TooltipInstance | null>(null)
|
||||
const filters = computed(() => {
|
||||
return props.column && props.column.filters
|
||||
})
|
||||
|
@ -11,4 +11,4 @@ export const tabBarProps = buildProps({
|
||||
} as const)
|
||||
|
||||
export type TabBarProps = ExtractPropTypes<typeof tabBarProps>
|
||||
export type TabBarInstance = InstanceType<typeof TabBar>
|
||||
export type TabBarInstance = InstanceType<typeof TabBar> & unknown
|
||||
|
@ -32,4 +32,4 @@ export const tabPaneProps = buildProps({
|
||||
|
||||
export type TabPaneProps = ExtractPropTypes<typeof tabPaneProps>
|
||||
|
||||
export type TabPaneInstance = InstanceType<typeof TabPane>
|
||||
export type TabPaneInstance = InstanceType<typeof TabPane> & unknown
|
||||
|
@ -57,4 +57,4 @@ export const tagEmits = {
|
||||
}
|
||||
export type TagEmits = typeof tagEmits
|
||||
|
||||
export type TagInstance = InstanceType<typeof Tag>
|
||||
export type TagInstance = InstanceType<typeof Tag> & unknown
|
||||
|
@ -11,4 +11,4 @@ export const teleportProps = buildProps({
|
||||
} as const)
|
||||
|
||||
export type TeleportProps = ExtractPropTypes<typeof teleportProps>
|
||||
export type TeleportInstance = InstanceType<typeof Teleport>
|
||||
export type TeleportInstance = InstanceType<typeof Teleport> & unknown
|
||||
|
@ -109,4 +109,4 @@ export const timeSelectProps = buildProps({
|
||||
|
||||
export type TimeSelectProps = ExtractPropTypes<typeof timeSelectProps>
|
||||
|
||||
export type TimeSelectInstance = InstanceType<typeof TimeSelect>
|
||||
export type TimeSelectInstance = InstanceType<typeof TimeSelect> & unknown
|
||||
|
@ -62,4 +62,4 @@ export const timelineItemProps = buildProps({
|
||||
} as const)
|
||||
export type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>
|
||||
|
||||
export type TimelineItemInstance = InstanceType<typeof TimelineItem>
|
||||
export type TimelineItemInstance = InstanceType<typeof TimelineItem> & unknown
|
||||
|
@ -35,4 +35,4 @@ const Timeline = defineComponent({
|
||||
})
|
||||
|
||||
export default Timeline
|
||||
export type TimelineInstance = InstanceType<typeof Timeline>
|
||||
export type TimelineInstance = InstanceType<typeof Timeline> & unknown
|
||||
|
@ -62,4 +62,5 @@ export type ElTooltipContentProps = ExtractPropTypes<
|
||||
typeof useTooltipContentProps
|
||||
>
|
||||
|
||||
export type TooltipContentInstance = InstanceType<typeof TooltipContent>
|
||||
export type TooltipContentInstance = InstanceType<typeof TooltipContent> &
|
||||
unknown
|
||||
|
@ -40,4 +40,4 @@ export const tooltipEmits = [
|
||||
|
||||
export type ElTooltipProps = ExtractPropTypes<typeof useTooltipProps>
|
||||
|
||||
export type TooltipInstance = InstanceType<typeof Tooltip>
|
||||
export type TooltipInstance = InstanceType<typeof Tooltip> & unknown
|
||||
|
@ -72,7 +72,6 @@ import ElTooltipTrigger from './trigger.vue'
|
||||
import ElTooltipContent from './content.vue'
|
||||
import type { TooltipContentInstance } from './content'
|
||||
import type { PopperInstance } from '@element-plus/components/popper'
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'ElTooltip',
|
||||
@ -161,15 +160,7 @@ const isFocusInsideContent = (event?: FocusEvent) => {
|
||||
|
||||
onDeactivated(() => open.value && hide())
|
||||
|
||||
defineExpose<{
|
||||
popperRef: Ref<PopperInstance | undefined>
|
||||
contentRef: Ref<TooltipContentInstance | undefined>
|
||||
isFocusInsideContent: (event?: FocusEvent) => boolean | undefined
|
||||
updatePopper: () => void
|
||||
onOpen: (event?: Event) => void
|
||||
onClose: (event?: Event) => void
|
||||
hide: () => void
|
||||
}>({
|
||||
defineExpose({
|
||||
/**
|
||||
* @description el-popper component instance
|
||||
*/
|
||||
|
@ -115,7 +115,7 @@ export const tourProps = buildProps({
|
||||
})
|
||||
|
||||
export type TourProps = ExtractPropTypes<typeof tourProps>
|
||||
export type TourInstance = InstanceType<typeof Tour>
|
||||
export type TourInstance = InstanceType<typeof Tour> & unknown
|
||||
|
||||
export const tourEmits = {
|
||||
[UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),
|
||||
|
@ -36,4 +36,4 @@ export const transferPanelEmits = {
|
||||
}
|
||||
export type TransferPanelEmits = typeof transferPanelEmits
|
||||
|
||||
export type TransferPanelInstance = InstanceType<typeof TransferPanel>
|
||||
export type TransferPanelInstance = InstanceType<typeof TransferPanel> & unknown
|
||||
|
@ -159,4 +159,4 @@ export const transferEmits = {
|
||||
}
|
||||
export type TransferEmits = typeof transferEmits
|
||||
|
||||
export type TransferInstance = InstanceType<typeof Transfer>
|
||||
export type TransferInstance = InstanceType<typeof Transfer> & unknown
|
||||
|
@ -82,7 +82,6 @@ import type {
|
||||
TransferDirection,
|
||||
} from './transfer'
|
||||
import type { TransferPanelInstance } from './transfer-panel'
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'ElTransfer',
|
||||
@ -165,11 +164,7 @@ const optionRender = computed(() => (option: TransferDataItem) => {
|
||||
)
|
||||
})
|
||||
|
||||
defineExpose<{
|
||||
clearQuery: (which: TransferDirection) => void
|
||||
leftPanel: Ref<TransferPanelInstance | undefined>
|
||||
rightPanel: Ref<TransferPanelInstance | undefined>
|
||||
}>({
|
||||
defineExpose({
|
||||
/** @description clear the filter keyword of a certain panel */
|
||||
clearQuery,
|
||||
/** @description left panel ref */
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type Tree from './tree.vue'
|
||||
|
||||
export type TreeInstance = InstanceType<typeof Tree>
|
||||
export type TreeInstance = InstanceType<typeof Tree> & unknown
|
||||
|
@ -54,4 +54,4 @@ export const uploadContentProps = buildProps({
|
||||
|
||||
export type UploadContentProps = ExtractPropTypes<typeof uploadContentProps>
|
||||
|
||||
export type UploadContentInstance = InstanceType<typeof UploadContent>
|
||||
export type UploadContentInstance = InstanceType<typeof UploadContent> & unknown
|
||||
|
@ -16,4 +16,4 @@ export const uploadDraggerEmits = {
|
||||
}
|
||||
export type UploadDraggerEmits = typeof uploadDraggerEmits
|
||||
|
||||
export type UploadDraggerInstance = InstanceType<typeof UploadDragger>
|
||||
export type UploadDraggerInstance = InstanceType<typeof UploadDragger> & unknown
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user