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"
|
ref="editFile"
|
||||||
>
|
>
|
||||||
<span slot="title" class="dialog-footer">
|
<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
|
<i
|
||||||
class="el-icon-download ms-header-menu"
|
class="el-icon-download ms-header-menu"
|
||||||
@click="download"
|
@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: {
|
methods: {
|
||||||
getCommitId() {
|
getCommitId() {
|
||||||
if (this.data && this.data.attachInfo) {
|
if (this.data && this.data.attachInfo) {
|
||||||
|
|
|
@ -485,17 +485,20 @@ export default {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
operationConfirm(
|
let tips = this.$t("project.file_delete_tip", [row.name]);
|
||||||
this,
|
this.$confirm('<p style="word-break: break-word">' + tips + '</p>',
|
||||||
this.$t("project.file_delete_tip", [row.name]),
|
"", {
|
||||||
() => {
|
dangerouslyUseHTMLString: true,
|
||||||
|
confirmButtonText: this.$t("commons.confirm"),
|
||||||
|
cancelButtonText: this.$t("commons.cancel"),
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
deleteFileMetaById(row.id).then(() => {
|
deleteFileMetaById(row.id).then(() => {
|
||||||
this.$success(this.$t("commons.delete_success"));
|
this.$success(this.$t("commons.delete_success"));
|
||||||
this.getProjectFiles();
|
this.getProjectFiles();
|
||||||
this.refreshModule();
|
this.refreshModule();
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
);
|
|
||||||
},
|
},
|
||||||
getTypes() {
|
getTypes() {
|
||||||
this.typeFilters = [];
|
this.typeFilters = [];
|
||||||
|
|
Loading…
Reference in New Issue