import { defineComponent, PropType } from "vue"; export type ISize = "small" | "medium" | "large"; export type IColor = | "black" | "gray" | "red" | "yellow" | "green" | "blue" | "indigo" | "purple" | "pink"; export const props = { // 新增 size: { type: String as PropType, default: "medium", }, color: { type: String as PropType, default: "blue", }, round: { type: Boolean, default: false, }, plain: { type: Boolean, default: false, }, icon: { type: String, default: "", }, } as const; export default defineComponent({ name: "VCButton", props, setup(props, { slots }) { const size = { small: { x: "2", y: "1", text: "sm", }, medium: { x: "3", y: "1.5", text: "base", }, large: { x: "4", y: "2", text: "lg", }, }; return () => ( ); }, });