@mpxjs/core 2.7.0 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,4 +8,4 @@ declare let __mpx_env__: string
8
8
  declare module '*?resolve' {
9
9
  const resourcePath: string
10
10
  export default resourcePath
11
- }
11
+ }
package/@types/index.d.ts CHANGED
@@ -7,7 +7,13 @@
7
7
  /// <reference path="./mpx-store.d.ts" />
8
8
  /// <reference path="./global.d.ts" />
9
9
  /// <reference path="./node.d.ts" />
10
+ import VueI18n from 'vue-i18n'
10
11
 
12
+ declare module 'vue-i18n' {
13
+ export default interface VueI18n {
14
+ mergeMessages(messages: {[index: string]:VueI18n.LocaleMessageObject}): void;
15
+ }
16
+ }
11
17
  // declare Store types
12
18
  type StoreOpt<S, G, M, A, D extends MpxStore.Deps> = MpxStore.StoreOpt<S, G, M, A, D>
13
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/core",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -41,5 +41,5 @@
41
41
  "url": "https://github.com/didi/mpx/issues"
42
42
  },
43
43
  "sideEffects": false,
44
- "gitHead": "0f2454782bfca526bd281618b99b9aacb1ca2a75"
44
+ "gitHead": "eef4ac033679bdc5cb51ed1ddca08bd1d54bfdd2"
45
45
  }
@@ -3,9 +3,7 @@ export default function pageRouteMixin (mixinType) {
3
3
  if (mixinType === 'page') {
4
4
  return {
5
5
  beforeCreate () {
6
- if (this.$options.__mpxPageRoute) {
7
- this.route = this.$options.__mpxPageRoute.slice(1)
8
- }
6
+ this.route = this.$options.__mpxPageRoute || ''
9
7
  }
10
8
  }
11
9
  }
@@ -20,6 +20,8 @@ export default function proxyEventMixin () {
20
20
  if (type === 'begin' || type === 'end') {
21
21
  // 地图的 regionchange 事件会派发 e.type 为 begin 和 end 的事件
22
22
  fallbackType = 'regionchange'
23
+ } else if (__mpx_mode__ === 'ali') {
24
+ fallbackType = type.replace(/^./, i => i.toLowerCase())
23
25
  }
24
26
  const target = $event.currentTarget || $event.target
25
27
  if (!target) {