首页 >> js开发 >> jsvue中路由跳转不计入history的操作js大全
jsvue中路由跳转不计入history的操作js大全
发布时间: 2021年1月13日 | 浏览:
| 分类:js开发
我就废话不多说了,大家还是直接看代码吧~
label="选择部门"
:value="arr.DepartMentName"
readonly
right-icon="arrow"
@click="$router.replace({ name: 'tree' })"
/>
label="选择部门"
:value="arr.DepartMentName"
readonly
right-icon="arrow"
@click="$router.replace({ name: 'tree' })"
/>在下个页面使用replace跳回来即可补充知识:vue-router模式为history的项目打包发布后不能通过地址栏里的地址进行路由跳转补充知识:补充知识:vue-router模式为history的项目打包发布后不能通过地址栏里的地址进行路由跳转项目打包发布后不能通过地址栏里的地址进行路由跳转,地址栏里回车访问就直接404本项目使用nginx发布,所以这里只有nginx的配置方式。修改nginx的配置文件
server {
listen
8080;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
try_files $uri $uri/ /index.html;#必须要有的
root /home/dist/;#打包后的项目路径,index.html所在文件夹
index index.html index.htm;
}
}
server {
listen
8080;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
try_files $uri $uri/ /index.html;#必须要有的
root /home/dist/;#打包后的项目路径,index.html所在文件夹
index index.html index.htm;
}
}
以上这篇vue中路由跳转不计入history的操作就是小编分享给大家的全部内容了,希望能给大家一个参考。
label="选择部门"
:value="arr.DepartMentName"
readonly
right-icon="arrow"
@click="$router.replace({ name: 'tree' })"
/>
label="选择部门"
:value="arr.DepartMentName"
readonly
right-icon="arrow"
@click="$router.replace({ name: 'tree' })"
/>在下个页面使用replace跳回来即可补充知识:vue-router模式为history的项目打包发布后不能通过地址栏里的地址进行路由跳转补充知识:补充知识:vue-router模式为history的项目打包发布后不能通过地址栏里的地址进行路由跳转项目打包发布后不能通过地址栏里的地址进行路由跳转,地址栏里回车访问就直接404本项目使用nginx发布,所以这里只有nginx的配置方式。修改nginx的配置文件
server {
listen
8080;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
try_files $uri $uri/ /index.html;#必须要有的
root /home/dist/;#打包后的项目路径,index.html所在文件夹
index index.html index.htm;
}
}
server {
listen
8080;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
try_files $uri $uri/ /index.html;#必须要有的
root /home/dist/;#打包后的项目路径,index.html所在文件夹
index index.html index.htm;
}
}
以上这篇vue中路由跳转不计入history的操作就是小编分享给大家的全部内容了,希望能给大家一个参考。