my_item.vue 524 Bytes
Newer Older
陈浩玮's avatar
陈浩玮 committed
1
<template>
陈浩玮's avatar
陈浩玮 committed
2
    <a-col v-bind="attr">
陈浩玮's avatar
陈浩玮 committed
3
        <a-form-model-item v-bind="layout">
陈浩玮's avatar
陈浩玮 committed
4
            <slot />
陈浩玮's avatar
陈浩玮 committed
5 6 7 8 9 10
        </a-form-model-item>
    </a-col>
</template>

<script>
export default {
陈浩玮's avatar
陈浩玮 committed
11 12 13 14 15 16
    props: {
        colAttr: {
            type: Object,
            default: undefined,
        },
    },
陈浩玮's avatar
陈浩玮 committed
17 18
    data() {
        return {
陈浩玮's avatar
陈浩玮 committed
19
            attr: this.colAttr ? this.colAttr : { xs: 24, sm: 24, lg: 12, xl: 6 },
陈浩玮's avatar
陈浩玮 committed
20
            layout: { labelCol: { span: 6 }, wrapperCol: { span: 18 }, ...this.$attrs },
陈浩玮's avatar
陈浩玮 committed
21 22 23 24
        };
    },
};
</script>