Commit bf7ef4b7 authored by 王博文's avatar 王博文

删除count对数组支持

parent f8dde6a5
......@@ -34,7 +34,7 @@ export default {
},
// 显示的数值内容
count: {
type: [Number, String, Array]
type: [Number, String]
},
// 展示封顶的数字值
overflowCount: {
......@@ -98,14 +98,10 @@ export default {
// isDot类型时,不显示文字
showText() {
if (this.isDot) return "";
if (Array.isArray(this.count)) {
if (this.count.length > this.overflowCount) {
else {
if (this.count > this.overflowCount)
return `${this.overflowCount}+`;
} else return this.count.length;
} else {
if (this.count > this.overflowCount) {
return `${this.overflowCount}+`;
} else return this.count;
else return this.count;
}
},
// 是否显示组件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment