mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* docs(components): [container] * docs(components): [container] * docs(components): [container]
35 lines
607 B
Vue
35 lines
607 B
Vue
<template>
|
|
<header :class="ns.b()" :style="style">
|
|
<slot />
|
|
</header>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
import { computed } from 'vue'
|
|
import { useNamespace } from '@element-plus/hooks'
|
|
|
|
import type { CSSProperties } from 'vue'
|
|
|
|
defineOptions({
|
|
name: 'ElHeader',
|
|
})
|
|
|
|
const props = defineProps({
|
|
/**
|
|
* @description height of the header
|
|
*/
|
|
height: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
})
|
|
|
|
const ns = useNamespace('header')
|
|
const style = computed(() => {
|
|
return props.height
|
|
? (ns.cssVarBlock({
|
|
height: props.height,
|
|
}) as CSSProperties)
|
|
: {}
|
|
})
|
|
</script>
|