ag-element-ui/packages/agCol/src/index.vue

33 lines
577 B
Vue

<template>
<div class="agColbox" :style="{flex:`0 0 ${Number(span)/24*100}%`,marginLeft:`${Number(offset)/24*100}%`}">
<slot></slot>
</div>
</template>
<script>
export default {
name: 'AgCol',
props: {
span:{
type:Number|String,
default:24
},
offset:{
type:Number|String,
default:0
}
},
data() {
return {};
},
}
</script>
<style lang="scss" scoped>
.agColbox{
flex:0 0 100%;
padding-left: 10px;
padding-right: 10px;
box-sizing: border-box;
}
</style>