| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | name: 'App', |
| | | } |
| | |
| | | <template> |
| | | <div class="content-box" :class="{'no-border': noborder}"> |
| | | <div class="content-box-container" :class="{'content-box-hide': hide}"> |
| | | <div class="toggle-flag" |
| | | v-if="toggle" |
| | | @click="toggleChange"> |
| | | <i class="el-icon-arrow-left"></i> |
| | | </div> |
| | | <div class="content-box" :class="{'no-border': noborder}" v-show="!hide"> |
| | | <div class="content-box-title" :class="getTitlePos" v-if="!noHeader"> |
| | | <slot name="title">{{title}}</slot> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="content-box-footer"> |
| | | <slot name="footer"></slot> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | noHeader: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | toggle: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | hide: false |
| | | } |
| | | }, |
| | | methods: { |
| | | toggleChange() { |
| | | console.log(this.hide); |
| | | this.hide = this.hide?false:true; |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .content-box-container { |
| | | position: relative; |
| | | box-sizing: border-box; |
| | | height: 100%; |
| | | } |
| | | .content-box { |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | text-align: left; |
| | | } |
| | | .content-box-content { |
| | | position: relative; |
| | | flex: 1; |
| | | margin-top: 4px; |
| | | margin-left: 4px; |
| | |
| | | line-height: 32px; |
| | | font-weight: bold; |
| | | } |
| | | .toggle-flag { |
| | | position: absolute; |
| | | font-size: 20px; |
| | | width: 20px; |
| | | line-height: 40px; |
| | | right: 1px; |
| | | top: 50%; |
| | | margin-top: -20px; |
| | | z-index: 9999; |
| | | background-color: #000000; |
| | | border-top-left-radius: 8px; |
| | | border-bottom-left-radius: 8px; |
| | | } |
| | | .toggle-flag:hover { |
| | | cursor: pointer; |
| | | background-color: #252424; |
| | | } |
| | | .content-box-container .toggle-flag { |
| | | transition: 0.5s ease; |
| | | } |
| | | .content-box-hide .toggle-flag { |
| | | right: -21px; |
| | | transform: rotate(180deg); |
| | | transition: 0.5s ease; |
| | | } |
| | | |
| | | .content-box-container { |
| | | transition: 0.5s ease; |
| | | } |
| | | .content-box-container.content-box-hide { |
| | | width: 0 !important; |
| | | transition: 0.5s ease; |
| | | } |
| | | </style> |
| | | |
| | | |
| | |
| | | }, |
| | | legend: { |
| | | show: false, |
| | | orient: 'vertical', |
| | | left: 'left', |
| | | data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎'] |
| | | }, |
| | | series: [ |
| | | { |
| | |
| | | user-select: none; |
| | | } |
| | | .show-drawer { |
| | | transform: translateX(360px) |
| | | transform: translateX(360px); |
| | | } |
| | | </style> |
| | | |
| | |
| | | <template> |
| | | <flex-layout direction="row" class="page-index"> |
| | | <content-box title="站点列表" |
| | | slot="header" style="width:320px"> |
| | | slot="header" |
| | | toggle |
| | | style="width:320px"> |
| | | <my-el-tree |
| | | :data="data" |
| | | @node-click="nodeClick"></my-el-tree> |