add.vue
2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<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>