|
|
@@ -9,6 +9,7 @@
|
|
|
v-model:fileList="fileList"
|
|
|
accept="image/png"
|
|
|
drag
|
|
|
+ class="upload-doctor-signature"
|
|
|
:onSuccess
|
|
|
:headers
|
|
|
:action
|
|
|
@@ -21,11 +22,6 @@
|
|
|
<div class="el-upload__text">
|
|
|
拖拽上传 或 <em>点击上传</em>
|
|
|
</div>
|
|
|
- <template #tip>
|
|
|
- <div class="el-upload__tip">
|
|
|
- 尺寸小于500KB的 PNG 文件
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</el-upload>
|
|
|
</CyDialog>
|
|
|
</template>
|
|
|
@@ -77,10 +73,36 @@ function onSuccess(response: any, uploadFile: UploadFile, uploadFiles: UploadFil
|
|
|
if (response.code === 200) {
|
|
|
fileList.value[index] = {
|
|
|
...fileList.value[index],
|
|
|
- ...response.data
|
|
|
+ ...response.data,
|
|
|
+ status: "fail"
|
|
|
}
|
|
|
} else {
|
|
|
fileList.value[index].status = 'fail'
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+.upload-doctor-signature {
|
|
|
+ display: flex;
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ .el-upload {
|
|
|
+ width: 30%;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ > ul {
|
|
|
+ margin-top: 0;
|
|
|
+ margin-left: 5px;
|
|
|
+ flex: 1;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .is-fail {
|
|
|
+ .el-upload-list__item-name {
|
|
|
+ color: #F56C6C;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|