2018-11-04 14:23:28 +09:00
|
|
|
<template>
|
2019-01-12 09:34:02 +09:00
|
|
|
<div class="vnxwkwuf" :class="{ inputs, noGrow }" :data-children-count="children">
|
2018-11-04 14:23:28 +09:00
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
export default Vue.extend({
|
|
|
|
provide: {
|
|
|
|
horizonGrouped: true
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
inputs: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false
|
2018-11-14 16:30:58 +09:00
|
|
|
},
|
|
|
|
noGrow: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false
|
2018-11-04 14:23:28 +09:00
|
|
|
}
|
2019-01-12 09:34:02 +09:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
children: 0
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.children = this.$slots.default.length;
|
|
|
|
});
|
2018-11-04 14:23:28 +09:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
2018-11-14 16:30:58 +09:00
|
|
|
.vnxwkwuf
|
2018-11-23 08:01:14 +09:00
|
|
|
margin 16px 0
|
|
|
|
|
2018-11-04 14:23:28 +09:00
|
|
|
&.inputs
|
|
|
|
margin 32px 0
|
|
|
|
|
2018-11-23 08:01:14 +09:00
|
|
|
&.fit-top
|
|
|
|
margin-top 0
|
|
|
|
|
|
|
|
&.fit-bottom
|
|
|
|
margin-bottom 0
|
|
|
|
|
2018-11-14 16:30:58 +09:00
|
|
|
&:not(.noGrow)
|
|
|
|
display flex
|
|
|
|
|
|
|
|
> *
|
|
|
|
flex 1
|
2018-12-03 09:43:07 +09:00
|
|
|
min-width 0 !important
|
2018-11-04 14:23:28 +09:00
|
|
|
|
2018-11-14 16:30:58 +09:00
|
|
|
> *:not(:last-child)
|
2018-11-23 08:01:14 +09:00
|
|
|
margin-right 16px !important
|
|
|
|
|
2019-01-12 09:34:02 +09:00
|
|
|
&[data-children-count="3"]
|
|
|
|
@media (max-width 600px)
|
|
|
|
display block
|
|
|
|
|
|
|
|
> *
|
|
|
|
display block
|
|
|
|
width 100% !important
|
|
|
|
margin 16px 0 !important
|
|
|
|
|
|
|
|
&:first-child
|
|
|
|
margin-top 0 !important
|
|
|
|
|
|
|
|
&:last-child
|
|
|
|
margin-bottom 0 !important
|
|
|
|
|
2018-11-04 14:23:28 +09:00
|
|
|
</style>
|