修改3d节点下载为glb文件

This commit is contained in:
X1627315083@163.com
2026-03-31 09:56:27 +08:00
parent f5efaa8eaf
commit 2983f79545
2 changed files with 8 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
# VITE_APP_URL = http://192.168.31.82:8771
VITE_APP_URL = http://18.167.251.121:10015
# VITE_APP_URL = http://192.168.31.118:8080
VITE_APP_URL = http://192.168.31.82:8755
# VITE_APP_URL = http://192.168.31.82:8755
VITE_GOOGLE_CLIENT_ID = 216037134725-7q8vqp0ohtmohlosltkfg7bd2v29rm5a.apps.googleusercontent.com

View File

@@ -14,7 +14,7 @@
<span class="icon" @click="onPreview(item)">
<svg-icon name="expand-lg" size="20" size-unit="px" />
</span>
<span class="icon" @click="onDownload(item?.url)">
<span class="icon" @click="onDownload(item)">
<svg-icon name="download" size="20" size-unit="px" />
</span>
<button class="edit" @click="onEdit(item)">
@@ -190,8 +190,12 @@
openImagePreview(item.url)
}
}
const onDownload = (url: string) => {
downloadImage(url, 'image.png')
const onDownload = (item: any) => {
if(data.superiorNodeType == NODE_DATATYPE.TO_3D_MODEL){
if(item?.glbPath)downloadImage(item.glbPath, 'model.glb')
}else{
downloadImage(item.url, 'image.png')
}
}
const onMenuItem = (v) => {
if (v.disabled) return