From c7da5fec551f4db14f9f8ac13a543e504f907cc1 Mon Sep 17 00:00:00 2001 From: agileago Date: Mon, 25 Nov 2024 13:49:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=BC=E5=87=BA=E7=B1=BB=E5=92=8C?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/module/basic/simple-component/index.view.tsx | 4 ++-- src/index.ts | 1 + src/type.ts | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/example/module/basic/simple-component/index.view.tsx b/example/module/basic/simple-component/index.view.tsx index b13e408..c8c501f 100644 --- a/example/module/basic/simple-component/index.view.tsx +++ b/example/module/basic/simple-component/index.view.tsx @@ -1,9 +1,9 @@ import { defineComponent, useClassAndStyle } from 'vue3-oop' -import { AllowedComponentProps } from '@/type' +import { ClassAndStyleProps } from '@/type' import { ref } from 'vue' // region 函数组件 -export interface SimpleFuncComponentProps extends AllowedComponentProps { +export interface SimpleFuncComponentProps extends ClassAndStyleProps { count?: number } export function SimpleFuncComponent(props: SimpleFuncComponentProps) { diff --git a/src/index.ts b/src/index.ts index da59164..75371cd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,4 +28,5 @@ export type { WithVModel, ComponentPropsObject, Hanlder, + ClassAndStyleProps, } from './type' diff --git a/src/type.ts b/src/type.ts index 7aedb71..54bf30e 100644 --- a/src/type.ts +++ b/src/type.ts @@ -73,7 +73,7 @@ export type ComponentSlots = NonNullable< /** 为了阻止ts把不相关的类也解析到metadata数据中,用这个工具类型包装一下类 */ export type ClassType = T -export type AllowedComponentProps = { +export type ClassAndStyleProps = { class?: any style?: StyleValue [name: string]: any @@ -90,5 +90,5 @@ export type VueComponentProps = DistributiveOmit & DistributiveVModel & DistributiveVSlots & VNodeProps & - AllowedComponentProps & + ClassAndStyleProps & ComponentCustomProps