提交 f8ae7a25 编写于 作者: RedPig97's avatar RedPig97

update:文件上传样式

上级 ee8db3b9
...@@ -53,15 +53,28 @@ ...@@ -53,15 +53,28 @@
line-height: 20px; line-height: 20px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 30px; gap: 10px;
.file-title { .file-title {
color: var(--app-color-blue); color: var(--app-color-blue);
cursor: pointer; cursor: pointer;
min-width: 270px;
} }
.file-icon { .file-icon {
cursor: pointer; cursor: pointer;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.file-version {
min-width: 150px;
}
.file-size {
min-width: 120px;
}
.file-owner {
min-width: 180px;
}
.file-time {
min-width: 210px;
}
} }
} }
\ No newline at end of file
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<span>文件上传时间:2022/10/31 18:49:12</span> <span>文件上传时间:2022/10/31 18:49:12</span>
</span> </span>
<div class="file-icon"> <div class="file-icon">
<img v-if="!buttonCount" src="assets/img/ey_switch.svg" @click="onRemove(item,index, true)"> <!-- <img v-if="!buttonCount" src="assets/img/ey_switch.svg" @click="onRemove(item,index, true)"> -->
<img v-else src="assets/img/remove_circle.svg" @click="onRemove(item,index)"> <img src="assets/img/remove_circle.svg" @click="onRemove(item,index)">
</div> </div>
</el-col> </el-col>
<el-col v-for="count in buttonCount" :key="count" class="app-ey-upload__item"> <el-col v-for="count in buttonCount" :key="count" class="app-ey-upload__item">
...@@ -158,6 +158,14 @@ export default class AppEYUpload extends Vue { ...@@ -158,6 +158,14 @@ export default class AppEYUpload extends Vue {
*/ */
@Prop({ default: false }) public showOcrview?: boolean; @Prop({ default: false }) public showOcrview?: boolean;
/**
* 是否显示预览按钮
*
* @type {boolean}
* @memberof AppEYUpload
*/
@Prop({ default: false }) public previewMode?: boolean;
/** /**
* 表单是否处于编辑状态(有真实主键,srfuf='1';srfuf='0'时处于新建未保存) * 表单是否处于编辑状态(有真实主键,srfuf='1';srfuf='0'时处于新建未保存)
* *
...@@ -410,9 +418,13 @@ export default class AppEYUpload extends Vue { ...@@ -410,9 +418,13 @@ export default class AppEYUpload extends Vue {
if (this.isCreate == true) { if (this.isCreate == true) {
this.isUpdateBatch = true; this.isUpdateBatch = true;
} }
if (this.buttonCount > 1) {
this.buttonCount--; this.buttonCount--;
}
// 保存到文件列表进行显示 // 保存到文件列表进行显示
this.uploadFileList.push(response.data); this.uploadFileList.push(response.data);
console.log(this.uploadFileList);
// persistence=true时需要持久化表单属性 // persistence=true时需要持久化表单属性
if (this.persistence == true && this.uploadFileList.length > 0) { if (this.persistence == true && this.uploadFileList.length > 0) {
const value = JSON.stringify(this.uploadFileList); const value = JSON.stringify(this.uploadFileList);
...@@ -561,7 +573,7 @@ export default class AppEYUpload extends Vue { ...@@ -561,7 +573,7 @@ export default class AppEYUpload extends Vue {
* @param index * @param index
* @memberof AppEYUpload * @memberof AppEYUpload
*/ */
public onRemove(item: any, index: number, isSwitch: boolean = false) { public onRemove(item: any, index: number) {
let _this: any = this; let _this: any = this;
if (item) { if (item) {
MessageBox.confirm(_this.$t("components.diskFileUpload.deleteFile"), _this.$t("components.diskFileUpload.deleteFilePrompt"), { MessageBox.confirm(_this.$t("components.diskFileUpload.deleteFile"), _this.$t("components.diskFileUpload.deleteFilePrompt"), {
...@@ -579,9 +591,6 @@ export default class AppEYUpload extends Vue { ...@@ -579,9 +591,6 @@ export default class AppEYUpload extends Vue {
} }
// 从文件列表中删除 // 从文件列表中删除
this.uploadFileList.splice(index, 1); this.uploadFileList.splice(index, 1);
if (isSwitch) {
this.buttonCount++;
}
// persistence=true时需要持久化表单属性 // persistence=true时需要持久化表单属性
if (this.persistence == true) { if (this.persistence == true) {
const value = JSON.stringify(this.uploadFileList); const value = JSON.stringify(this.uploadFileList);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册