Skip to content

Commit

Permalink
fix: favicon setting
Browse files Browse the repository at this point in the history
  • Loading branch information
EryouHao committed Jan 6, 2019
1 parent 6f6de67 commit 2c6d345
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/views/setting/includes/FaviconSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ export default class Setting extends Vue {
file: any = null
get faviconPath() {
return path.join(this.site.appDir, 'output', `favicon.ico?a=${Math.random()}`)
faviconPath = ''
mounted() {
this.faviconPath = path.join('file://', this.site.appDir, 'output', `favicon.ico?a=${Math.random()}`)
}
submit() {
Expand All @@ -43,6 +45,7 @@ export default class Setting extends Vue {
ipcRenderer.once('favicon-uploaded', (event: Event, result: any) => {
this.file = null
this.$bus.$emit('site-reload')
this.faviconPath = path.join('file://', this.site.appDir, 'output', `favicon.ico?a=${Math.random()}`)
this.$bus.$emit('snackbar-display', 'Favicon 配置已保存')
})
}
Expand Down

0 comments on commit 2c6d345

Please sign in to comment.