Giter VIP home page Giter VIP logo

Comments (4)

Deluze avatar Deluze commented on May 14, 2024 1

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.

Deluze avatar Deluze commented on May 14, 2024

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.

PublicWorld avatar PublicWorld commented on May 14, 2024

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.

image

image

image

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.

PublicWorld avatar PublicWorld commented on May 14, 2024

Yes, you are right!
Thanks Bro!

from electron-vue-template.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.