15815213711
2025-07-30 1334d406f5c06c60d6f222ba5bba685a597c984e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<script setup lang="ts">
  import {computed} from "vue";
 
  const props = defineProps({
    radius:{
      type:[String,Number],
      default: 10,
    },
    background:{
      type:String,
    },
    block:{
      type: Boolean,
      default: false
    }
  })
  const  styleName = computed(()=>{
    return{
      borderRadius: `${props.radius}px`,
      background: props.background
    }
  })
</script>
 
<template>
  <div class="basic-container" :style="styleName" :class="{'basic-container--block':block}">
    <el-card class="basic-container__card">
      <slot></slot>
    </el-card>
  </div>
</template>
 
<style scoped lang="scss">
 
.basic-container {
  padding: 10px 10px;
  box-sizing: border-box;
  &--block {
    height: 100%;
    .basic-container__card {
      height: 100%;
    }
  }
  &__card {
    width: 100%;
  }
 
}
</style>