/** * 按钮功能类型 */ export type ButtonFunctionType = 'buyNow' | 'addCart' | 'learnMore'; /** * 产品卡片语义化名称 */ export type SceneProductCardSemanticName = 'card' | 'cardSelected' | 'tags' | 'checkbox' | 'image' | 'title' | 'priceWrapper' | 'currentPrice' | 'originalPrice'; /** * SceneShelf 语义化类名 */ export type SceneShelfSemanticName = 'root' | 'header' | 'title' | 'subtitle' | 'sceneList' | 'scene' | 'content' | 'productList' | 'footer' | 'totalPrice' | 'currentTotalPrice' | 'originalTotalPrice' | 'buttonGroup' | SceneProductCardSemanticName; /** * 产品标签数据 */ export interface ProductTag { /** 标签文本 */ label: string; /** 标签样式变体 */ variant?: 'outline' | 'fill'; } /** * 价格数据接口 */ export interface PriceData { /** 价格数值 */ value: number; /** 格式化后的价格字符串 */ formatted: string; } /** * 产品卡片数据接口 */ export interface SceneProductCardData { /** 产品唯一标识 */ id: string; /** 产品名称 */ title: string; /** 自定义产品名称 */ custom_name?: string; /** 产品图片 URL */ imageUrl: string; /** 产品图片 Alt */ imageAlt?: string; /** 当前价格 */ currentPrice: PriceData; /** 原价(可选,用于显示删除线价格) */ originalPrice?: PriceData; /** 产品标签列表 */ tags?: ProductTag[]; /** 是否默认选中 */ defaultSelected?: boolean; /** 产品链接 */ href?: string; /** 是否售罄 */ soldOut?: boolean; }