Skip to content

Commit

Permalink
[build] 2.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 2, 2017
1 parent 8dc4215 commit 60291f2
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 32 deletions.
11 changes: 9 additions & 2 deletions dist/vue.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.3.1
* Vue.js v2.3.2
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -3302,6 +3302,7 @@ function createFunctionalComponent (
});
if (vnode instanceof VNode) {
vnode.functionalContext = context;
vnode.functionalOptions = Ctor.options;
if (data.slot) {
(vnode.data || (vnode.data = {})).slot = data.slot;
}
Expand Down Expand Up @@ -4390,7 +4391,13 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
get: isServerRendering
});

Vue$3.version = '2.3.1';
Object.defineProperty(Vue$3.prototype, '$ssrContext', {
get: function get () {
return this.$vnode.ssrContext
}
});

Vue$3.version = '2.3.2';

/* */

Expand Down
11 changes: 9 additions & 2 deletions dist/vue.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.3.1
* Vue.js v2.3.2
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -3300,6 +3300,7 @@ function createFunctionalComponent (
});
if (vnode instanceof VNode) {
vnode.functionalContext = context;
vnode.functionalOptions = Ctor.options;
if (data.slot) {
(vnode.data || (vnode.data = {})).slot = data.slot;
}
Expand Down Expand Up @@ -4388,7 +4389,13 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
get: isServerRendering
});

Vue$3.version = '2.3.1';
Object.defineProperty(Vue$3.prototype, '$ssrContext', {
get: function get () {
return this.$vnode.ssrContext
}
});

Vue$3.version = '2.3.2';

/* */

Expand Down
11 changes: 9 additions & 2 deletions dist/vue.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.3.1
* Vue.js v2.3.2
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -3298,6 +3298,7 @@ function createFunctionalComponent (
});
if (vnode instanceof VNode) {
vnode.functionalContext = context;
vnode.functionalOptions = Ctor.options;
if (data.slot) {
(vnode.data || (vnode.data = {})).slot = data.slot;
}
Expand Down Expand Up @@ -4382,7 +4383,13 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
get: isServerRendering
});

Vue$3.version = '2.3.1';
Object.defineProperty(Vue$3.prototype, '$ssrContext', {
get: function get () {
return this.$vnode.ssrContext
}
});

Vue$3.version = '2.3.2';

/* */

Expand Down
8 changes: 4 additions & 4 deletions dist/vue.min.js

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions dist/vue.runtime.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.3.1
* Vue.js v2.3.2
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -3298,6 +3298,7 @@ function createFunctionalComponent (
});
if (vnode instanceof VNode) {
vnode.functionalContext = context;
vnode.functionalOptions = Ctor.options;
if (data.slot) {
(vnode.data || (vnode.data = {})).slot = data.slot;
}
Expand Down Expand Up @@ -4386,7 +4387,13 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
get: isServerRendering
});

Vue$3.version = '2.3.1';
Object.defineProperty(Vue$3.prototype, '$ssrContext', {
get: function get () {
return this.$vnode.ssrContext
}
});

Vue$3.version = '2.3.2';

/* */

Expand Down
11 changes: 9 additions & 2 deletions dist/vue.runtime.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.3.1
* Vue.js v2.3.2
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -3296,6 +3296,7 @@ function createFunctionalComponent (
});
if (vnode instanceof VNode) {
vnode.functionalContext = context;
vnode.functionalOptions = Ctor.options;
if (data.slot) {
(vnode.data || (vnode.data = {})).slot = data.slot;
}
Expand Down Expand Up @@ -4384,7 +4385,13 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
get: isServerRendering
});

Vue$3.version = '2.3.1';
Object.defineProperty(Vue$3.prototype, '$ssrContext', {
get: function get () {
return this.$vnode.ssrContext
}
});

Vue$3.version = '2.3.2';

/* */

Expand Down
11 changes: 9 additions & 2 deletions dist/vue.runtime.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Vue.js v2.3.1
* Vue.js v2.3.2
* (c) 2014-2017 Evan You
* Released under the MIT License.
*/
Expand Down Expand Up @@ -3294,6 +3294,7 @@ function createFunctionalComponent (
});
if (vnode instanceof VNode) {
vnode.functionalContext = context;
vnode.functionalOptions = Ctor.options;
if (data.slot) {
(vnode.data || (vnode.data = {})).slot = data.slot;
}
Expand Down Expand Up @@ -4378,7 +4379,13 @@ Object.defineProperty(Vue$3.prototype, '$isServer', {
get: isServerRendering
});

Vue$3.version = '2.3.1';
Object.defineProperty(Vue$3.prototype, '$ssrContext', {
get: function get () {
return this.$vnode.ssrContext
}
});

Vue$3.version = '2.3.2';

/* */

Expand Down
6 changes: 3 additions & 3 deletions dist/vue.runtime.min.js

Large diffs are not rendered by default.

31 changes: 20 additions & 11 deletions packages/vue-server-renderer/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5417,6 +5417,16 @@ function renderNode (node, isRoot, context) {
}
}

function registerComponentForCache (options, write) {
// exposed by vue-loader, need to call this if cache hit because
// component lifecycle hooks will not be called.
var register = options._ssrRegister;
if (write.caching && isDef(register)) {
write.componentBuffer[write.componentBuffer.length - 1].add(register);
}
return register
}

function renderComponent (node, isRoot, context) {
var write = context.write;
var next = context.next;
Expand All @@ -5426,15 +5436,9 @@ function renderComponent (node, isRoot, context) {
var Ctor = node.componentOptions.Ctor;
var getKey = Ctor.options.serverCacheKey;
var name = Ctor.options.name;

// exposed by vue-loader, need to call this if cache hit because
// component lifecycle hooks will not be called.
var registerComponent = Ctor.options._ssrRegister;
if (write.caching && isDef(registerComponent)) {
write.componentBuffer[write.componentBuffer.length - 1].add(registerComponent);
}

var cache = context.cache;
var registerComponent = registerComponentForCache(Ctor.options, write);

if (isDef(getKey) && isDef(cache) && isDef(name)) {
var key = name + '::' + getKey(node.componentOptions.propsData);
var has = context.has;
Expand Down Expand Up @@ -5508,7 +5512,6 @@ function renderComponentInner (node, isRoot, context) {
node,
context.activeInstance
);
node.ssrContext = null;
normalizeRender(child);
var childNode = child._render();
childNode.parent = node;
Expand All @@ -5520,15 +5523,21 @@ function renderComponentInner (node, isRoot, context) {
}

function renderElement (el, isRoot, context) {
var write = context.write;
var next = context.next;

if (isTrue(isRoot)) {
if (!el.data) { el.data = {}; }
if (!el.data.attrs) { el.data.attrs = {}; }
el.data.attrs[SSR_ATTR] = 'true';
}

if (el.functionalOptions) {
registerComponentForCache(el.functionalOptions, write);
}

var startTag = renderStartingTag(el, context);
var endTag = "</" + (el.tag) + ">";
var write = context.write;
var next = context.next;
if (context.isUnaryTag(el.tag)) {
write(startTag, next);
} else if (isUndef(el.children) || el.children.length === 0) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-server-renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-server-renderer",
"version": "2.3.1",
"version": "2.3.2",
"description": "server renderer for Vue 2.0",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-template-compiler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-template-compiler",
"version": "2.3.1",
"version": "2.3.2",
"description": "template compiler for Vue 2.0",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 60291f2

Please sign in to comment.