add.vue 2.9 KB
<template>
    <div class="classify-ctnr">
        <div class="main-wrap">
            <div class="global-title">新增二级分类</div>
            <glsx-combi-form :isInline="false" class="glsx-combi-form" ref="baseInfoRef" labelWidth="154px" defaultWidth="432px" :formObj.sync="formObj" :formData="formData" :formRules="myRule">
                <div slot="mainClassifySlot">
                    座椅
                </div>
                <div slot="secondClassifySlot" class="classify-slot">
                    <div class="classify-item">
                        <el-input maxLength="15" v-model="configName" class="input"></el-input>
                        <i class="el-icon-delete del-icon"></i>
                    </div>
                    <div class="add-btn" @click="addCondition('conditionList')">
                        <i class="el-icon-circle-plus-outline"></i>
                        新增二级分类
                    </div>
                </div>
            </glsx-combi-form>
        </div>
        <GLFooter>
            <el-button @click="handleCancel">取消</el-button>
            <el-button type="primary" @click="handleSave">确定</el-button>
        </GLFooter>
    </div>
</template>
<script>
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
    name: 'add',
    components: {
        glsxCombiForm
    },
    data() {
        return {
            formObj:{
                brandType: 1,
                videoCoverArr: []
            },
            myRule:{
                mainClassify: [{ required: true, message: '请输入一级分类', trigger: 'change' }],
                secondClassify: [{ required: true, message: '请添加二级分类名称', trigger: 'change' }],
            },
            formData:[
                {
                    label: '一级分类',
                    name: 'mainClassify',
                    addHtml: 'mainClassifySlot'
                },
                {
                    label: '二级分类名称',
                    name: 'secondClassify',
                    addHtml: 'secondClassifySlot'
                }
            ],
        }
    },
    methods:{
    }
}
</script>
<style scoped lang="scss">
.classify-ctnr{
    .glsx-combi-form{
        padding: 20px;
        background-color: #fff;
        margin-bottom: 16px;
        .classify-slot{
            .classify-item{
                .el-input{
                    width: 432px;
                }
                .del-icon{
                    font-size: 16px;
                    color: #999999;
                    margin-left: 8px;
                    vertical-align: middle;
                }
            }
            .add-btn{
                display: inline-block;
                color: #5850FF;
                cursor: pointer;
                i{
                    font-size: 20px;
                    vertical-align: middle;
                }
            }
        }
    }
}
</style>