Skip to content

Commit 6c84105

Browse files
committed
[release] 0.11.8
1 parent 111bcb1 commit 6c84105

File tree

5 files changed

+17
-107
lines changed

5 files changed

+17
-107
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue",
3-
"version": "0.11.7",
3+
"version": "0.11.8",
44
"main": "dist/vue.js",
55
"description": "Simple, Fast & Composable MVVM for building interative interfaces",
66
"authors": ["Evan You <[email protected]>"],

component.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue",
3-
"version": "0.11.7",
3+
"version": "0.11.8",
44
"main": "src/vue.js",
55
"author": "Evan You <[email protected]>",
66
"description": "Simple, Fast & Composable MVVM for building interative interfaces",

dist/vue.js

+11-101
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Vue.js v0.11.7
2+
* Vue.js v0.11.8
33
* (c) 2015 Evan You
44
* Released under the MIT License.
55
*/
@@ -364,6 +364,10 @@ return /******/ (function(modules) { // webpackBootstrap
364364
// attached/detached hooks on them.
365365
this._transCpnts = null
366366

367+
// props used in v-repeat diffing
368+
this._new = true
369+
this._reused = false
370+
367371
// merge options.
368372
options = this.$options = mergeOptions(
369373
this.constructor.options,
@@ -6011,7 +6015,6 @@ return /******/ (function(modules) { // webpackBootstrap
60116015
/***/ function(module, exports, __webpack_require__) {
60126016

60136017
var _ = __webpack_require__(11)
6014-
var config = __webpack_require__(15)
60156018
var isObject = _.isObject
60166019
var isPlainObject = _.isPlainObject
60176020
var textParser = __webpack_require__(19)
@@ -6061,7 +6064,6 @@ return /******/ (function(modules) { // webpackBootstrap
60616064
this._checkParam('track-by') ||
60626065
this._checkParam('trackby') // 0.11.0 compat
60636066
this.cache = Object.create(null)
6064-
this.checkUpdateStrategy()
60656067
},
60666068

60676069
/**
@@ -6102,8 +6104,10 @@ return /******/ (function(modules) { // webpackBootstrap
61026104
var id = _.attr(this.el, 'component')
61036105
var options = this.vm.$options
61046106
if (!id) {
6105-
this.Ctor = _.Vue // default constructor
6106-
this.inherit = true // inline repeats should inherit
6107+
// default constructor
6108+
this.Ctor = _.Vue
6109+
// inline repeats should inherit
6110+
this.inherit = true
61076111
// important: transclude with no options, just
61086112
// to ensure block start and block end
61096113
this.template = transclude(this.template)
@@ -6142,30 +6146,6 @@ return /******/ (function(modules) { // webpackBootstrap
61426146
}
61436147
},
61446148

6145-
/**
6146-
* Check what strategy to use for updates.
6147-
*
6148-
* If the repeat is simple enough we can use in-place
6149-
* updates which simply overwrites existing instances'
6150-
* data. This strategy reuses DOM nodes and instances
6151-
* as much as possible.
6152-
*
6153-
* There are two situations where we have to use the
6154-
* more complex but more accurate diff algorithm:
6155-
* 1. We are using components with or inside v-repeat.
6156-
* The components could have private state that needs
6157-
* to be preserved across updates.
6158-
* 2. We have transitions on the list, which requires
6159-
* precise DOM re-positioning.
6160-
*/
6161-
6162-
checkUpdateStrategy: function () {
6163-
this.needDiff =
6164-
this.asComponent ||
6165-
this.el.hasAttribute(config.prefix + 'transition') ||
6166-
this.template.querySelector('[' + config.prefix + 'component]')
6167-
},
6168-
61696149
/**
61706150
* Update.
61716151
* This is called whenever the Array mutates.
@@ -6181,9 +6161,7 @@ return /******/ (function(modules) { // webpackBootstrap
61816161
} else if (type === 'string') {
61826162
data = _.toArray(data)
61836163
}
6184-
this.vms = this.needDiff
6185-
? this.diff(data, this.vms)
6186-
: this.inplaceUpdate(data, this.vms)
6164+
this.vms = this.diff(data, this.vms)
61876165
// update v-ref
61886166
if (this.refID) {
61896167
this.vm.$[this.refID] = this.vms
@@ -6195,43 +6173,6 @@ return /******/ (function(modules) { // webpackBootstrap
61956173
}
61966174
},
61976175

6198-
/**
6199-
* Inplace update that maximally reuses existing vm
6200-
* instances and DOM nodes by simply swapping data into
6201-
* existing vms.
6202-
*
6203-
* @param {Array} data
6204-
* @param {Array} oldVms
6205-
* @return {Array}
6206-
*/
6207-
6208-
inplaceUpdate: function (data, oldVms) {
6209-
oldVms = oldVms || []
6210-
var vms
6211-
var dir = this
6212-
var alias = dir.arg
6213-
var converted = dir.converted
6214-
if (data.length < oldVms.length) {
6215-
oldVms.slice(data.length).forEach(function (vm) {
6216-
vm.$destroy(true)
6217-
})
6218-
vms = oldVms.slice(0, data.length)
6219-
overwrite(data, vms, alias, converted)
6220-
} else if (data.length > oldVms.length) {
6221-
var newVms = data.slice(oldVms.length).map(function (data, i) {
6222-
var vm = dir.build(data, i + oldVms.length)
6223-
vm.$before(dir.ref)
6224-
return vm
6225-
})
6226-
overwrite(data.slice(0, oldVms.length), oldVms, alias, converted)
6227-
vms = oldVms.concat(newVms)
6228-
} else {
6229-
overwrite(data, oldVms, alias, converted)
6230-
vms = oldVms
6231-
}
6232-
return vms
6233-
},
6234-
62356176
/**
62366177
* Diff, based on new data and old data, determine the
62376178
* minimum amount of DOM manipulations needed to make the
@@ -6440,9 +6381,7 @@ return /******/ (function(modules) { // webpackBootstrap
64406381
var vm
64416382
while (i--) {
64426383
vm = this.vms[i]
6443-
if (this.needDiff) {
6444-
this.uncacheVm(vm)
6445-
}
6384+
this.uncacheVm(vm)
64466385
vm.$destroy()
64476386
}
64486387
}
@@ -6615,35 +6554,6 @@ return /******/ (function(modules) { // webpackBootstrap
66156554
return ret
66166555
}
66176556

6618-
/**
6619-
* Helper function to overwrite new data Array on to
6620-
* existing vms. Used in `inplaceUpdate`.
6621-
*
6622-
* @param {Array} arr
6623-
* @param {Array} vms
6624-
* @param {String|undefined} alias
6625-
* @param {Boolean} converted
6626-
*/
6627-
6628-
function overwrite (arr, vms, alias, converted) {
6629-
var vm, data, raw
6630-
for (var i = 0, l = arr.length; i < l; i++) {
6631-
vm = vms[i]
6632-
data = raw = arr[i]
6633-
if (converted) {
6634-
vm.$key = data.$key
6635-
raw = data.$value
6636-
}
6637-
if (alias) {
6638-
vm[alias] = raw
6639-
} else if (!isObject(raw)) {
6640-
vm.$value = raw
6641-
} else {
6642-
vm._setData(raw)
6643-
}
6644-
}
6645-
}
6646-
66476557
/***/ },
66486558
/* 45 */
66496559
/***/ function(module, exports, __webpack_require__) {

dist/vue.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue",
3-
"version": "0.11.7",
3+
"version": "0.11.8",
44
"author": "Evan You <[email protected]>",
55
"license": "MIT",
66
"description": "Simple, Fast & Composable MVVM for building interative interfaces",

0 commit comments

Comments
 (0)