|
|
@@ -85,10 +85,14 @@ const formatDesc = computed(() =>
|
|
|
props.fileType === FileDrawType ? DrawFormatDesc : ([3, 4].includes(props.fileType) ? kanyanFormatDesc : OtherFormatDesc)
|
|
|
);
|
|
|
console.log(formatDesc.value)
|
|
|
-
|
|
|
+function getFileNamePure(fileName = '') {
|
|
|
+ // 正则含义:匹配【最后一个点+后面所有字符】,并替换为空
|
|
|
+ return fileName.replace(/\.[^.]+$/, "");
|
|
|
+}
|
|
|
watchEffect(() => {
|
|
|
if (file.value?.name) {
|
|
|
- caseFile.value.filesTitle = file.value?.name.substring(0, 50);
|
|
|
+ let name = file.value?.name.substring(0, 50);
|
|
|
+ caseFile.value.filesTitle = getFileNamePure(name);
|
|
|
}
|
|
|
});
|
|
|
|