Change subheader tag to li inside lists

This commit is contained in:
Marcos Moura 2016-09-26 00:30:43 -03:00
parent 55ba3d712f
commit 0b42cbabb5

View file

@ -1,7 +1,18 @@
<template>
<div class="md-subheader">
<slot></slot>
</div>
</template>
<style lang="scss" src="./mdSubheader.scss"></style>
<script>
export default {
render(createElement) {
let tag = 'div';
let options = {
staticClass: 'md-subheader'
};
if (this.$parent.$options._componentTag === 'md-list') {
tag = 'li';
}
return createElement(tag, options, this.$slots.default);
}
};
</script>