import type { PisellNumberProps } from '../pisellNumber'; /** * 从 @pisell/utils 重新导出公共类型 */ export type { DisplayState, ValidationResult, NumberInputState, BaseNumberInputProps, } from '@pisell/utils'; /** * PisellCurrency 组件 Props 类型定义 * * 基于 PisellNumber 扩展,专门处理货币数据 */ export interface PisellCurrencyProps extends PisellNumberProps { /** * 货币符号 * @default '¥' * @example '¥', '$', '€', '£', '₩', '₽' */ currencySymbol?: string; /** * 货币符号位置 * - before: 前置,如 ¥100 * - after: 后置,如 100€ * @default 'before' */ symbolPosition?: 'before' | 'after'; /** * 是否显示货币符号 * @default true */ showSymbol?: boolean; /** * 货币代码(用于国际化标识) * @example 'CNY', 'USD', 'EUR', 'GBP' */ currencyCode?: string; /** * 是否允许负数 * @default true * @description * - true: 允许负数(如退款场景) * - false: 不允许负数(如商品价格) */ allowNegative?: boolean; /** * 小数精度 * @default 2 * @description 货币默认保留2位小数,符合财务规范 */ precision?: number; /** * 是否使用千分位分隔符 * @default true * @description 货币默认启用千分位,符合财务规范 * @example 1234.56 → 1,234.56 */ useGrouping?: boolean; }