question img
This commit is contained in:
parent
1ec1bbf98a
commit
52eb9bbf48
|
@ -43,8 +43,10 @@
|
||||||
:before-upload="beforeImgUpload"
|
:before-upload="beforeImgUpload"
|
||||||
>
|
>
|
||||||
<img v-if="Form.img" :src="Form.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-button size="small" type="primary" v-else>点击上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
<el-button type="text" @click="delImg()" v-if="Form.img">删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选项A" prop="optionA" >
|
<el-form-item label="选项A" prop="optionA" >
|
||||||
<el-input v-model="Form.options.A" style="width:600px" :disabled="inputDisable"></el-input>
|
<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);
|
this.catOptions = genTree(response.data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
delImg() {
|
||||||
|
this.Form.img = null
|
||||||
|
},
|
||||||
setOptions() {
|
setOptions() {
|
||||||
if(this.Form.type=='判断'){
|
if(this.Form.type=='判断'){
|
||||||
this.Form.options ={
|
this.Form.options ={
|
||||||
|
|
|
@ -43,9 +43,10 @@
|
||||||
:on-success="handleImgSuccess"
|
:on-success="handleImgSuccess"
|
||||||
:before-upload="beforeImgUpload"
|
: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-button size="small" type="primary" v-else>点击上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
<el-button type="text" @click="delImg()" v-if="Form.img">删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="选项A" prop="optionA" >
|
<el-form-item label="选项A" prop="optionA" >
|
||||||
<el-input v-model="Form.options.A" style="width:600px" :disabled="inputDisable"></el-input>
|
<el-input v-model="Form.options.A" style="width:600px" :disabled="inputDisable"></el-input>
|
||||||
|
@ -196,6 +197,9 @@ export default {
|
||||||
goBack() {
|
goBack() {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
},
|
},
|
||||||
|
delImg() {
|
||||||
|
this.Form.img = null
|
||||||
|
},
|
||||||
getQuestioncatAll() {
|
getQuestioncatAll() {
|
||||||
getQuestioncatAll().then(response => {
|
getQuestioncatAll().then(response => {
|
||||||
this.catOptions = genTree(response.data);
|
this.catOptions = genTree(response.data);
|
||||||
|
|
Loading…
Reference in New Issue