mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-09 04:31:35 +08:00
refactor: remove some exported interfaces of select, may break some codes
This commit is contained in:
parent
e82d3b0760
commit
74cf920a76
@ -1,6 +1,6 @@
|
||||
import { h, defineComponent, PropType } from 'vue'
|
||||
import { TreeNode } from 'treemate'
|
||||
import type { SelectGroupOption } from '../../../select'
|
||||
import type { SelectGroupOption } from '../../../select/src/interface'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'NBaseSelectGroupHeader',
|
||||
|
@ -23,9 +23,10 @@ import type { ScrollbarInst } from '../../../scrollbar'
|
||||
import type {
|
||||
SelectBaseOption,
|
||||
SelectGroupOption,
|
||||
SelectIgnoredOption
|
||||
} from '../../../select'
|
||||
import type { Value, SelectTreeMate } from '../../../select/src/interface'
|
||||
SelectIgnoredOption,
|
||||
Value,
|
||||
SelectTreeMate
|
||||
} from '../../../select/src/interface'
|
||||
import { formatLength } from '../../../_utils'
|
||||
import { createKey } from '../../../_utils/cssr'
|
||||
import { useTheme } from '../../../_mixins'
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
import { internalSelectionMenuInjectionKey } from './SelectMenu'
|
||||
import { TreeNode } from 'treemate'
|
||||
import { useMemo } from 'vooks'
|
||||
import type { SelectBaseOption } from '../../../select'
|
||||
import type { SelectBaseOption } from '../../../select/src/interface'
|
||||
import { CheckmarkIcon } from '../../icons'
|
||||
import NBaseIcon from '../../icon'
|
||||
|
||||
|
@ -14,6 +14,7 @@ import {
|
||||
onMounted
|
||||
} from 'vue'
|
||||
import { VOverflow, VOverflowRef } from 'vueuc'
|
||||
import type { SelectBaseOption } from '../../../select/src/interface'
|
||||
import { NPopover } from '../../../popover'
|
||||
import { NTag } from '../../../tag'
|
||||
import { useTheme } from '../../../_mixins'
|
||||
@ -23,7 +24,6 @@ import { internalSelectionLight } from '../styles'
|
||||
import type { InternalSelectionTheme } from '../styles'
|
||||
import Suffix from './Suffix'
|
||||
import style from './styles/index.cssr'
|
||||
import type { SelectBaseOption } from '../../../select'
|
||||
import type { TagRef } from '../../../tag/src/Tag'
|
||||
|
||||
export interface InternalSelectionInst {
|
||||
|
@ -29,7 +29,7 @@ import type {
|
||||
SelectBaseOption,
|
||||
SelectGroupOption,
|
||||
SelectIgnoredOption
|
||||
} from '../../select'
|
||||
} from '../../select/src/interface'
|
||||
import { autoCompleteLight } from '../styles'
|
||||
import type { AutoCompleteTheme } from '../styles'
|
||||
import { mapAutoCompleteOptionsToSelectOptions } from './utils'
|
||||
|
@ -1,4 +1,7 @@
|
||||
import { SelectGroupOption, SelectMixedOption } from '../../select'
|
||||
import {
|
||||
SelectGroupOption,
|
||||
SelectMixedOption
|
||||
} from '../../select/src/interface'
|
||||
|
||||
export type AutoCompleteOption =
|
||||
| AutoCompleteBaseOption
|
||||
|
@ -17,7 +17,7 @@ import type {
|
||||
SelectBaseOption,
|
||||
SelectGroupOption,
|
||||
SelectIgnoredOption
|
||||
} from '../../select'
|
||||
} from '../../select/src/interface'
|
||||
import { InternalSelectMenuRef, NInternalSelectMenu } from '../../_internal'
|
||||
import { createSelectOptions } from './utils'
|
||||
import {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { TmNode, BaseOption } from './interface'
|
||||
import type { SelectBaseOption } from '../../select'
|
||||
import type { SelectBaseOption } from '../../select/src/interface'
|
||||
|
||||
function traverseWithCallback<T extends { children?: T[] }> (
|
||||
options: T[],
|
||||
|
@ -20,7 +20,7 @@ import type {
|
||||
SelectBaseOption,
|
||||
SelectGroupOption,
|
||||
SelectIgnoredOption
|
||||
} from '../../select'
|
||||
} from '../../select/src/interface'
|
||||
import { NInternalSelectMenu } from '../../_internal'
|
||||
import type { InternalSelectMenuRef } from '../../_internal'
|
||||
import { call, useAdjustedTo, warn } from '../../_utils'
|
||||
|
@ -1,3 +1,3 @@
|
||||
import type { SelectBaseOption } from '../../select'
|
||||
import type { SelectBaseOption } from '../../select/src/interface'
|
||||
|
||||
export type MentionOption = SelectBaseOption<string>
|
||||
|
@ -1,6 +1,7 @@
|
||||
export { default as NMessageProvider } from './src/MessageProvider'
|
||||
export { useMessage } from './src/use-message'
|
||||
export type {
|
||||
MessageApiInjection as MessageApi,
|
||||
MessageProviderInst,
|
||||
MessageProviderProps,
|
||||
MessageOptions,
|
||||
|
@ -1,3 +1,2 @@
|
||||
export { default as NSelect } from './src/Select'
|
||||
export type { SelectProps } from './src/Select'
|
||||
export * from './src/interface'
|
||||
|
@ -2,7 +2,7 @@ import {
|
||||
useMessage as _useMessage,
|
||||
MessageOptions,
|
||||
MessageReactive,
|
||||
MessageApiInjection
|
||||
MessageApi
|
||||
} from 'naive-ui'
|
||||
import { icons } from './icons'
|
||||
|
||||
@ -10,7 +10,7 @@ export interface ExtendedApi {
|
||||
danger: (content: string, options: MessageOptions) => MessageReactive
|
||||
}
|
||||
|
||||
export type TsMessageApi = MessageApiInjection & ExtendedApi
|
||||
export type TsMessageApi = MessageApi & ExtendedApi
|
||||
|
||||
function useMessage (): TsMessageApi {
|
||||
const messageApi = _useMessage()
|
||||
|
Loading…
Reference in New Issue
Block a user