@mpxjs/core 2.10.21 → 2.10.24

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.21",
3
+ "version": "2.10.24",
4
4
  "description": "mpx runtime core",
5
5
  "keywords": [
6
6
  "miniprogram",
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "main": "src/index.js",
21
21
  "dependencies": {
22
- "@mpxjs/perf": "^2.10.21",
22
+ "@mpxjs/perf": "^2.10.24",
23
23
  "@mpxjs/utils": "^2.10.21",
24
24
  "lodash": "^4.1.1",
25
25
  "miniprogram-api-typings": "^3.10.0"
@@ -118,5 +118,5 @@
118
118
  "url": "https://github.com/didi/mpx/issues"
119
119
  },
120
120
  "sideEffects": false,
121
- "gitHead": "a2cbdad9f8dcc376f2098d217485525953b64cd9"
121
+ "gitHead": "0fd557e03e51d93231c063f9145ec0ff0746c935"
122
122
  }
@@ -253,8 +253,8 @@ export default function styleHelperMixin () {
253
253
  return concat(staticClass, stringifyDynamicClass(dynamicClass))
254
254
  },
255
255
  __getStyle (staticClass, dynamicClass, staticStyle, dynamicStyle, hide) {
256
- let stopTotal
257
- if (__mpx_perf_framework__) stopTotal = perf.scope('getStyle:total')
256
+ let idTotal = -1
257
+ if (__mpx_perf_framework__) idTotal = perf.scopeStart('getStyle:total')
258
258
 
259
259
  const isNativeStaticStyle = staticStyle && isNativeStyle(staticStyle)
260
260
  let result = isNativeStaticStyle ? [] : {}
@@ -263,8 +263,8 @@ export default function styleHelperMixin () {
263
263
  this.__getSizeCount()
264
264
 
265
265
  if (staticClass || dynamicClass) {
266
- let stopClass
267
- if (__mpx_perf_framework__) stopClass = perf.scope('getStyle:class')
266
+ let idClass = -1
267
+ if (__mpx_perf_framework__) idClass = perf.scopeStart('getStyle:class')
268
268
  // todo 当前为了复用小程序unocss产物,暂时进行mpEscape,等后续正式支持unocss后可不进行mpEscape
269
269
  const classString = mpEscape(concat(staticClass, stringifyDynamicClass(dynamicClass)))
270
270
 
@@ -287,12 +287,12 @@ export default function styleHelperMixin () {
287
287
  mergeResult(this.__props[className])
288
288
  }
289
289
  })
290
- if (__mpx_perf_framework__) stopClass()
290
+ if (__mpx_perf_framework__) perf.scopeEnd(idClass)
291
291
  }
292
292
 
293
293
  if (staticStyle || dynamicStyle) {
294
- let stopStyle
295
- if (__mpx_perf_framework__) stopStyle = perf.scope('getStyle:style')
294
+ let idStyle = -1
295
+ if (__mpx_perf_framework__) idStyle = perf.scopeStart('getStyle:style')
296
296
  const styleObj = {}
297
297
  if (isNativeStaticStyle) {
298
298
  if (Array.isArray(staticStyle)) {
@@ -305,7 +305,7 @@ export default function styleHelperMixin () {
305
305
  }
306
306
  Object.assign(styleObj, normalizeDynamicStyle(dynamicStyle))
307
307
  mergeResult(transformStyleObj(styleObj))
308
- if (__mpx_perf_framework__) stopStyle()
308
+ if (__mpx_perf_framework__) perf.scopeEnd(idStyle)
309
309
  }
310
310
 
311
311
  if (hide) {
@@ -327,7 +327,7 @@ export default function styleHelperMixin () {
327
327
  })
328
328
  }
329
329
  const isEmpty = isNativeStaticStyle ? !result.length : isEmptyObject(result)
330
- if (__mpx_perf_framework__) stopTotal()
330
+ if (__mpx_perf_framework__) perf.scopeEnd(idTotal)
331
331
  return isEmpty ? empty : result
332
332
  }
333
333
  }