Skip to content

Commit

Permalink
fix windows icon show error
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjj1024 committed Oct 28, 2024
1 parent 492a721 commit 2676a76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
}
],
"security": {
"csp": "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' asset://localhost data:; img-src 'self' blob: data:; font-src 'self' asset://localhost data:; asset: https://asset.localhost"
"csp": "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' asset://localhost blob: data: https://asset.localhost; font-src 'self' asset://localhost data:;"
},
"bundle": {
"active": true,
Expand Down
7 changes: 4 additions & 3 deletions src/pages/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</el-form-item>
<el-form-item :label="t('appIcon')" prop="icon">
<el-input
:value="appForm.icon.split('assets/')[1]"
:value="iconFileName"
readonly
@click="uploadIcon"
:placeholder="`${t('onlyPng')}`"
Expand Down Expand Up @@ -405,7 +405,7 @@ const saveImage = async (fileName: string, base64: string) => {
console.log('appDataPath------', appDataPath)
const targetDir = await join(appDataPath, 'assets')
const savePath = await join(targetDir, fileName)
// 确保目标目录存在
// confirm target dir
await createDir(targetDir, { recursive: true })
// const savePath = await join(appDataPath, 'assets', fileName)
// save file to app data dir
Expand Down Expand Up @@ -775,9 +775,10 @@ const getLatestRelease = async () => {
}
}
onMounted(() => {
onMounted(async () => {
getLatestRelease()
buildTime = 0
iconFileName.value = await basename(store.currentProject.icon)
appWindow.setTitle(`${store.currentProject.name}`)
})
</script>
Expand Down

0 comments on commit 2676a76

Please sign in to comment.