<script lang="ts" setup name="AlarmLayout"> const $props = defineProps({ title: { type: String, default: '', }, }) </script> <template> <app-container class="container"> <div class="layout"> <div class="header"> <div class="title"> {{ $props.title }} </div> <div> <slot name="search" /> </div> </div> </div> <div> <slot name="content" /> </div> </app-container> </template> <style lang="scss" scoped> .layout { // border: 2px solid #888; border-left: 4px solid #0d76d4; padding: 3px 6px; margin: 4px 0; .header { display: flex; justify-content: space-between; align-items: center; .title { font-size: 17px; font-weight: 700; } } } .container { background-color: #fff !important; border-radius: 5px !important; box-shadow: 0 0 12px rgb(0 0 0 / 12%); border: 1px solid #e4e7ed; overflow: hidden; } </style>