Files
element-plus/packages/components/container/src/header.vue
三咲智子 55348b30b6 style: use prettier (#3228)
* style: use prettier

* style: just prettier format, no code changes

* style: eslint fix
object-shorthand, prefer-const

* style: fix no-void

* style: no-console
2021-09-04 19:29:28 +08:00

33 lines
581 B
Vue

<template>
<header class="el-header" :style="style">
<slot></slot>
</header>
</template>
<script lang="ts">
import { computed, defineComponent } from 'vue'
import type { CSSProperties } from 'vue'
export default defineComponent({
name: 'ElHeader',
props: {
height: {
type: String,
default: null,
},
},
setup(props) {
return {
style: computed(
() =>
(props.height
? {
'--el-header-height': props.height,
}
: {}) as CSSProperties
),
}
},
})
</script>