Commit 3c350de1 by Sendya

fix: #45 height overflow

parent 95ff7929
<template> <template>
<a-locale-provider :locale="locale"> <a-locale-provider :locale="locale">
<div id="app"> <div id="app">
<router-view/> <router-view/>
</div> </div>
</a-locale-provider> </a-locale-provider>
</template> </template>
<script> <script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN' import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import { deviceEnquire, DEVICE_TYPE } from '@/utils/device' import { deviceEnquire, DEVICE_TYPE } from '@/utils/device'
import { version } from 'ant-design-vue' import { version } from 'ant-design-vue'
export default { export default {
data () { data () {
return { return {
locale: zhCN, locale: zhCN,
version version
} }
}, },
mounted () { mounted () {
const { $store } = this const { $store } = this
console.log('use Ant-Design Of Vue:', version) console.log('use Ant-Design Of Vue:', version)
deviceEnquire(deviceType => { deviceEnquire(deviceType => {
switch (deviceType) { switch (deviceType) {
case DEVICE_TYPE.DESKTOP: case DEVICE_TYPE.DESKTOP:
$store.commit('TOGGLE_DEVICE', 'desktop') $store.commit('TOGGLE_DEVICE', 'desktop')
$store.dispatch('setSidebar', true) $store.dispatch('setSidebar', true)
break break
case DEVICE_TYPE.TABLET: case DEVICE_TYPE.TABLET:
console.log('tablet') console.log('tablet')
$store.dispatch('ToggleDevice', 'tablet') $store.dispatch('ToggleDevice', 'tablet')
$store.dispatch('setSidebar', false) $store.dispatch('setSidebar', false)
break break
case DEVICE_TYPE.MOBILE: case DEVICE_TYPE.MOBILE:
default: default:
$store.commit('TOGGLE_DEVICE', 'mobile') $store.commit('TOGGLE_DEVICE', 'mobile')
$store.dispatch('setSidebar', false) $store.dispatch('setSidebar', false)
break break
} }
console.log('deviceType', deviceType) console.log('deviceType', deviceType)
}) })
} }
} }
</script> </script>
\ No newline at end of file <style>
#app {
height: 100%;
}
</style>
\ No newline at end of file
<template> <template>
<div class="footer"> <div class="footer">
<div class="links"> <div class="links">
<a href="https://pro.ant.design/" target="_blank">Pro 首页</a> <a href="https://pro.ant.design/" target="_blank">Pro 首页</a>
<a href="https://github.com/ant-design/ant-design-pro" target="_blank"> <a href="https://github.com/ant-design/ant-design-pro" target="_blank">
<a-icon type="github"/> <a-icon type="github"/>
</a> </a>
<a href="https://ant.design/">Ant Design</a> <a href="https://ant.design/">Ant Design</a>
<a href="https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/">Vue Antd</a> <a href="https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/">Vue Antd</a>
<a>Antd-Vue Version@{{ version }}</a> </div>
</div> <div class="copyright">
<div class="copyright"> Copyright
Copyright <a-icon type="copyright"/>
<a-icon type="copyright"/> 2018 <span>白鹭学园技术组出品</span>
2018 <span>白鹭学园技术组出品</span> </div>
</div> </div>
</div> </template>
</template>
<script>
<script> export default {
import { version } from 'ant-design-vue' name: 'LayoutFooter',
export default { data () {
name: 'LayoutFooter', return {
data () { }
return { }
version }
} </script>
}
} <style lang="scss" scoped>
</script> .footer {
padding: 0 16px;
<style lang="scss" scoped> margin: 48px 0 24px;
.footer { text-align: center;
padding: 0 16px;
margin: 48px 0 24px; .links {
text-align: center; margin-bottom: 8px;
.links { a {
margin-bottom: 8px; color: rgba(0, 0, 0, .45);
a { &:hover {
color: rgba(0, 0, 0, .45); color: rgba(0, 0, 0, .65);
}
&:hover {
color: rgba(0, 0, 0, .65); &:not(:last-child) {
} margin-right: 40px;
}
&:not(:last-child) { }
margin-right: 40px; }
} .copyright {
} color: rgba(0, 0, 0, .45);
} font-size: 14px;
.copyright { }
color: rgba(0, 0, 0, .45); }
font-size: 14px;
}
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment