<template>
  <view :class="{'container-center': auto}" :style="auto ? sylesCenter : ''">
    <slot></slot>
  </view>
</template>

<script>
import props from './prop.js'

export default {
  // #ifdef MP-WEIXIN
  // 将自定义节点设置成虚拟的，更加接近Vue组件的表现，能更好的使用flex属性
  options: {
      virtualHost: true
  },
  // #endif
  name: 'm-simple-container',
  mixins: [props],
  data() {
	  return {
		  sylesCenter: `display: flex;flex-direction: column;justify-content: center;align-items: center;`
	  }
  }
}
</script>

<style scoped>
.container-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
</style>

