<template>
  <div :class="classes"><slot></slot></div>
</template>
<script>
import {some} from '@uif/core/lib/utils/array'
export default {
  name: 'u-layout',
  data () {
    return {
      hasSider: false
    }
  },
  computed: {
    classes () {
      return [
        'uif-layout',
        {
          'uif-layout-has-sider': this.hasSider
        }
      ]
    }
  },
  methods: {
  },
  mounted () {
    this.hasSider = some(this.$children, vm => vm && vm.$options.name === 'u-sider')
  }
}
</script>
