官方说明:https://router.vuejs.org/zh/guide/essentials/history-mode.html
解决方法:
在根目录创建.htaccess文件后粘贴下面的代码
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>