App.vue 1.7 KB
Newer Older
J
Jeff Wang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
<template>
    <div id="app">
        <v-app>
            <AppMenu :initialRoute="initialRoute">
            </AppMenu>
            <router-view></router-view>
        </v-app>
    </div>
</template>

<script>
import AppMenu from './common/component/AppMenu'

export default {
    name: 'App',
    components: {
		AppMenu
    },
    data() {
        return {
            initialRoute: "scalars"
        }
    },
    created() {
        if (location.hash && location.hash != '#/') {
            this.initialRoute = /(\#\/)(\w*)([?|&]{0,1})/.exec(location.hash)[2];
        }
        else {
            location.hash = '#/scalars';
        }
    }
}
</script>

<style lang="stylus">
@import '~style/variables';
@import '../style/main';
@import url('https://fonts.googleapis.com/css?family=Merriweather+Sans:400,700');

#app {
  font-family: 'Merriweather Sans', Helvetica, Arial, sans-serif;
  font-weight: bold;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: $-content-text-color;
}

+prefix-classes('visual-dl-page-')
    .container
        padding-right 300px
        position relative
        background $-left-background-color
        .left
            width 100%
            overflow scroll
            border solid 1px $-left-border-color
            background $-left-border-color
            min-height 300px
            padding 2%
            box-sizing border-box
        .right
            overflow scroll
            width 300px
            min-height 300px
            position absolute
            right 0
            top 0
            box-sizing border-box
            font-size 14px
            font-weight normal
            .config-com
                color $-right-font-color

</style>