update:创建需求时的静态资源文件下载

This commit is contained in:
2026-02-11 09:30:49 +08:00
parent 541ff926e5
commit b5f8ba3294

View File

@@ -40,6 +40,7 @@ const props = defineProps({
default: '机器人', default: '机器人',
}, },
}); });
const env = import.meta.env;
// 机器人 动画 有限元 工业设计 公差 // 机器人 动画 有限元 工业设计 公差
// 1正常 2标红 3缩进 // 1正常 2标红 3缩进
@@ -252,6 +253,9 @@ const getPageValue = (str: string) => {
const downLoadFileFun = (name: any) => { const downLoadFileFun = (name: any) => {
console.log(name, 'name'); console.log(name, 'name');
ElMessage.success('文件下载中请稍后!'); ElMessage.success('文件下载中请稍后!');
const url = `${env.VITE_API_STATIC_FILE}/${name.replace('《', '').replace('》', '')}.docx`;
// const url = `${env.VITE_API_STATIC_FILE}/测试word.docx`;
window.open(url);
}; };
</script> </script>