🐛(component): 修复 side 组件 width 属性失效

This commit is contained in:
就眠儀式
2022-05-04 05:08:46 +08:00
parent 6a46d0de8a
commit 3713bd2e6a
3 changed files with 6 additions and 4 deletions

View File

@@ -13,12 +13,13 @@ export interface LaySideProps {
}
const props = withDefaults(defineProps<LaySideProps>(), {
width: "200",
width: "200px",
});
const styles = computed<CSSProperties>(() => {
return {
width: `${props.width}px`,
"flex": `0 0 ${props.width}`,
"width": `${props.width}`
};
});
</script>