cultivationApp/node_modules/uview-plus/components/u-badge/props.js

79 lines
2.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import defprops from '../../libs/config/props';
export default {
props: {
// 是否显示圆点
isDot: {
type: Boolean,
default: defprops.badge.isDot
},
// 显示的内容
value: {
type: [Number, String],
default: defprops.badge.value
},
// 显示的内容
modelValue: {
type: [Number, String],
default: defprops.badge.modelValue
},
// 是否显示
show: {
type: Boolean,
default: defprops.badge.show
},
// 最大值,超过最大值会显示 '{max}+'
max: {
type: [Number, String],
default: defprops.badge.max
},
// 主题类型error|warning|success|primary
type: {
type: String,
default: defprops.badge.type
},
// 当数值为 0 时,是否展示 Badge
showZero: {
type: Boolean,
default: defprops.badge.showZero
},
// 背景颜色优先级比type高如设置type参数会失效
bgColor: {
type: [String, null],
default: defprops.badge.bgColor
},
// 字体颜色
color: {
type: [String, null],
default: defprops.badge.color
},
// 徽标形状circle-四角均为圆角horn-左下角为直角
shape: {
type: String,
default: defprops.badge.shape
},
// 设置数字的显示方式overflow|ellipsis|limit
// overflow会根据max字段判断超出显示`${max}+`
// ellipsis会根据max判断超出显示`${max}...`
// limit会依据1000作为判断条件超出1000显示`${value/1000}K`比如2.2k、3.34w最多保留2位小数
numberType: {
type: String,
default: defprops.badge.numberType
},
// 设置badge的位置偏移格式为 [x, y]也即设置的为top和right的值absolute为true时有效
offset: {
type: Array,
default: defprops.badge.offset
},
// 是否反转背景和字体颜色
inverted: {
type: Boolean,
default: defprops.badge.inverted
},
// 是否绝对定位
absolute: {
type: Boolean,
default: defprops.badge.absolute
}
}
}