mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 04:46:44 +08:00
提问题框图片加载失败问题
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
<el-input class="title-input" v-model="askForm.title" show-word-limit placeholder="请输入问题标题,字符长度不能高于100" maxlength="100"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="封面">
|
||||
<imageUpload dir="qa" width="410px" height="168px" :value="imageShowUrl" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></imageUpload>
|
||||
<imageUpload :value="imageShowUrl" dir="qa" width="410px" height="168px" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></imageUpload>
|
||||
<!-- <el-upload
|
||||
:action="uploadFileUrl"
|
||||
:show-file-list="false"
|
||||
:show-file-list="false"
|
||||
:headers="headers"
|
||||
list-type="picture-card"
|
||||
:on-success="handleAvatarSuccess"
|
||||
@@ -67,6 +67,7 @@
|
||||
export default{
|
||||
data(){
|
||||
return {
|
||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
askFormCheckedShow:false,
|
||||
askFormRules: {
|
||||
title: [{ required: true, message: '请输入问题标题', trigger: 'blur' }, { max: 100, message: '字符长度不能高于100', trigger: 'blur' }],
|
||||
@@ -91,8 +92,10 @@
|
||||
},
|
||||
handleUploadSuccess(file) {
|
||||
// console.log(file.result.httpPath,'是否会fig以后关于和',file.result.filePath)
|
||||
this.imageShowUrl=file.result.httpPath;
|
||||
this.askForm.images=file.result.filePath
|
||||
this.imageShowUrl= this.fileBaseUrl + file.result.filePath;
|
||||
// console.log(this.fileBaseUrl)
|
||||
console.log(file)
|
||||
},
|
||||
handleRemoveSuccess(file) {
|
||||
this.imageShowUrl=''
|
||||
|
||||
Reference in New Issue
Block a user