Files
kuboard-press/.vuepress/grid/Container.vue
huanqing.shao cfc8a2df67 grid
2019-10-04 09:58:52 +08:00

34 lines
549 B
Vue

<template>
<div class="vfg-container" :style="styleObject">
<slot></slot>
</div>
</template>
<script>
import initConfig from './utils/init-config'
export default {
name: 'container',
mixins: [initConfig],
props: {
width: String
},
computed: {
styleObject () {
return {
maxWidth: this.width || this.config.container,
paddingRight: this.config.gutter,
paddingLeft: this.config.gutter
}
}
}
}
</script>
<style>
.vfg-container {
box-sizing: border-box;
margin: auto;
}
</style>