fix[litemall-admin]: 图片显示问题和商品类目问题
This commit is contained in:
@@ -39,15 +39,15 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="首页主图">
|
||||
<el-upload class="avatar-uploader" :action='uploadPath' list-type="picture-card" :show-file-list="false" accept=".jpg,.jpeg,.png,.gif" :on-success="uploadPicUrl">
|
||||
<el-form-item label="商品图片">
|
||||
<el-upload class="avatar-uploader" :action="uploadPath" list-type="picture-card" :show-file-list="false" accept=".jpg,.jpeg,.png,.gif" :on-success="uploadPicUrl">
|
||||
<img v-if="goods.picUrl" :src="goods.picUrl" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="宣传画廊">
|
||||
<el-upload :action='uploadPath' :limit='5' multiple accept=".jpg,.jpeg,.png,.gif" list-type="picture-card" :on-exceed='uploadOverrun' :on-success="handleGalleryUrl" :on-remove="handleRemove">
|
||||
<el-upload :action="uploadPath" :limit="5" multiple accept=".jpg,.jpeg,.png,.gif" list-type="picture-card" :on-exceed="uploadOverrun" :on-success="handleGalleryUrl" :on-remove="handleRemove">
|
||||
<i class="el-icon-plus"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
@@ -187,7 +187,7 @@ export default {
|
||||
})
|
||||
},
|
||||
uploadPicUrl: function(response) {
|
||||
this.dataForm.picUrl = response.data.data.url
|
||||
this.dataForm.picUrl = response.data.url
|
||||
},
|
||||
createData() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<el-input v-model="dataForm.keyword"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="级别" prop="level">
|
||||
<el-select v-model="dataForm.level" placeholder="请选择">
|
||||
<el-select v-model="dataForm.level" @change="onLevelChange">
|
||||
<el-option label="一级类目" value="L1">
|
||||
</el-option>
|
||||
<el-option label="二级类目" value="L2">
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
name: '',
|
||||
keyword: '',
|
||||
level: 'L2',
|
||||
pid: 1005000,
|
||||
pid: undefined,
|
||||
desc: '',
|
||||
iconUrl: undefined,
|
||||
picUrl: undefined
|
||||
@@ -221,15 +221,20 @@ export default {
|
||||
name: '',
|
||||
keyword: '',
|
||||
level: 'L2',
|
||||
pid: 1005000,
|
||||
pid: undefined,
|
||||
desc: '',
|
||||
iconUrl: undefined,
|
||||
picUrl: undefined
|
||||
}
|
||||
},
|
||||
filterLevel(value, row) {
|
||||
filterLevel: function(value, row) {
|
||||
return row.level === value
|
||||
},
|
||||
onLevelChange: function(value) {
|
||||
if (value === 'L1') {
|
||||
this.pid = undefined
|
||||
}
|
||||
},
|
||||
handleCreate() {
|
||||
this.resetForm()
|
||||
this.dialogStatus = 'create'
|
||||
@@ -239,10 +244,10 @@ export default {
|
||||
})
|
||||
},
|
||||
uploadIconUrl: function(response) {
|
||||
this.dataForm.iconUrl = response.data.data.url
|
||||
this.dataForm.iconUrl = response.data.url
|
||||
},
|
||||
uploadPicUrl: function(response) {
|
||||
this.dataForm.picUrl = response.data.data.url
|
||||
this.dataForm.picUrl = response.data.url
|
||||
},
|
||||
createData() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
|
||||
Reference in New Issue
Block a user