Commit 9c591c536cd7a7b73c5195d97cae80366addff49
1 parent
0f1d401f
Exists in
master
and in
3 other branches
feat: 新增Filter折叠状态的span
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
packages/filter/index.vue
| @@ -36,6 +36,10 @@ export default { | @@ -36,6 +36,10 @@ export default { | ||
| 36 | type: Number, | 36 | type: Number, |
| 37 | default: 6, | 37 | default: 6, |
| 38 | }, | 38 | }, |
| 39 | + collapsedSpan: { | ||
| 40 | + type: Number, | ||
| 41 | + default: 6, | ||
| 42 | + }, | ||
| 39 | uncollapsedSpan: { | 43 | uncollapsedSpan: { |
| 40 | type: Number, | 44 | type: Number, |
| 41 | default: 24, | 45 | default: 24, |
| @@ -67,7 +71,7 @@ export default { | @@ -67,7 +71,7 @@ export default { | ||
| 67 | }, | 71 | }, |
| 68 | computed: { | 72 | computed: { |
| 69 | formattedList() { | 73 | formattedList() { |
| 70 | - return [...this.list, { key: 'operation', label: '', labelWidth: '0px', span: !this.collapsed ? this.uncollapsedSpan : undefined }]; | 74 | + return [...this.list, { key: 'operation', label: '', labelWidth: '0px', span: this.collapsed ? this.collapsedSpan : this.uncollapsedSpan }]; |
| 71 | }, | 75 | }, |
| 72 | showCollapsed() { | 76 | showCollapsed() { |
| 73 | const { list, visibleNum } = this; | 77 | const { list, visibleNum } = this; |