<el-form :model="addForm" ref="addFormRef" :rules="addFormRules">
<el-tabs tab-position="left"
style="margin:50px auto"
v-model="activeName"
@tab-click="handleClick"
:before-leave="beforClick">
<el-tab-pane label="基本信息" name="0">
<!-- 表单-->
<el-form ref="addFormRef" :model="addForm" :rules="addFormRules">
<el-form-item label="商品名称" prop="goods_name">
<el-input size="small" v-model="addForm.goods_name"></el-input>
</el-form-item>
<el-form-item label="商品价格" prop="goods_price">
<el-input size="small" v-model="addForm.goods_price"></el-input>
</el-form-item>
<el-form-item label="商品重量" prop="goods_weight">
<el-input size="small" v-model="addForm.goods_weight"></el-input>
</el-form-item>
<el-form-item label="商品数量" prop="goods_number">
<el-input size="small" v-model="addForm.goods_number"></el-input>
</el-form-item>
<el-form-item label="商品分类" prop="goods_cat">
<p>{{ addForm.goods_cat }}---当前分类ID:{{ cadId }}</p>
<el-cascader size="small"
v-model="addForm.goods_cat"
:options="options"
:props="defaultProps"
placeholder="请选择活动区域">
</el-cascader>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="商品参数" name="1">
<el-form-item
:label="item.attr_name"
v-for="(item, index) in dynamicData"
:key="item.attr_id"
>
<el-checkbox-group v-model="item.attr_vals">
<el-checkbox
v-for="(item2, index2) in item.attr_vals"
:key="index2"
:label="item2"
></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="商品属性" name="2">
<el-form-item
:label="item.attr_name"
v-for="item in staticData"
:key="item.attr_id"
>
<el-input v-model="item.attr_vals"></el-input>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="商品图片" name="3">
<el-upload
action="http://www.ysqorz.top:8888/api/private/v1/upload"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-success="handleSuccess"
:headers="headersObj"
list-type="picture"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-tab-pane>
<el-tab-pane label="商品内容" name="4">
<quill-editor v-model="addForm.goods_introduce"></quill-editor>
<el-button class="submitBtn" type="primary" @click="addGoods"
>添加商品
</el-button>
</el-tab-pane>
</el-tabs>
</el-form>