javascript - vue file download problem
过去多啦不再A梦
过去多啦不再A梦 2017-05-18 10:52:39
0
1
710

As the title says, I placed a .docx document file in the src/assets directory

I want to implement the click-to-download function, but it seems that it doesn’t work in vue, and the resources cannot be referenced. How can I achieve this?

过去多啦不再A梦
过去多啦不再A梦

reply all(1)
为情所困

:href="require('src')"
If you don’t do this, you need to manually move the file to the build.
If you require it, the corresponding loader of webpack will process and package it into the build,
So you still have to Requires configurations such as file-loader;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template