feat(Rate): count can be string

This commit is contained in:
陈嘉涵
2020-01-30 09:57:04 +08:00
parent e0cbe958a3
commit ad6087770d
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ export default createComponent({
default: 'star-o',
},
count: {
type: Number,
type: [Number, String],
default: 5,
},
touchable: {
@@ -146,7 +146,7 @@ export default createComponent({
const isVoid = status === 'void';
let style;
if (this.gutterWithUnit && score !== count) {
if (this.gutterWithUnit && score !== +count) {
style = { paddingRight: this.gutterWithUnit };
}