Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
musicode committed Jun 12, 2018
1 parent b729a14 commit ca6940a
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 23 deletions.
13 changes: 7 additions & 6 deletions dist/yox-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6240,15 +6240,16 @@ var Yox = function () {
instance.updateView(instance.get(TEMPLATE_COMPUTED), el || api.createElement('div'));
}

if (events) {
instance.on(events);
}

// 确保早于 AFTER_MOUNT 执行
if (watchers || events) {
if (watchers) {
prepend(function () {
if (watchers && instance.$observer) {
if (instance.$observer) {
instance.watch(watchers);
}
if (events && instance.$emitter) {
instance.on(events);
}
});
}
}
Expand Down Expand Up @@ -6856,7 +6857,7 @@ var Yox = function () {
return Yox;
}();

Yox.version = '0.59.8';
Yox.version = '0.59.9';

/**
* 工具,便于扩展、插件使用
Expand Down
2 changes: 1 addition & 1 deletion dist/yox-legacy.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/yox-legacy.min.js

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions dist/yox.js
Original file line number Diff line number Diff line change
Expand Up @@ -6078,15 +6078,16 @@ var Yox = function () {
instance.updateView(instance.get(TEMPLATE_COMPUTED), el || api.createElement('div'));
}

if (events) {
instance.on(events);
}

// 确保早于 AFTER_MOUNT 执行
if (watchers || events) {
if (watchers) {
prepend(function () {
if (watchers && instance.$observer) {
if (instance.$observer) {
instance.watch(watchers);
}
if (events && instance.$emitter) {
instance.on(events);
}
});
}
}
Expand Down Expand Up @@ -6694,7 +6695,7 @@ var Yox = function () {
return Yox;
}();

Yox.version = '0.59.8';
Yox.version = '0.59.9';

/**
* 工具,便于扩展、插件使用
Expand Down
2 changes: 1 addition & 1 deletion dist/yox.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/yox.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yox",
"version": "0.59.8",
"version": "0.59.9",
"description": "A lightweight mvvm framework",
"main": "dist/yox.js",
"directories": {
Expand Down
13 changes: 7 additions & 6 deletions src/Yox.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,16 +223,17 @@ export default class Yox {
)
}

if (events) {
instance.on(events)
}

// 确保早于 AFTER_MOUNT 执行
if (watchers || events) {
if (watchers) {
nextTask.prepend(
function () {
if (watchers && instance.$observer) {
if (instance.$observer) {
instance.watch(watchers)
}
if (events && instance.$emitter) {
instance.on(events)
}
}
)
}
Expand Down Expand Up @@ -820,7 +821,7 @@ export default class Yox {
*
* @type {string}
*/
Yox.version = '0.59.8'
Yox.version = '0.59.9'

/**
* 工具,便于扩展、插件使用
Expand Down

0 comments on commit ca6940a

Please sign in to comment.