init
This commit is contained in:
40
uni_modules/nutui-uni/components/price/price.ts
Normal file
40
uni_modules/nutui-uni/components/price/price.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { ExtractPropTypes } from 'vue'
|
||||
import { commonProps, makeNumberProp, makeNumericProp, makeStringProp, truthProp } from '../_utils'
|
||||
|
||||
export const priceProps = {
|
||||
...commonProps,
|
||||
/**
|
||||
* @description 价格数量
|
||||
*/
|
||||
price: makeNumericProp(0),
|
||||
/**
|
||||
* @description 是否需要加上 symbol 符号
|
||||
*/
|
||||
needSymbol: truthProp,
|
||||
/**
|
||||
* @description 符号类型
|
||||
*/
|
||||
symbol: makeStringProp('¥'),
|
||||
/**
|
||||
* @description 小数位位数
|
||||
*/
|
||||
decimalDigits: makeNumberProp(2),
|
||||
/**
|
||||
* @description 是否按照千分号形式显示
|
||||
*/
|
||||
thousands: Boolean,
|
||||
/**
|
||||
* @description 符号显示在价格前或者后,`before`、`after`
|
||||
*/
|
||||
position: makeStringProp<'before' | 'after'>('before'),
|
||||
/**
|
||||
* @description 价格尺寸,`small`、`normal`、`large`
|
||||
*/
|
||||
size: makeStringProp<'small' | 'normal' | 'large'>('normal'),
|
||||
/**
|
||||
* @description 是否展示划线价
|
||||
*/
|
||||
strikeThrough: Boolean,
|
||||
}
|
||||
|
||||
export type PriceProps = ExtractPropTypes<typeof priceProps>
|
||||
Reference in New Issue
Block a user