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

删除count对数组支持

parent f8dde6a5
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
}, },
// 显示的数值内容 // 显示的数值内容
count: { count: {
type: [Number, String, Array] type: [Number, String]
}, },
// 展示封顶的数字值 // 展示封顶的数字值
overflowCount: { overflowCount: {
...@@ -98,14 +98,10 @@ export default { ...@@ -98,14 +98,10 @@ export default {
// isDot类型时,不显示文字 // isDot类型时,不显示文字
showText() { showText() {
if (this.isDot) return ""; if (this.isDot) return "";
if (Array.isArray(this.count)) { else {
if (this.count.length > this.overflowCount) { if (this.count > this.overflowCount)
return `${this.overflowCount}+`; return `${this.overflowCount}+`;
} else return this.count.length; else return this.count;
} else {
if (this.count > this.overflowCount) {
return `${this.overflowCount}+`;
} 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