viewport.vue 1.5 KB
Newer Older
M
init  
miaodian 已提交
1 2 3 4
<template>
  <div class="docs-view">
    <side-list :nav-list="navList"></side-list>
    <router-view class="page-doc md-body" v-highlight></router-view>
D
sync  
dolymood 已提交
5
    <display></display>
M
init  
miaodian 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
  </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 {
D
sync  
dolymood 已提交
23
        navList: menuConfig[this.lang]
M
init  
miaodian 已提交
24 25 26 27 28 29 30 31 32 33 34 35 36 37
      }
    },
    components: {
      SideList,
      Display
    }
  }
</script>

<style lang="stylus" rel="stylesheet/stylus">
  .docs-view
    display: flex
    width: 100%
    height: 100%
A
AmyFoxFN 已提交
38
    flex-wrap: wrap
M
init  
miaodian 已提交
39
  .page-sidelist
A
AmyFoxFN 已提交
40 41 42 43 44 45 46
    @media screen and (min-width: 960px)
      flex: none
      width: 190px
      height: 100%
    @media screen and (max-width: 960px)
      flex: 1 1 100%
      height: 40px
M
init  
miaodian 已提交
47 48 49 50
    padding: 40px 20px
    box-sizing: border-box
    overflow-y: auto
  .page-doc
A
AmyFoxFN 已提交
51 52 53 54 55 56
    @media screen and (min-width: 960px)
      flex: 1
      height: 100%
    @media screen and (max-width: 960px)
      flex: 1 1 100%
      height: 600px
D
sync  
dolymood 已提交
57
    padding: 44px 20px 20px 20px
M
init  
miaodian 已提交
58 59
    box-sizing: border-box
    overflow-y: auto
D
sync  
dolymood 已提交
60 61
    h2:first-child
      margin-top: 0
M
init  
miaodian 已提交
62
  .page-display
A
AmyFoxFN 已提交
63 64 65 66 67 68
    @media screen and (min-width: 960px)
      flex: 1
      height: 100%
    @media screen and (max-width: 960px)
      flex: 1 1 100%
      height: 800px
M
init  
miaodian 已提交
69 70 71 72 73
    flex: none
    width: 420px
    height: 100%
    overflow-y: auto
</style>