-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Perf]: component typings & fix select component multiple mode style …
…err (#233) * fix(component): type deduction * chore(hooks): update hooks version
- Loading branch information
Showing
36 changed files
with
111 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import type { InjectionKey } from 'vue' | ||
import type { AvatarContext } from './interface' | ||
|
||
export const READONLY_AVATAR_KEY = Symbol('avatarKey') | ||
export const READONLY_AVATAR_KEY: InjectionKey<AvatarContext> = Symbol('avatarKey') | ||
|
||
export const createAvatarContext = () => createProvider(READONLY_AVATAR_KEY) | ||
|
||
export const useAvatarContext = () => useProvider<AvatarContext>(READONLY_AVATAR_KEY) | ||
export const useAvatarContext = () => useProvider(READONLY_AVATAR_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import type { InjectionKey } from 'vue' | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import type { TransformStyles } from './interface' | ||
|
||
const READONLY_BADGE_ANCHOR_KEY = Symbol('badgeAnchorKey') | ||
const READONLY_BADGE_ANCHOR_KEY: InjectionKey<TransformStyles> = Symbol('badgeAnchorKey') | ||
|
||
export const createBadgeContext = () => createProvider(READONLY_BADGE_ANCHOR_KEY) | ||
|
||
export const useBadgeContext = () => useProvider<TransformStyles>(READONLY_BADGE_ANCHOR_KEY) | ||
export const useBadgeContext = () => useProvider(READONLY_BADGE_ANCHOR_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import type { InjectionKey } from 'vue' | ||
import type { BreadcrumbsContext } from './interface' | ||
|
||
const READONLY_BREADCRUMBS_KEY = Symbol('breadcrumbsKey') | ||
const READONLY_BREADCRUMBS_KEY: InjectionKey<BreadcrumbsContext> = Symbol('breadcrumbsKey') | ||
|
||
export const createBreadcrumbsContext = () => createProvider(READONLY_BREADCRUMBS_KEY) | ||
|
||
export const useBreadcrumbsContext = () => useProvider<BreadcrumbsContext>(READONLY_BREADCRUMBS_KEY) | ||
export const useBreadcrumbsContext = () => useProvider(READONLY_BREADCRUMBS_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import type { InjectionKey } from 'vue' | ||
import type { ButtonGroupContext } from './interface' | ||
|
||
const READONLY_BUTTON_GROUP_KEY = Symbol('buttonGroupKey') | ||
const READONLY_BUTTON_GROUP_KEY: InjectionKey<ButtonGroupContext> = Symbol('buttonGroupKey') | ||
|
||
export const createButtonGroupContext = () => createProvider(READONLY_BUTTON_GROUP_KEY) | ||
|
||
export const useButtonGroupContext = () => useProvider<ButtonGroupContext>(READONLY_BUTTON_GROUP_KEY) | ||
export const useButtonGroupContext = () => useProvider(READONLY_BUTTON_GROUP_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import type { InjectionKey } from 'vue' | ||
import type { CheckboxContext } from './interface' | ||
|
||
export const READONLY_CHECKBOX_KEY = Symbol('checkboxKey') | ||
export const READONLY_CHECKBOX_KEY: InjectionKey<CheckboxContext> = Symbol('checkboxKey') | ||
|
||
export const createCheckboxContext = () => createProvider(READONLY_CHECKBOX_KEY) | ||
|
||
export const useCheckboxContext = () => useProvider<CheckboxContext>(READONLY_CHECKBOX_KEY) | ||
export const useCheckboxContext = () => useProvider(READONLY_CHECKBOX_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import type { InjectionKey } from 'vue' | ||
import type { CollapseContext } from './interface' | ||
|
||
export const READONLY_COLLAPSE_KEY = Symbol('collapseKey') | ||
export const READONLY_COLLAPSE_KEY: InjectionKey<CollapseContext> = Symbol('collapseKey') | ||
|
||
export const createCollapseContext = () => createProvider(READONLY_COLLAPSE_KEY) | ||
|
||
export const useCollapseContext = () => useProvider<CollapseContext>(READONLY_COLLAPSE_KEY) | ||
export const useCollapseContext = () => useProvider(READONLY_COLLAPSE_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import type { Ref } from 'vue' | ||
import type { DeepReadonly, Ref } from 'vue' | ||
|
||
export interface CollapseContext { | ||
checked: Ref<number[]> | ||
checked: DeepReadonly<Ref<number[]>> | ||
updateCollapseGroupChecked(childIdx: number): void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import { InjectionKey } from 'vue' | ||
import type { GridGroupContext } from './interface' | ||
|
||
const READONLY_GRID_KEY = Symbol('grdiKey') | ||
const READONLY_GRID_KEY: InjectionKey<GridGroupContext> = Symbol('grdiKey') | ||
|
||
export const createGridContext = () => createProvider(READONLY_GRID_KEY) | ||
|
||
export const useGridContext = () => useProvider<GridGroupContext>(READONLY_GRID_KEY) | ||
export const useGridContext = () => useProvider(READONLY_GRID_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import type { InjectionKey } from 'vue' | ||
import type { ModalContext } from './interface' | ||
|
||
export const READONLY_MODAL_KEY = Symbol('modalKey') | ||
export const READONLY_MODAL_KEY: InjectionKey<ModalContext> = Symbol('modalKey') | ||
|
||
export const createModalContext = () => createProvider(READONLY_MODAL_KEY) | ||
|
||
export const useModalContext = () => useProvider<ModalContext>(READONLY_MODAL_KEY) | ||
export const useModalContext = () => useProvider(READONLY_MODAL_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import { InjectionKey } from 'vue' | ||
import type { PaginationContext } from './interface' | ||
|
||
const READONLY_PAGINATION_KEY = Symbol('paginationKey') | ||
const READONLY_PAGINATION_KEY: InjectionKey<PaginationContext> = Symbol('paginationKey') | ||
|
||
export const createPaginationContext = () => createProvider(READONLY_PAGINATION_KEY) | ||
|
||
export const usePaginationContext = () => useProvider<PaginationContext>(READONLY_PAGINATION_KEY) | ||
export const usePaginationContext = () => useProvider(READONLY_PAGINATION_KEY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { createProvider, useProvider } from '@fect-ui/vue-hooks' | ||
import type { InjectionKey } from 'vue' | ||
|
||
import type { RadioGroupContext } from './interface' | ||
|
||
export const READNONLY_RADIO_KEY = Symbol('radioKey') | ||
export const READNONLY_RADIO_KEY: InjectionKey<RadioGroupContext> = Symbol('radioKey') | ||
|
||
export const createRadioContext = () => createProvider(READNONLY_RADIO_KEY) | ||
|
||
export const useRadioContext = () => useProvider<RadioGroupContext>(READNONLY_RADIO_KEY) | ||
export const useRadioContext = () => useProvider(READNONLY_RADIO_KEY) |
Oops, something went wrong.