Files
iot-device-management-frontend/apps/web-ele/src/components/vertical-button-group/index.vue
lrl 73bddd119e style: (web-ele)优化多个组件的样式和布局
-调整图像上传组件的样式,优化上传区域和处理按钮的布局
- 改进魔方编辑器组件的样式,统一边框和对齐方式
-统一垂直按钮组组件的样式,修复按钮圆角问题
2025-08-05 15:34:25 +08:00

45 lines
1.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup lang="ts">
/**
* 垂直按钮组
* Element官方的按钮组只支持水平显示通过重写样式实现垂直布局
*/
defineOptions({ name: 'VerticalButtonGroup' });
</script>
<template>
<el-button-group v-bind="$attrs">
<slot></slot>
</el-button-group>
</template>
<style scoped lang="scss">
.el-button-group {
display: inline-flex;
flex-direction: column;
}
.el-button-group > :deep(.el-button:first-child) {
border-bottom-color: var(--el-button-divide-border-color);
border-top-right-radius: var(--el-border-radius-base);
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.el-button-group > :deep(.el-button:last-child) {
border-top-color: var(--el-button-divide-border-color);
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: var(--el-border-radius-base);
}
.el-button-group :deep(.el-button--primary:not(:first-child, :last-child)) {
border-top-color: var(--el-button-divide-border-color);
border-bottom-color: var(--el-button-divide-border-color);
}
.el-button-group > :deep(.el-button:not(:last-child)) {
margin-right: 0;
margin-bottom: -1px;
}
</style>