@mpxjs/core 2.9.11 → 2.9.14
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.9.
|
|
3
|
+
"version": "2.9.14",
|
|
4
4
|
"description": "mpx runtime core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"miniprogram",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"url": "https://github.com/didi/mpx/issues"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": false,
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "e8ab845a544d2db0619a6a7d6c04d9d384d1a6ca"
|
|
51
51
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BEFOREMOUNT, UPDATED } from '../../core/innerLifecycle'
|
|
2
|
-
import
|
|
2
|
+
import { createSelectorQuery } from '@mpxjs/api-proxy'
|
|
3
3
|
|
|
4
4
|
function getEl (ref) {
|
|
5
5
|
if (ref && ref.nodeType === 1) return ref
|
|
@@ -14,13 +14,13 @@ function processRefs (refs) {
|
|
|
14
14
|
const ref = refs[key]
|
|
15
15
|
if (Array.isArray(ref)) {
|
|
16
16
|
if (getEl(ref[0])) {
|
|
17
|
-
refs[rKey] =
|
|
17
|
+
refs[rKey] = createSelectorQuery().in(this).selectAll(ref.map(getEl))
|
|
18
18
|
} else {
|
|
19
19
|
refs[rKey] = ref
|
|
20
20
|
}
|
|
21
21
|
} else {
|
|
22
22
|
if (getEl(ref)) {
|
|
23
|
-
refs[rKey] =
|
|
23
|
+
refs[rKey] = createSelectorQuery().in(this).select(getEl(ref))
|
|
24
24
|
} else {
|
|
25
25
|
refs[rKey] = ref
|
|
26
26
|
}
|
package/src/vuePlugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { walkChildren, parseSelector, error, hasOwn } from '@mpxjs/utils'
|
|
2
|
-
import
|
|
2
|
+
import { createSelectorQuery, createIntersectionObserver } from '@mpxjs/api-proxy'
|
|
3
3
|
const datasetReg = /^data-(.+)$/
|
|
4
4
|
|
|
5
5
|
function collectDataset (attrs) {
|
|
@@ -50,9 +50,9 @@ export default function install (Vue) {
|
|
|
50
50
|
return this.selectComponent(selector, true)
|
|
51
51
|
}
|
|
52
52
|
Vue.prototype.createSelectorQuery = function () {
|
|
53
|
-
return
|
|
53
|
+
return createSelectorQuery().in(this)
|
|
54
54
|
}
|
|
55
55
|
Vue.prototype.createIntersectionObserver = function (options) {
|
|
56
|
-
return
|
|
56
|
+
return createIntersectionObserver(this, options)
|
|
57
57
|
}
|
|
58
58
|
}
|