kbone 使用vue 多页面开发 配置route后 href 跳转提示 VM25253:1 wx.switchTab: url 不支持 queryString
跳转方式无参数
<a href="/home/project/detail">project detail</a>
mp/home/main.mp.js
const router = new Router({
mode: 'history',
routes: [{
path: '/',
name: 'Home',
component: Home,
}, {
path: '/index.html',
name: 'HomeHtml',
component: Home,
}, {
path: '/home/project/profile',
name: 'ProjectProfile',
component: ProjectProfile,
}, {
path: '/home/project/detail',
name: 'ProjectDetail',
component: ProjectDetail,
}],
})
minprogram.config.js
router: {
home: [
'/home/project/detail',
'/home/project/profile',
],
store: [
'/store',
'/store/project-profile'
],
settings: [
'/settings',
],
},
不支持。建议使用globalData传递
不支持传参
<a href="/home/project/detail">project detail</a>