update:创建需求时的静态资源文件下载
This commit is contained in:
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user