Procházet zdrojové kódy

small fixes for Vue.extend & content insertion

Evan You před 11 roky
rodič
revize
bdff636065
2 změnil soubory, kde provedl 3 přidání a 2 odebrání
  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)
     }
   }
 }