Former-commit-id: 0a96bb54e9270e451e59b72e00e35053a7c0e152 Former-commit-id: c250ba90da6546626b9831847630aae786c88344 Former-commit-id: c1182b1bdc6ea9b3934275286a93e2760a643bfe
28 lines
508 B
Vue
28 lines
508 B
Vue
<template>
|
|
<div class="container-component">
|
|
<!-- [card] 卡片容器 -->
|
|
<el-card v-if="type === 'card'">
|
|
<div v-if="$slots.header" slot="header">
|
|
<slot name="header"></slot>
|
|
</div>
|
|
<slot></slot>
|
|
</el-card>
|
|
<!-- [ghost] 隐形的容器 -->
|
|
<div v-if="type === 'ghost'">
|
|
<slot></slot>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
type: {
|
|
type: String,
|
|
required: false,
|
|
default: 'card'
|
|
}
|
|
}
|
|
}
|
|
</script>
|