@@ -0,0 +1,39 @@ | |||||
<template> | |||||
<div class="card-header"> | |||||
<div v-if="hasLeft"> | |||||
<slot name="left" /> | |||||
</div> | |||||
<div class="title"> | |||||
<slot name="title" /> | |||||
</div> | |||||
<div> | |||||
<slot name="right" /> | |||||
</div> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
data() { | |||||
return { | |||||
hasLeft: false, | |||||
} | |||||
}, | |||||
mounted() { | |||||
this.hasLeft = !!this.$slots.left; | |||||
} | |||||
} | |||||
</script> | |||||
<style lang="less" scoped> | |||||
.card-header { | |||||
display: flex; | |||||
justify-content: space-between; | |||||
height: 44px; | |||||
line-height: 44px; | |||||
.title { | |||||
font-size: 18px; | |||||
} | |||||
} | |||||
</style> |
@@ -160,7 +160,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import CardHeader from "./card-header"; | |||||
import CardHeader from "@/components/card-header"; | |||||
import { isNil } from "lodash"; | import { isNil } from "lodash"; | ||||
import { wrapErrorHint } from "@/utils/request"; | import { wrapErrorHint } from "@/utils/request"; | ||||
import { firstCharToLowerCase, firstCharToUpperCase } from "@/utils/tool"; | import { firstCharToLowerCase, firstCharToUpperCase } from "@/utils/tool"; | ||||