@mpxjs/core 2.10.18-beta.1 → 2.10.18-beta.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpxjs/core",
3
- "version": "2.10.18-beta.1",
3
+ "version": "2.10.18-beta.11",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
package/src/index.js CHANGED
@@ -110,6 +110,7 @@ function use (plugin, options = {}) {
110
110
  extendProps(Mpx, proxyMpx, rawProps, options)
111
111
  extendProps(Mpx.prototype, proxyMpx.prototype, rawPrototypeProps, options)
112
112
  installedPlugins.push(plugin)
113
+ plugin.__installed = true
113
114
  return this
114
115
  }
115
116
 
@@ -257,7 +257,7 @@ export default function styleHelperMixin () {
257
257
  const isNativeStaticStyle = staticStyle && isNativeStyle(staticStyle)
258
258
  let result = isNativeStaticStyle ? [] : {}
259
259
  const mergeResult = isNativeStaticStyle ? (...args) => result.push(...args) : (...args) => Object.assign(result, ...args)
260
-
260
+ // 使用一下 __getSizeCount 触发其 get
261
261
  this.__getSizeCount()
262
262
 
263
263
  if (staticClass || dynamicClass) {
@@ -268,13 +268,13 @@ export default function styleHelperMixin () {
268
268
  let localStyle, appStyle
269
269
  if (localStyle = this.__getClassStyle?.(className)) {
270
270
  if (localStyle._media?.length) {
271
- mergeResult(localStyle._default, getMediaStyle(localStyle._media))
271
+ mergeResult(localStyle, getMediaStyle(localStyle._media))
272
272
  } else {
273
273
  mergeResult(localStyle)
274
274
  }
275
275
  } else if (appStyle = global.__getAppClassStyle?.(className)) {
276
276
  if (appStyle._media?.length) {
277
- mergeResult(appStyle._default, getMediaStyle(appStyle._media))
277
+ mergeResult(appStyle, getMediaStyle(appStyle._media))
278
278
  } else {
279
279
  mergeResult(appStyle)
280
280
  }
@@ -119,7 +119,7 @@ export default function createApp (options) {
119
119
  const current = state.routes[state.index]
120
120
  options = {
121
121
  path: current.name,
122
- query: current.params,
122
+ query: current.name === global.__mpxInitialRouteName ? global.__mpxInitialRunParams : current.params,
123
123
  scene: 0,
124
124
  shareTicket: '',
125
125
  referrerInfo: {}
@@ -179,7 +179,7 @@ export default function createApp (options) {
179
179
  const current = state.routes[state.index]
180
180
  const options = {
181
181
  path: current.name,
182
- query: current.params,
182
+ query: current.name === global.__mpxInitialRouteName ? global.__mpxInitialRunParams : current.params,
183
183
  scene: 0,
184
184
  shareTicket: '',
185
185
  referrerInfo: {},