vue路由傳參query和params的區別

一、用法ajax    A、query要用path來引入,接收參數都是this.$route.query.name。瀏覽器 B、params要用name來引入,接收參數都是this.$route.params.name。安全 二、效果post A、query相似於ajax中get傳參,即在瀏覽器地址欄中顯示參數。this B、params則相似於post,即在瀏覽器地址欄中不顯示參數。路由 三、我
相關文章
相關標籤/搜索