提交 2e671e79 编写于 作者: fxy060608's avatar fxy060608

feat(mp-toutiao): add route (getCurrentPages)

上级 1a9966d1
...@@ -1198,6 +1198,14 @@ function parseApp (vm) { ...@@ -1198,6 +1198,14 @@ function parseApp (vm) {
Vue.mixin({ Vue.mixin({
created () { // 处理 injections,头条 triggerEvent 是异步,且触发时机很慢,故延迟 relation 设置 created () { // 处理 injections,头条 triggerEvent 是异步,且触发时机很慢,故延迟 relation 设置
if (this.mpType !== 'app') { if (this.mpType !== 'app') {
if (
this.mpType === 'page' &&
!this.$scope.route &&
this.$scope.__route__
) {
this.$scope.route = this.$scope.__route__;
}
initRefs$1(this); initRefs$1(this);
this.__init_injections(this); this.__init_injections(this);
......
{ {
"name": "@dcloudio/uni-mp-toutiao", "name": "@dcloudio/uni-mp-toutiao",
"version": "0.0.339", "version": "0.0.340",
"description": "uni-app mp-toutiao", "description": "uni-app mp-toutiao",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -13,6 +13,14 @@ export default function parseApp (vm) { ...@@ -13,6 +13,14 @@ export default function parseApp (vm) {
Vue.mixin({ Vue.mixin({
created () { // 处理 injections,头条 triggerEvent 是异步,且触发时机很慢,故延迟 relation 设置 created () { // 处理 injections,头条 triggerEvent 是异步,且触发时机很慢,故延迟 relation 设置
if (this.mpType !== 'app') { if (this.mpType !== 'app') {
if (
this.mpType === 'page' &&
!this.$scope.route &&
this.$scope.__route__
) {
this.$scope.route = this.$scope.__route__
}
initRefs(this) initRefs(this)
this.__init_injections(this) this.__init_injections(this)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册