| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <template>
- <div class="d-catalog">
- <div class="d-header">
- <span>{{ title }}</span>
- <div class="h-right" v-if="slots.headerRight">
- <a-space>
- <slot name="headerRight"></slot>
- </a-space>
- </div>
- </div>
- <div class="d-content" v-if="slots.content">
- <slot name="content"></slot>
- </div>
- </div>
- </template>
- <script setup>
- import { useSlots } from "vue";
- const props = defineProps({
- title: {
- required: true,
- default: '标题',
- },
- });
- const slots = useSlots()
- </script>
- <style lang="scss" scoped>
- .d-catalog {
- width: 100%;
- height: 100%;
- .d-header {
- font-size: 16px;
- font-weight: 600;
- padding: 10px 0 10px 10px;
- border-bottom: 1px solid #e4e7ed;
- cursor: pointer;
- position: relative;
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 10px;
- &::before {
- width: 4px;
- height: 18px;
- background: var(--vxe-ui-font-primary-color);
- position: absolute;
- left: 0;
- top: 50%;
- transform: translateY(-50%);
- content: '';
- border-radius: 4px;
- }
- .h-right {
- position: absolute;
- right: 0;
- bottom: 6px;
- }
- }
- .d-content {
- width: 100%;
- height: 100%;
- padding: 20px 0;
- }
- }
- </style>
|