VUE-T
Node设置淘宝镜像
npm config set registry https://registry.npm.taobao.org
安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
添加enter点击事件
@keyup.enter.native="event()"
v-on:keyup.enter="event()"
@keypress.native.enter="event()"
判断是否为开发环境
process.env.NODE_ENV === "development"
history模式返回404
后端配置
apche
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.html [L] </IfModule>
nginx
location / { try_files $uri $uri/ /index.html; }