使用绝对URL调用Nested Nuxt 3路线

发布于 2025-02-04 13:18:04 字数 396 浏览 2 评论 0原文

只是一个快速的问题,我找不到答案。

我有两个路由“/”“/auth”

-- pages
    -- auth
        -- index.vue
    -- index.vue

当我调用“/”时,一切都很好。当我调用“/auth” 带有< nuxtlink to =“/auth”/> component时,一切都起作用。 但是,当我调用url http:// localhost:3000/auth时,我会获得基本NUXT 3 404错误屏幕。

这是我缺少的配置设置吗?

干杯

Just a quick question, that I couldn't find an answer to.

I have two routes "/" and "/auth".

-- pages
    -- auth
        -- index.vue
    -- index.vue

When I call "/" everything is fine. When I call "/auth" with a <NuxtLink to="/auth" /> component, everything works.
But when I call the url http://localhost:3000/auth directly, I get the base Nuxt 3 404 error screen.

Is this a config setting I'm missing?

Cheers

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

左耳近心 2025-02-11 13:18:04

我自己找到了答案:

如果我想使用YARN DEV我需要首先调用纱线生成

希望这对别人也有帮助。

I found the answer myself:

If I want to use yarn dev I need to first call yarn generate.

Hope this helps someone else, too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文