Skip to content

Commit

Permalink
feat(analysis-middle): basic layout of analysis__layout
Browse files Browse the repository at this point in the history
  • Loading branch information
lbwa committed Sep 26, 2018
1 parent 1a09ba7 commit 670d092
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
37 changes: 37 additions & 0 deletions src/components/AnalysisMiddle.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<template>
<el-card class="analysis__middle">
<header class="middle__header" slot="header">
<span class="middle__header__title">线上热门搜索</span>
<el-dropdown class="middle__header__icon">
<el-button style="padding: 3px 0" type="text">...</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>操作一</el-dropdown-item>
<el-dropdown-item>操作二</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</header>
<main class="analysis__middle__main"><slot></slot></main>
</el-card>
</template>

<script>
export default {
}
</script>

<style lang="sass" scoped>
.analysis
&__middle
margin-top: 24px
.middle
&__header
display: flex
align-items: center
&__icon
margin-left: auto
</style>
12 changes: 11 additions & 1 deletion src/view/Analysis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@
<analysis-tab
:chart-data="totalSalesData"
></analysis-tab>
<el-row class="analysis__search-sales" :gutter="24">
<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
<analysis-middle></analysis-middle>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
<analysis-middle></analysis-middle>
</el-col>
</el-row>
</el-main>
</template>

Expand All @@ -97,6 +105,7 @@ import ChartLine from 'COMPONENTS/ChartLine'
import ChartBar from 'COMPONENTS/ChartBar'
import MiniProgress from 'COMPONENTS/MiniProgress'
import AnalysisTab from 'COMPONENTS/AnalysisTab'
import AnalysisMiddle from 'COMPONENTS/AnalysisMiddle'
import Trend from 'COMPONENTS/Trend'
import { mapState, mapActions } from 'vuex'
import {
Expand Down Expand Up @@ -208,7 +217,8 @@ export default {
ChartLine,
ChartBar,
MiniProgress,
AnalysisTab
AnalysisTab,
AnalysisMiddle
}
}
</script>
Expand Down

0 comments on commit 670d092

Please # to comment.