@mpxjs/core 2.7.0-beta.6 → 2.7.1

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.
@@ -1,3 +1,5 @@
1
+ import VueI18n from 'vue-i18n'
2
+
1
3
  // declaration for mpx mode
2
4
  declare let __mpx_mode__: 'wx' | 'ali' | 'swan' | 'qq' | 'tt' | 'web' | 'dd' | 'qa' | 'jd'
3
5
 
@@ -9,3 +11,9 @@ declare module '*?resolve' {
9
11
  const resourcePath: string
10
12
  export default resourcePath
11
13
  }
14
+
15
+ declare module 'vue-i18n' {
16
+ export default interface VueI18n {
17
+ mergeMessages(messages: {[index: string]:VueI18n.LocaleMessageObject}): void;
18
+ }
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/core",
3
- "version": "2.7.0-beta.6",
3
+ "version": "2.7.1",
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": "c04233503af0b1c7b4410fd03582d9dd883182d9"
44
+ "gitHead": "a672cdbf1689bb4d7f1a0fbcb1037d9f99e5d015"
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) {