医院管理logo未显示问题
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
e165d5110e
commit
4b03a52768
|
@ -1,40 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="upload-container">
|
<div class="upload-container">
|
||||||
<el-upload
|
<el-upload class="upload-demo" :class="{ uploadDisabled: fileList.length > 0 ? true : false }" action
|
||||||
class="upload-demo"
|
:http-request="uploadFile" :before-upload="beforeUpload" :file-list="fileList" :on-preview="handlePreview"
|
||||||
:class="{ uploadDisabled: fileList.length > 0 ? true : false }"
|
:on-remove="remove" :limit="1" :on-exceed="handleExceed" accept=".png,.jpg,.jpeg" list-type="picture-card">
|
||||||
action
|
|
||||||
:http-request="uploadFile"
|
|
||||||
:before-upload="beforeUpload"
|
|
||||||
:file-list="fileList"
|
|
||||||
:on-preview="handlePreview"
|
|
||||||
:on-remove="remove"
|
|
||||||
:limit="1"
|
|
||||||
:on-exceed="handleExceed"
|
|
||||||
accept=".png,.jpg,.jpeg"
|
|
||||||
v-if="!disabled"
|
|
||||||
list-type="picture-card"
|
|
||||||
>
|
|
||||||
<!-- <el-button size="small" type="primary" :disabled="btnDisabled"
|
<!-- <el-button size="small" type="primary" :disabled="btnDisabled"
|
||||||
>上传</el-button
|
>上传</el-button
|
||||||
>
|
>
|
||||||
<span slot="tip" class="el-upload__tip">(只能上传png/jpg/jpeg文件)</span> -->
|
<span slot="tip" class="el-upload__tip">(只能上传png/jpg/jpeg文件)</span> -->
|
||||||
<i slot="default" class="el-icon-plus"></i>
|
<i slot="default" class="el-icon-plus"></i>
|
||||||
<div slot="file" slot-scope="{ file }">
|
<div slot="file" slot-scope="{ file }">
|
||||||
<img
|
<img class="el-upload-list__item-thumbnail" :src="`${OSSclientConfig.basePath}${file.url}`" alt=""
|
||||||
class="el-upload-list__item-thumbnail"
|
crossorigin="anonymous" />
|
||||||
:src="`${OSSclientConfig.basePath}${file.url}`"
|
|
||||||
alt=""
|
|
||||||
crossorigin="anonymous"
|
|
||||||
/>
|
|
||||||
<span class="el-upload-list__item-actions">
|
<span class="el-upload-list__item-actions">
|
||||||
<span
|
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
||||||
class="el-upload-list__item-preview"
|
|
||||||
@click="handlePictureCardPreview(file)"
|
|
||||||
>
|
|
||||||
<i class="el-icon-zoom-in"></i>
|
<i class="el-icon-zoom-in"></i>
|
||||||
</span>
|
</span>
|
||||||
<span class="el-upload-list__item-delete" @click="handleRemove(file)">
|
<span class="el-upload-list__item-delete" @click="handleRemove(file)" v-if="!disabled">
|
||||||
<i class="el-icon-delete"></i>
|
<i class="el-icon-delete"></i>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -50,12 +31,7 @@
|
||||||
<span>{{ fileList.length > 0 ? fileList[0].name : "" }}</span>
|
<span>{{ fileList.length > 0 ? fileList[0].name : "" }}</span>
|
||||||
</p> -->
|
</p> -->
|
||||||
<el-dialog :visible.sync="dialogVisible">
|
<el-dialog :visible.sync="dialogVisible">
|
||||||
<img
|
<img width="70%" :src="`${OSSclientConfig.basePath}${dialogImageUrl}`" crossorigin="anonymous" alt="" />
|
||||||
width="70%"
|
|
||||||
:src="`${OSSclientConfig.basePath}${dialogImageUrl}`"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -101,6 +77,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
remove(file, fileList) {
|
remove(file, fileList) {
|
||||||
|
if (this.disabled) return false
|
||||||
this.$emit("update:path", null);
|
this.$emit("update:path", null);
|
||||||
},
|
},
|
||||||
fileToBlob(file) {
|
fileToBlob(file) {
|
||||||
|
@ -186,6 +163,7 @@ export default {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
handleRemove(file) {
|
handleRemove(file) {
|
||||||
|
if (this.disabled) return false
|
||||||
this.fileList = [];
|
this.fileList = [];
|
||||||
this.$emit("update:path", null);
|
this.$emit("update:path", null);
|
||||||
},
|
},
|
||||||
|
@ -198,24 +176,30 @@ export default {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-container .el-form-item__label {
|
.upload-container .el-form-item__label {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-container .el-upload-list__item {
|
.upload-container .el-upload-list__item {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logoAMessage {
|
.logoAMessage {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-container .uploadDisabled .el-upload--picture-card {
|
.upload-container .uploadDisabled .el-upload--picture-card {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-container .el-upload--picture-card {
|
.upload-container .el-upload--picture-card {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
line-height: 150px;
|
line-height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-container .el-upload-list--picture-card .el-upload-list__item {
|
.upload-container .el-upload-list--picture-card .el-upload-list__item {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
|
|
Loading…
Reference in New Issue