fix(项目设置): 删除上传文件名称过长展示问题
--bug=1028103 --user=宋昌昌 【项目设置】项目设置-文件管理-删除文件-名称超长显示不全 https://www.tapd.cn/55049933/s/1396661
This commit is contained in:
parent
784f435ad4
commit
28ab3e0619
|
@ -8,7 +8,10 @@
|
|||
ref="editFile"
|
||||
>
|
||||
<span slot="title" class="dialog-footer">
|
||||
<span>{{ data.name }}</span>
|
||||
<el-tooltip :content="data.name" v-if="data.name && data.name.length > 80">
|
||||
<span>{{ data.name | split }}</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ data.name | split }}</span>
|
||||
<i
|
||||
class="el-icon-download ms-header-menu"
|
||||
@click="download"
|
||||
|
@ -330,6 +333,15 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
split: (value) => {
|
||||
if (value && value.length > 80) {
|
||||
return value.substring(0, 80) + "...";
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCommitId() {
|
||||
if (this.data && this.data.attachInfo) {
|
||||
|
|
|
@ -485,17 +485,20 @@ export default {
|
|||
});
|
||||
return;
|
||||
}
|
||||
operationConfirm(
|
||||
this,
|
||||
this.$t("project.file_delete_tip", [row.name]),
|
||||
() => {
|
||||
let tips = this.$t("project.file_delete_tip", [row.name]);
|
||||
this.$confirm('<p style="word-break: break-word">' + tips + '</p>',
|
||||
"", {
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: this.$t("commons.confirm"),
|
||||
cancelButtonText: this.$t("commons.cancel"),
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
deleteFileMetaById(row.id).then(() => {
|
||||
this.$success(this.$t("commons.delete_success"));
|
||||
this.getProjectFiles();
|
||||
this.refreshModule();
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
getTypes() {
|
||||
this.typeFilters = [];
|
||||
|
|
Loading…
Reference in New Issue