fix:提取AttrType类型

This commit is contained in:
MTrun 2022-02-16 20:06:51 +08:00
parent 0b58dd4d17
commit f91b1d7f8a

View File

@ -1,5 +1,7 @@
import { PublicConfigType } from '@/packages/index.d'
type AttrType = Pick<PublicConfigType, 'attr'>['attr']
type PickPublicConfigType<T extends keyof PublicConfigType> = Pick<PublicConfigType, T>[T]
type AttrType = PickPublicConfigType<'attr'>
export const useComponentStyle = (attr: AttrType, index: number) => {
const componentStyle = {