Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:dcloudio/uni-app into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Mar 7, 2019
2 parents cb17819 + f4f88f8 commit de83565
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions packages/uni-app-plus/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,16 +402,16 @@ function initRefs (vm) {
const $refs = Object.create(null);
const components = mpInstance.selectAllComponents('.__ref__');
components.forEach(component => {
const id = component.id;
$refs[id] = component.$vm;
const ref = component.dataset.ref;
$refs[ref] = component.$vm;
});
const forComponents = mpInstance.selectAllComponents('.__ref-in-for__');
forComponents.forEach(component => {
const id = component.id;
if (!$refs[id]) {
$refs[id] = [];
const ref = component.dataset.ref;
if (!$refs[ref]) {
$refs[ref] = [];
}
$refs[id].push(component.$vm);
$refs[ref].push(component.$vm);
});
return $refs
}
Expand Down
2 changes: 1 addition & 1 deletion packages/uni-app-plus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-app-plus",
"version": "0.0.1",
"version": "0.0.2",
"description": "uni-app app-plus",
"main": "dist/index.js",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions packages/uni-mp-weixin/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,16 +404,16 @@ function initRefs (vm) {
const $refs = Object.create(null);
const components = mpInstance.selectAllComponents('.__ref__');
components.forEach(component => {
const id = component.id;
$refs[id] = component.$vm;
const ref = component.dataset.ref;
$refs[ref] = component.$vm;
});
const forComponents = mpInstance.selectAllComponents('.__ref-in-for__');
forComponents.forEach(component => {
const id = component.id;
if (!$refs[id]) {
$refs[id] = [];
const ref = component.dataset.ref;
if (!$refs[ref]) {
$refs[ref] = [];
}
$refs[id].push(component.$vm);
$refs[ref].push(component.$vm);
});
return $refs
}
Expand Down
2 changes: 1 addition & 1 deletion packages/uni-mp-weixin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dcloudio/uni-mp-weixin",
"version": "0.0.7",
"version": "0.0.8",
"description": "uni-app mp-weixin",
"main": "dist/index.js",
"scripts": {
Expand Down
12 changes: 6 additions & 6 deletions src/core/runtime/wrapper/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,16 @@ export function initRefs (vm) {
const $refs = Object.create(null)
const components = mpInstance.selectAllComponents('.__ref__')
components.forEach(component => {
const id = component.id
$refs[id] = component.$vm
const ref = component.dataset.ref
$refs[ref] = component.$vm
})
const forComponents = mpInstance.selectAllComponents('.__ref-in-for__')
forComponents.forEach(component => {
const id = component.id
if (!$refs[id]) {
$refs[id] = []
const ref = component.dataset.ref
if (!$refs[ref]) {
$refs[ref] = []
}
$refs[id].push(component.$vm)
$refs[ref].push(component.$vm)
})
return $refs
}
Expand Down

0 comments on commit de83565

Please sign in to comment.