question img

This commit is contained in:
caoqianming 2020-06-01 22:31:19 +08:00
parent 1ec1bbf98a
commit 52eb9bbf48
2 changed files with 10 additions and 1 deletions

View File

@ -43,8 +43,10 @@
:before-upload="beforeImgUpload"
>
<img v-if="Form.img" :src="Form.img" style="width: 200px;height: 100px;display: block;"/>
<el-button size="small" type="primary" v-else>点击上传</el-button>
</el-upload>
<el-button type="text" @click="delImg()" v-if="Form.img">删除</el-button>
</el-form-item>
<el-form-item label="选项A" prop="optionA" >
<el-input v-model="Form.options.A" style="width:600px" :disabled="inputDisable"></el-input>
@ -195,6 +197,9 @@ export default {
this.catOptions = genTree(response.data);
});
},
delImg() {
this.Form.img = null
},
setOptions() {
if(this.Form.type=='判断'){
this.Form.options ={

View File

@ -43,9 +43,10 @@
:on-success="handleImgSuccess"
:before-upload="beforeImgUpload"
>
<img v-if="Form.img" :src="banner.img" style="width: 200px;height: 100px;display: block;"/>
<img v-if="Form.img" :src="Form.img" style="width: 200px;height: 100px;display: block;"/>
<el-button size="small" type="primary" v-else>点击上传</el-button>
</el-upload>
<el-button type="text" @click="delImg()" v-if="Form.img">删除</el-button>
</el-form-item>
<el-form-item label="选项A" prop="optionA" >
<el-input v-model="Form.options.A" style="width:600px" :disabled="inputDisable"></el-input>
@ -196,6 +197,9 @@ export default {
goBack() {
this.$router.go(-1)
},
delImg() {
this.Form.img = null
},
getQuestioncatAll() {
getQuestioncatAll().then(response => {
this.catOptions = genTree(response.data);