Explorar o código

small fixes for Vue.extend & content insertion

Evan You %!s(int64=12) %!d(string=hai) anos
pai
achega
bdff636065
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 1 0
      src/api/global.js
  2. 2 2
      src/instance/element.js

+ 1 - 0
src/api/global.js

@@ -50,6 +50,7 @@ exports.extend = function (extendOptions) {
   // create asset registers, so extended classes
   // can have their private assets too.
   createAssetRegisters(Sub)
+  return Sub
 }
 
 /**

+ 2 - 2
src/instance/element.js

@@ -80,10 +80,10 @@ exports._collectRawContent = function () {
   var el = this.$el
   var child
   if (el.hasChildNodes()) {
-    this.rawContent = document.createElement('div')
+    this._rawContent = document.createElement('div')
     /* jshint boss: true */
     while (child = el.firstChild) {
-      this.rawContent.appendChild(child)
+      this._rawContent.appendChild(child)
     }
   }
 }