Skip to content

Commit

Permalink
new version 1.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
aOrz committed Apr 27, 2018
1 parent df0162b commit 38e4118
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/mpvue-template-compiler/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4404,7 +4404,7 @@ var attrs = {
});
} else if (key === 'v-html') {
ast.tag = 'rich-text';
attrs['nodes'] = '{{' + val + '}}';
attrs['nodes'] = "{{" + val + "}}";
} else if (key === 'v-show') {
attrs['hidden'] = "{{!(" + val + ")}}";
} else if (/^v\-on\:/i.test(key)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/mpvue-template-compiler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mpvue-template-compiler",
"version": "1.0.9",
"version": "1.0.10",
"description": "mpvue template compiler for Vue",
"main": "index.js",
"repository": {
Expand Down
17 changes: 11 additions & 6 deletions packages/mpvue/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4144,7 +4144,7 @@ Object.defineProperty(Vue$3.prototype, '$ssrContext', {
});

Vue$3.version = '2.4.1';
Vue$3.mpvueVersion = '1.0.8';
Vue$3.mpvueVersion = '1.0.9';

/* globals renderer */

Expand Down Expand Up @@ -4939,7 +4939,7 @@ function patch () {

function callHook$1 (vm, hook, params) {
var handlers = vm.$options[hook];
if (hook === 'onError') {
if (hook === 'onError' && handlers) {
handlers = [handlers];
}

Expand Down Expand Up @@ -5007,7 +5007,7 @@ function initMP (mpType, next) {
},

handleProxy: function handleProxy (e) {
rootVueVM.$handleProxyWithVue(e);
return rootVueVM.$handleProxyWithVue(e)
},

// Do something initial when launch.
Expand Down Expand Up @@ -5048,7 +5048,7 @@ function initMP (mpType, next) {
},
methods: {
handleProxy: function handleProxy (e) {
rootVueVM.$handleProxyWithVue(e);
return rootVueVM.$handleProxyWithVue(e)
}
},
// mp lifecycle for vue
Expand Down Expand Up @@ -5093,7 +5093,7 @@ function initMP (mpType, next) {
},

handleProxy: function handleProxy (e) {
rootVueVM.$handleProxyWithVue(e);
return rootVueVM.$handleProxyWithVue(e)
},

// mp lifecycle for vue
Expand Down Expand Up @@ -5439,12 +5439,17 @@ function handleProxyWithVue (e) {
// https://developer.mozilla.org/zh-CN/docs/Web/API/Event
if (handles.length) {
var event = getWebEventByMP(e);
if (handles.length === 1) {
var result = handles[0](event);
return result
}
handles.forEach(function (h) { return h(event); });
} else {
// TODO, 在初始化时进行判断或直接使用 vue 本身的错误提示
var ref$1 = rootVueVM.$mp.page;
var route = ref$1.route;
console.group(new Date() + ' 事件警告');
console.warn(("Do not have handler in current page: " + route + ". Please make sure that handler has been defined in " + route + ", or " + route + " has been added into app.json"));
console.warn(("Do not have handler in current page: " + route + ". Please make sure that handler has been defined in " + route + ", or not use handler with 'v-if'"));
console.groupEnd();
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mpvue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mpvue",
"version": "1.0.9",
"version": "1.0.10",
"description": "Vue Runtime for mini program",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 38e4118

Please sign in to comment.