Comments (4)
Well, you are passing down an object to attrs
, see:
attrs: {
src: path,
}
Since you're using Vue's hyperscript you can pass down the src
without wrapping it in attrs
, see:
h('img', { src: '/myImage.png' });
I'm not sure where you got the attrs
object from, but this sould set the src attribute correctly.
from electron-vue-template.
Can you describe the issues you're running in to? Theoretically the renderer part of this template is a usual Vue3 app, so there shouldn't be any problems integrating any Vue libraries
from electron-vue-template.
As you can see, when I try to load the macOS local image and show it, I encountered this issue(his src is always [Object object]).
The image could not be displayed and rendered correctly. I looked up a lot of information but could not solve it.
This is my dependencies.
"dependencies": {
"axios": "^0.24.0",
"canvas-confetti": "^1.4.0",
"electron-store": "^8.0.1",
"fs-extra": "^10.0.0",
"gifsicle": "5.3.0",
"junk": "^3.1.0",
"mime-types": "^2.1.34",
"pinia": "^2.0.9",
"queue": "^6.0.2",
"view-ui-plus": "^1.3.1",
"vue": "^3.2.26",
"vue-router": "^4.0.12"
},
from electron-vue-template.
Yes, you are right!
Thanks Bro!
from electron-vue-template.
Related Issues (20)
- How to use static files? HOT 2
- Suggestion: add debug information for VSCode HOT 1
- Suggestion: PR adding Eslint, VueTSC and automatic checkers? HOT 1
- Use axios when app is build HOT 2
- SQLite Database HOT 1
- Runtime Errors HOT 2
- I can't load `.ts` file in another `.ts` file. HOT 6
- static resource not found on build HOT 3
- [!] Read before submitting
- tray icon path HOT 6
- How to listen for webContents.send events from main processes in vue components HOT 3
- Dependecies are out of date
- 6 high severity vulnerabilities HOT 2
- __name is not define HOT 1
- Can we add IPC practice in this template? HOT 1
- Question: How to access electron-store in vue HOT 3
- for someone who needs to use@electron/remote
- How to use three.js to load `.glb` 3D model in Electron?
- Error: Not allowed to load local resource
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-vue-template.