今回は、Vue でパス番号を削除する方法と、Vue でパス番号を削除するための 注意事項 を説明します。実際のケースを見てみましょう。
ご存知のとおり、vue-router にはハッシュ モードとヒストリー モードの 2 つのモードがあります。 #が付いたものはハッシュモードです。 ルーターのモードを履歴に設定するだけですmodule.exports = { build: { env: require('./prod.env'), index: path.resolve(dirname, '../dist/index.html'), assetsRoot: path.resolve(dirname, '../dist'), assetsSubDirectory: 'static', assetsPublicPath: '/', // hash 模式会默认的在此处 添加为 assetsPublicPath: './' productionSourceMap: true, ... } }
server { listen 0.0.0.0:12345; location / { root /home/我的应用跟目录; try_files $uri $uri/ /index.html =404; // 这个是重点 } error_page 404 /index.html }
vueでのajaxリクエストとaxiosパッケージの完璧な処理
以上がVueでパス番号番号を削除する方法の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。