• 请不要在回答技术问题时复制粘贴 AI 生成的内容
xjngbla
V2EX  ›  程序员

一个 vue 路由的问题

  •  
  •   xjngbla · Sep 21, 2022 · 1650 views
    This topic created in 1522 days ago, the information mentioned may be changed or developed.
    https://imgse.com/i/xiE9eK
    求教一下怎么设置一个路由按钮实现一个全局抽屉
    linkopeneyes
    linkopeneyes
    Sep 21, 2022
    1
    把弹窗写在最上层?
    GeekJason
    GeekJason
    Sep 21, 2022
    2
    首先,全局抽屉不建议用路由来弹出,建议写在 layout 层,供子组件调用

    其次,如果你正在写 Vue 3 ,可以试试 Teleport
    xjngbla
    xjngbla
    OP
    Sep 22, 2022
    3
    @sjhhjx0122 #1 谢谢
    xjngbla
    xjngbla
    OP
    Sep 22, 2022
    4
    @GeekJason #2 谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1965 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 09:19 · PVG 17:19 · LAX 01:19 · JFK 04:19
    ♥ Do have faith in what you're doing.