layui/.svn/pristine/78/785b706b96fd4adf5c492271ca3dccd0758ba28b.svn-base
2022-12-09 16:41:41 +08:00

32 lines
534 B
Plaintext

<script lang="ts">
export default {
name: "LaySide",
};
</script>
<script setup lang="ts">
import { computed, CSSProperties } from "vue";
import "./index.less";
export interface SideProps {
width?: string | number;
}
const props = withDefaults(defineProps<SideProps>(), {
width: "200px",
});
const styles = computed<CSSProperties>(() => {
return {
flex: `0 0 ${props.width}`,
width: `${props.width}`,
};
});
</script>
<template>
<div class="layui-side" :style="styles">
<slot></slot>
</div>
</template>