赞
踩
效果图:
组件代码:dialogHeader.vue
<template> <div class="header-title"> <span class="title-name">{{ dialogTittle }}</span> <span style="float: right; margin-right: 44px; margin-top: 9px;color:#909399; cursor: pointer;" :class="flodIconClass" @click="() => isFullscreen"></span> </div> </template> <script> export default { props: { dialogTittle: { type: String, default: () => '' }, fullscreen: { type: Boolean, default: () => false } }, data () { return { header_box: { 'display': 'flex', 'align-items': 'center' } } }, computed: { flodIconClass() { return this.fullscreen ? 'el-icon-full-screen' : 'el-icon-copy-document'; }, isFullscreen() { this.$emit('is-fullscreen', !this.fullscreen); }, closed() { this.$emit('handle-closed', 2) } }, created() { }, methods: { }, mounted() { }, } </script>
1 导入注册组件
2 使用dialogHeader组件
3 是否为全屏
相似博客
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。