跳转到某个访问过的页面时,无法取到url参数,感觉是被缓存住了

13916220530_p
@13916220530_p
0
声望
3
帖子
1053
资料浏览
0
粉丝
0
关注
13916220530_p 发布的帖子
-
taro3.0.2 vue h5 getCurrentInstance方法取不到url参数
router:
onHide: "/pages/search/search?keyword=ex%20culpa.onHide" onReady: "/pages/search/search?keyword=ex%20culpa.onReady" onShow: "/pages/search/search?keyword=ex%20culpa.onShow" params: undefined path: ""
相关环境:
taro3.0.2
vue
h5 -
taro3.0.0 h5 vue getCurrentInstance is not a function
taro3.0.0 h5 vueJS:
import { getCurrentInstance } from '@tarojs/taro'
onShow() {
console.log('query', getCurrentInstance().router)
}报错:
TypeError: tarojs_taro__WEBPACK_IMPORTED_MODULE_2_.default.getCurrentInstance is not a function