Evan You пре 9 година
родитељ
комит
60291f2752

+ 9 - 2
dist/vue.common.js

@@ -1,5 +1,5 @@
 /*!
- * Vue.js v2.3.1
+ * Vue.js v2.3.2
  * (c) 2014-2017 Evan You
  * Released under the MIT License.
  */
@@ -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;
     }
@@ -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';
 
 /*  */
 

+ 9 - 2
dist/vue.esm.js

@@ -1,5 +1,5 @@
 /*!
- * Vue.js v2.3.1
+ * Vue.js v2.3.2
  * (c) 2014-2017 Evan You
  * Released under the MIT License.
  */
@@ -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;
     }
@@ -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';
 
 /*  */
 

+ 9 - 2
dist/vue.js

@@ -1,5 +1,5 @@
 /*!
- * Vue.js v2.3.1
+ * Vue.js v2.3.2
  * (c) 2014-2017 Evan You
  * Released under the MIT License.
  */
@@ -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;
     }
@@ -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';
 
 /*  */
 

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/vue.min.js


+ 9 - 2
dist/vue.runtime.common.js

@@ -1,5 +1,5 @@
 /*!
- * Vue.js v2.3.1
+ * Vue.js v2.3.2
  * (c) 2014-2017 Evan You
  * Released under the MIT License.
  */
@@ -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;
     }
@@ -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';
 
 /*  */
 

+ 9 - 2
dist/vue.runtime.esm.js

@@ -1,5 +1,5 @@
 /*!
- * Vue.js v2.3.1
+ * Vue.js v2.3.2
  * (c) 2014-2017 Evan You
  * Released under the MIT License.
  */
@@ -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;
     }
@@ -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';
 
 /*  */
 

+ 9 - 2
dist/vue.runtime.js

@@ -1,5 +1,5 @@
 /*!
- * Vue.js v2.3.1
+ * Vue.js v2.3.2
  * (c) 2014-2017 Evan You
  * Released under the MIT License.
  */
@@ -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;
     }
@@ -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';
 
 /*  */
 

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
dist/vue.runtime.min.js


+ 20 - 11
packages/vue-server-renderer/build.js

@@ -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;
@@ -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;
@@ -5508,7 +5512,6 @@ function renderComponentInner (node, isRoot, context) {
     node,
     context.activeInstance
   );
-  node.ssrContext = null;
   normalizeRender(child);
   var childNode = child._render();
   childNode.parent = node;
@@ -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) {

+ 1 - 1
packages/vue-server-renderer/package.json

@@ -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": {

+ 1 - 1
packages/vue-template-compiler/package.json

@@ -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": {

Неке датотеке нису приказане због велике количине промена