Coder Social home page Coder Social logo

Comments (9)

linwh1115 avatar linwh1115 commented on July 17, 2024 1

把路径该成 "../../assets/logo.png" 就可以了

from vue-cli-multi-page.

bluefox1688 avatar bluefox1688 commented on July 17, 2024

理论上static里都可以放的,你现在是碰到什么问题呢

from vue-cli-multi-page.

Alvin-Liu avatar Alvin-Liu commented on July 17, 2024

官方的vue-cli是可以直接用'static/img/test.jpg'这种方式引入根目录下的static中文件的,不过我在你的vue-cli-multi-page中好像没办法引入,它会跑到‘src\module\welcome‘里面去找static(我用welcome做的测试)。不知道用什么方式,能给个例子吗

from vue-cli-multi-page.

FE-runner avatar FE-runner commented on July 17, 2024

也遇到同样的问题 发现是路径有误static\img/test.jpg 这个形式

from vue-cli-multi-page.

bluefox1688 avatar bluefox1688 commented on July 17, 2024

如果是直接在当前文件夹使用的话,都要先import 才可以使用。
import Banner from './banner.jpg';

from vue-cli-multi-page.

FE-runner avatar FE-runner commented on July 17, 2024

我把图片放在asset下面,但是不管我怎么设置路径,都把/替换成\

发自我的小米手机在 蓝狐 [email protected],2016年9月18日 下午3:02写道:如果是直接在当前文件夹使用的话,都要先import 才可以使用。

//例如
import Banner from './banner.jpg';

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bluefox1688/vue-cli-multi-page","title":"bluefox1688/vue-cli-multi-page","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/bluefox1688/vue-cli-multi-page"}},"updates":{"snippets":[{"icon":"PERSON","message":"@bluefox1688 in #2: 如果是直接在当前文件夹使用的话,都要先import 才可以使用。\r\n\r\n//例如\r\nimport Banner from './banner.jpg';\r\n"}],"action":{"name":"View Issue","url":"https://github.com/bluefox1688/vue-cli-multi-page/issues/2#issuecomment-247830236"}}}

from vue-cli-multi-page.

FE-runner avatar FE-runner commented on July 17, 2024

已修复,需要对path.join做下兼容处理,==>path.posix.join

from vue-cli-multi-page.

w550 avatar w550 commented on July 17, 2024

坑啊。。。。

from vue-cli-multi-page.

bluefox1688 avatar bluefox1688 commented on July 17, 2024

现在已经上线2.0,您可以体验试试

from vue-cli-multi-page.

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.