Skip to content

Commit c63b757

Browse files
Samuell1marcosmoura
authored andcommitted
feat(MdTable): allow custom value for mdHeight (#1522)
* feat(MdTable): allow custom value for mdHeight * feat(MdTable): auto cast number with px
1 parent e7f8f34 commit c63b757

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/MdTable/MdTable.vue

+5-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
mdCard: Boolean,
9191
mdFixedHeader: Boolean,
9292
mdHeight: {
93-
type: Number,
93+
type: [Number, String],
9494
default: 400
9595
},
9696
mdSort: String,
@@ -180,7 +180,10 @@
180180
},
181181
contentStyles () {
182182
if (this.mdFixedHeader) {
183-
return `height: ${this.mdHeight}px;max-height: ${this.mdHeight}px`
183+
const height = typeof this.mdHeight === 'number'
184+
? `${this.mdHeight}px`
185+
: this.mdHeight
186+
return `height: ${height};max-height: ${height}`
184187
}
185188
},
186189
contentClasses () {

0 commit comments

Comments
 (0)