23 lines
478 B
JavaScript
23 lines
478 B
JavaScript
|
import Vue from 'vue';
|
||
|
export default Vue.extend({
|
||
|
name: 'elevatable',
|
||
|
props: {
|
||
|
elevation: [Number, String]
|
||
|
},
|
||
|
computed: {
|
||
|
computedElevation() {
|
||
|
return this.elevation;
|
||
|
},
|
||
|
|
||
|
elevationClasses() {
|
||
|
const elevation = this.computedElevation;
|
||
|
if (elevation == null) return {};
|
||
|
if (isNaN(parseInt(elevation))) return {};
|
||
|
return {
|
||
|
[`elevation-${this.elevation}`]: true
|
||
|
};
|
||
|
}
|
||
|
|
||
|
}
|
||
|
});
|
||
|
//# sourceMappingURL=index.js.map
|