2025/2/8第一次更新

This commit is contained in:
爱吃咸鱼小猫咪
2025-02-08 18:50:38 +08:00
commit d7af560866
26519 changed files with 5046029 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import type { InjectionKey } from 'vue'
import type { AvatarGroupProps } from '../components'
export type AvatarContext = {
uid: number
}
export type AvatarGroupContext = AvatarGroupProps & {
avatarItems: AvatarContext[]
addItem: (item: AvatarContext) => void
removeItem: (uid: number) => void
handleItemClick: (uid: number) => void
}
export const avatarGroupContextKey: InjectionKey<AvatarGroupContext> = Symbol(
'avatarGroupContextKey'
)
+9
View File
@@ -0,0 +1,9 @@
import type { InjectionKey } from 'vue'
import type { CheckboxGroupProps, CheckboxGroupValueType } from '../components'
export interface CheckboxGroupContext extends CheckboxGroupProps {
changeEvent: (val: CheckboxGroupValueType[number]) => void
}
export const checkboxGroupKey: InjectionKey<CheckboxGroupContext> =
Symbol('checkboxGroupKey')
+20
View File
@@ -0,0 +1,20 @@
import type { InjectionKey } from 'vue'
import type { CollapseProps } from '../components/collapse'
export type CollapseItemContext = {
uid: number
}
export type CollapseContext = Pick<
CollapseProps,
'showArrow' | 'arrowColor'
> & {
items: CollapseItemContext[]
addItem: (item: CollapseItemContext) => void
removeItem: (uid: number) => void
activeUid: number[]
handleItemClick: (uid: number) => void
}
export const collapseContextKey: InjectionKey<CollapseContext> =
Symbol('collapseContextKey')
+7
View File
@@ -0,0 +1,7 @@
import type { InjectionKey } from 'vue'
import type { FormContext, FormItemContext } from '../components'
export const formContextKey: InjectionKey<FormContext> =
Symbol('formContextKey')
export const formItemContextKey: InjectionKey<FormItemContext> =
Symbol('formItemContextKey')
+11
View File
@@ -0,0 +1,11 @@
export * from './avatar'
export * from './checkbox'
export * from './form'
export * from './radio'
export * from './tabbar'
export * from './tabs'
export * from './steps'
export * from './notice-bar'
export * from './collapse'
export * from './swipe-action'
export * from './subsection'
+9
View File
@@ -0,0 +1,9 @@
import type { InjectionKey } from 'vue'
import type { NoticeBarProps } from '../components/notice-bar'
export type NoticeBarContext = NoticeBarProps & {
play: boolean
click: (index: number) => void
}
export const noticeBarKey: InjectionKey<NoticeBarContext> = Symbol('noticeBar')
+9
View File
@@ -0,0 +1,9 @@
import type { InjectionKey } from 'vue'
import type { RadioGroupProps } from '../components'
export interface RadioGroupContext extends RadioGroupProps {
changeEvent: (val: RadioGroupProps['modelValue']) => void
}
export const radioGroupKey: InjectionKey<RadioGroupContext> =
Symbol('radioGroupKey')
+17
View File
@@ -0,0 +1,17 @@
import type { InjectionKey } from 'vue'
import type { StepsProps } from '../components/steps'
export type StepContext = {
uid: number
}
export type StepsContext = StepsProps & {
items: StepContext[]
activeUidList: number[]
addItem: (item: StepContext) => void
removeItem: (uid: number) => void
setActiveItem: (uid: number) => void
}
export const stepsContextKey: InjectionKey<StepsContext> =
Symbol('stepsContextKey')
+23
View File
@@ -0,0 +1,23 @@
import type { InjectionKey } from 'vue'
import type {
SubsectionItemProps,
SubsectionItemRect,
SubsectionProps,
} from '../components/subsection'
export type SubsectionItemContext = SubsectionItemProps & {
uid: number
element: SubsectionItemRect
}
export type SubsectionContext = SubsectionProps & {
items: SubsectionItemContext[]
activeUid: number
addItem: (item: SubsectionItemContext) => void
removeItem: (uid: number) => void
setActiveItem: (uid: number) => void
}
export const subsectionContextKey: InjectionKey<SubsectionContext> = Symbol(
'subsectionContextKey'
)
+20
View File
@@ -0,0 +1,20 @@
import type { InjectionKey } from 'vue'
import type { SwipeActionProps } from '../components'
export type SwipeActionItemContext = {
uid: number
}
export type SwiperActionContext = SwipeActionProps & {
items: SwipeActionItemContext[]
activeUid: number[]
addItem: (item: SwipeActionItemContext) => void
removeItem: (uid: number) => void
setActiveItem: (uid: number) => void
closeAllItemOption: () => void
optionClick: (uid: number, optionIndex: number) => void
}
export const swipeActionContextKey: InjectionKey<SwiperActionContext> = Symbol(
'swipeActionContextKey'
)
+19
View File
@@ -0,0 +1,19 @@
import type { InjectionKey } from 'vue'
import type { TabbarItemRect, TabbarProps } from '../components/tabbar'
export type TabbarItemContext = {
uid: number
name?: string | number
}
export type TabbarContext = TabbarProps & {
items: TabbarItemContext[]
activeUid: number
addItem: (item: TabbarItemContext) => void
removeItem: (uid: number) => void
setActiveItem: (uid: number) => void
setBulgeCircle: (rect: TabbarItemRect) => void
}
export const tabbarContextKey: InjectionKey<TabbarContext> =
Symbol('tabbarContextKey')
+20
View File
@@ -0,0 +1,20 @@
import type { InjectionKey } from 'vue'
import type { TabsItemRect, TabsProps } from '../components/tabs'
export type TabsItemContext = {
uid: number
elementRect: TabsItemRect
name?: string | number
}
export type TabsContext = TabsProps & {
items: TabsItemContext[]
activeUid: number
showBar: boolean
addItem: (item: TabsItemContext) => void
removeItem: (uid: number) => void
setActiveItem: (uid: number) => void
}
export const tabsContextKey: InjectionKey<TabsContext> =
Symbol('tabsContextKey')