Evan You пре 12 година
родитељ
комит
e1ea3fc840
5 измењених фајлова са 16 додато и 36 уклоњено
  1. 1 1
      bower.json
  2. 1 1
      component.json
  3. 12 32
      dist/vue.js
  4. 1 1
      dist/vue.min.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
     "name": "vue",
-    "version": "0.10.1",
+    "version": "0.10.2",
     "main": "dist/vue.js",
     "description": "Simple, Fast & Composable MVVM for building interative interfaces",
     "authors": ["Evan You <yyx990803@gmail.com>"],

+ 1 - 1
component.json

@@ -1,6 +1,6 @@
 {
     "name": "vue",
-    "version": "0.10.1",
+    "version": "0.10.2",
     "main": "src/main.js",
     "author": "Evan You <yyx990803@gmail.com>",
     "description": "Simple, Fast & Composable MVVM for building interative interfaces",

+ 12 - 32
dist/vue.js

@@ -1,5 +1,5 @@
 /*
- Vue.js v0.10.1
+ Vue.js v0.10.2
  (c) 2014 Evan You
  License: MIT
 */
@@ -1658,7 +1658,7 @@ CompilerProto.getOption = function (type, id, silent) {
                 ? parent.getOption(type, id, silent)
                 : globalAssets[type] && globalAssets[type][id]
         )
-    if (!res && !silent) {
+    if (!res && !silent && typeof id === 'string') {
         utils.warn('Unknown ' + type.slice(0, -1) + ': ' + id)
     }
     return res
@@ -3831,7 +3831,6 @@ module.exports = {
         ctn.insertBefore(this.ref, el)
         ctn.removeChild(el)
 
-        this.initiated = false
         this.collection = null
         this.vms = null
 
@@ -3847,13 +3846,6 @@ module.exports = {
             }
         }
 
-        // if initiating with an empty collection, we need to
-        // force a compile so that we get all the bindings for
-        // dependency extraction.
-        if (!this.initiated && (!collection || !collection.length)) {
-            this.dryBuild()
-        }
-
         // keep reference of old data and VMs
         // so we can reuse them if possible
         this.oldVMs = this.vms
@@ -3871,24 +3863,6 @@ module.exports = {
 
     },
 
-    /**
-     *  Run a dry build just to collect bindings
-     */
-    dryBuild: function () {
-        var el = this.el.cloneNode(true),
-            Ctor = this.compiler.resolveComponent(el)
-        new Ctor({
-            el     : el,
-            parent : this.vm,
-            data   : { $index: 0 },
-            compilerOptions: {
-                repeat: true,
-                expCache: this.expCache
-            }
-        }).$destroy()
-        this.initiated = true
-    },
-
     init: function (collection, isObject) {
         var vm, vms = []
         for (var i = 0, l = collection.length; i < l; i++) {
@@ -3949,7 +3923,9 @@ module.exports = {
         // second pass, collect old reused and destroy unused
         for (i = 0, l = oldVMs.length; i < l; i++) {
             vm = oldVMs[i]
-            item = vm.$data
+            item = this.arg
+                ? vm.$data[this.arg]
+                : vm.$data
             if (item.$reused) {
                 vm.$reused = true
                 delete item.$reused
@@ -3964,7 +3940,9 @@ module.exports = {
                 vms[vm.$index] = vm
             } else {
                 // this one can be destroyed.
-                delete item.__emitter__[this.identifier]
+                if (item.__emitter__) {
+                    delete item.__emitter__[this.identifier]
+                }
                 vm.$destroy()
             }
         }
@@ -4035,8 +4013,10 @@ module.exports = {
                 }
             })
 
-        // attach an ienumerable identifier
-        data.__emitter__[this.identifier] = true
+        if (isObject) {
+            // attach an ienumerable identifier to the raw data
+            (raw || data).__emitter__[this.identifier] = true
+        }
 
         if (wrap) {
             var self = this,

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


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "vue",
-  "version": "0.10.1",
+  "version": "0.10.2",
   "author": {
     "name": "Evan You",
     "email": "yyx990803@gmail.com",

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