refactor: remove some exported interfaces of select, may break some codes

This commit is contained in:
07akioni 2021-04-18 23:12:49 +08:00
parent e82d3b0760
commit 74cf920a76
13 changed files with 19 additions and 15 deletions

View File

@ -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',

View File

@ -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'

View File

@ -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'

View File

@ -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 {

View File

@ -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'

View File

@ -1,4 +1,7 @@
import { SelectGroupOption, SelectMixedOption } from '../../select'
import {
SelectGroupOption,
SelectMixedOption
} from '../../select/src/interface'
export type AutoCompleteOption =
| AutoCompleteBaseOption

View File

@ -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 {

View File

@ -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[],

View File

@ -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'

View File

@ -1,3 +1,3 @@
import type { SelectBaseOption } from '../../select'
import type { SelectBaseOption } from '../../select/src/interface'
export type MentionOption = SelectBaseOption<string>

View File

@ -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,

View File

@ -1,3 +1,2 @@
export { default as NSelect } from './src/Select'
export type { SelectProps } from './src/Select'
export * from './src/interface'

View File

@ -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()