viewport.vue 1.8 KB
Newer Older
M
init  
miaodian 已提交
1 2
<template>
  <div class="docs-view">
F
funanamy 已提交
3
    <div class="nav-list-wrapper">
A
AmyFoxFN 已提交
4 5
      <side-list :nav-list="navList"></side-list>
    </div>
F
funanamy 已提交
6
    <router-view class="page-doc md-body" v-highlight></router-view>
D
sync  
dolymood 已提交
7
    <display></display>
M
init  
miaodian 已提交
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  </div>
</template>

<script>
  import SideList from '../side-list/side-list.vue'
  import Display from '../display/display.vue'
  import menuConfig from '../../common/config/menu'

  export default {
    props: {
      lang: {
        type: String,
        default: 'zh-CN'
      }
    },
    data() {
      return {
A
AmyFoxFN 已提交
25
        navList: menuConfig[this.lang],
F
funanamy 已提交
26
        showCatalog: false
A
AmyFoxFN 已提交
27 28
      }
    },
M
init  
miaodian 已提交
29 30 31 32 33 34 35 36
    components: {
      SideList,
      Display
    }
  }
</script>

<style lang="stylus" rel="stylesheet/stylus">
A
AmyFoxFN 已提交
37 38
  @import "~@/common/stylus/variable.styl"

M
init  
miaodian 已提交
39 40 41 42
  .docs-view
    display: flex
    width: 100%
    height: 100%
A
AmyFoxFN 已提交
43
    flex-wrap: wrap
F
funanamy 已提交
44
    .catalog-toggle
F
funanamy 已提交
45 46 47 48
      display: none
      @media screen and (max-width: 960px)
        display: block
        margin: -68px 0 0 20px
A
AmyFoxFN 已提交
49 50
    .nav-list-wrapper
      @media screen and (max-width: 960px)
F
funanamy 已提交
51 52 53 54
        position: fixed
        left: -190px
        top: 0
        height: 100%
A
AmyFoxFN 已提交
55
        overflow: hidden
F
funanamy 已提交
56
        transition: all 250ms ease
M
init  
miaodian 已提交
57
  .page-sidelist
F
funanamy 已提交
58 59 60 61
    flex: none
    width: 190px
    height: 100%
    padding: 40px 20px
M
init  
miaodian 已提交
62 63 64
    box-sizing: border-box
    overflow-y: auto
  .page-doc
F
funanamy 已提交
65 66 67
    flex: 1
    height: 100%
    padding: 44px 20px 20px 20px
M
init  
miaodian 已提交
68 69
    box-sizing: border-box
    overflow-y: auto
F
funanamy 已提交
70 71 72 73
    @media screen and (max-width: 960px)
      flex: 1 1 100%
      height: auto
      padding: 20px 20px 0 20px
D
sync  
dolymood 已提交
74 75
    h2:first-child
      margin-top: 0
M
init  
miaodian 已提交
76 77
  .page-display
    flex: none
F
funanamy 已提交
78
    height: 100%
M
init  
miaodian 已提交
79 80
    width: 420px
    overflow-y: auto
F
funanamy 已提交
81 82 83
    @media screen and (max-width: 960px)
      flex: 1 1 100%
      height: 800px
M
init  
miaodian 已提交
84
</style>