<!--弹窗标题--> <template> <div class="headBox"> <div class="title">{{ title }}</div> <div class="clear" @click="close"> <i class="el-icon-error"></i> </div> </div> </template> <script> export default { props: { title: { type: String, require: true } }, methods: { close() { this.$emit('close') } } } </script> <style lang="scss" scoped> .headBox { display: flex; margin: 20px; align-items: center; font-size: 24px; justify-content: space-between; .clear { font-size: 30px; cursor: pointer; } } </style>