【问题标题】:how do i link to static html file without vue-router?如何在没有 vue-router 的情况下链接到静态 html 文件?
【发布时间】:2019-03-04 14:08:30
【问题描述】:

我是vue新用户,英语不是我的母语,所以我会尽力解释我的问题,谢谢。

过去如果我想链接根html文件,我会添加一个像这样<a href="./other/other.html>的标签,它的结构像这样image 现在我用 webpack vue-cli 创建了一个项目,但是当我点击一个标签后,url 更改为 localhost:8080/other/other.html 并且什么也没发生,内容仍然是 index.html,只有 url 更改。

有什么方法可以链接到静态 html 文件或我犯的错误? 感谢您的帮助。

【问题讨论】:

标签: vue.js webpack-dev-server vue-cli


【解决方案1】:

尝试在锚标签中使用绝对网址,如下所示:

<a href="https://localhost:8080/other/other.html"></a>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-05
    • 2020-12-30
    • 1970-01-01
    • 1970-01-01
    • 2022-12-22
    相关资源
    最近更新 更多