mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
32 lines
576 B
Vue
32 lines
576 B
Vue
<template>
|
|
<aside :class="ns.b()" :style="style">
|
|
<slot />
|
|
</aside>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { computed } from 'vue'
|
|
import { useNamespace } from '@element-plus/hooks'
|
|
|
|
import type { CSSProperties } from 'vue'
|
|
|
|
defineOptions({
|
|
name: 'ElAside',
|
|
})
|
|
const props = defineProps({
|
|
/**
|
|
* @description width of the side section
|
|
*/
|
|
width: {
|
|
type: String,
|
|
default: null,
|
|
},
|
|
})
|
|
|
|
const ns = useNamespace('aside')
|
|
const style = computed(
|
|
() =>
|
|
(props.width ? ns.cssVarBlock({ width: props.width }) : {}) as CSSProperties
|
|
)
|
|
</script>
|