Skip to content

Commit 79f289a

Browse files
committed
[release] 1.0.4
1 parent 5b809fd commit 79f289a

File tree

4 files changed

+50
-41
lines changed

4 files changed

+50
-41
lines changed

dist/vue.js

+44-35
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue.js v1.0.3
2+
* Vue.js v1.0.4
33
* (c) 2015 Evan You
44
* Released under the MIT License.
55
*/
@@ -146,7 +146,7 @@ return /******/ (function(modules) { // webpackBootstrap
146146
extend(p, __webpack_require__(65))
147147
extend(p, __webpack_require__(66))
148148

149-
Vue.version = '1.0.3'
149+
Vue.version = '1.0.4'
150150
module.exports = _.Vue = Vue
151151

152152
/* istanbul ignore if */
@@ -2409,6 +2409,9 @@ return /******/ (function(modules) { // webpackBootstrap
24092409
'if'
24102410
]
24112411

2412+
// default directive priority
2413+
var DEFAULT_PRIORITY = 1000
2414+
24122415
/**
24132416
* Compile a template and return a reusable composite link
24142417
* function, which recursively contains more link functions
@@ -2491,8 +2494,8 @@ return /******/ (function(modules) { // webpackBootstrap
24912494
*/
24922495

24932496
function directiveComparator (a, b) {
2494-
a = a.descriptor.def.priority || 0
2495-
b = b.descriptor.def.priority || 0
2497+
a = a.descriptor.def.priority || DEFAULT_PRIORITY
2498+
b = b.descriptor.def.priority || DEFAULT_PRIORITY
24962499
return a > b ? -1 : a === b ? 0 : 1
24972500
}
24982501

@@ -2597,16 +2600,17 @@ return /******/ (function(modules) { // webpackBootstrap
25972600
}
25982601
} else if (("development") !== 'production' && containerAttrs) {
25992602
// warn container directives for fragment instances
2600-
containerAttrs.forEach(function (attr) {
2601-
if (attr.name.indexOf('v-') === 0 || attr.name === 'transition') {
2602-
_.warn(
2603-
attr.name + ' is ignored on component ' +
2604-
'<' + options.el.tagName.toLowerCase() + '> because ' +
2605-
'the component is a fragment instance: ' +
2606-
'http://vuejs.org/guide/components.html#Fragment_Instance'
2607-
)
2608-
}
2609-
})
2603+
var names = containerAttrs.map(function (attr) {
2604+
return '"' + attr.name + '"'
2605+
}).join(', ')
2606+
var plural = containerAttrs.length > 1
2607+
_.warn(
2608+
'Attribute' + (plural ? 's ' : ' ') + names +
2609+
(plural ? ' are' : ' is') + ' ignored on component ' +
2610+
'<' + options.el.tagName.toLowerCase() + '> because ' +
2611+
'the component is a fragment instance: ' +
2612+
'http://vuejs.org/guide/components.html#Fragment_Instance'
2613+
)
26102614
}
26112615

26122616
return function rootLinkFn (vm, el, scope) {
@@ -3696,8 +3700,8 @@ return /******/ (function(modules) { // webpackBootstrap
36963700
var parentScope = this._scope || this.vm
36973701
var scope = Object.create(parentScope)
36983702
// ref holder for the scope
3699-
scope.$refs = {}
3700-
scope.$els = {}
3703+
scope.$refs = Object.create(parentScope.$refs)
3704+
scope.$els = Object.create(parentScope.$els)
37013705
// make sure point $parent to parent scope
37023706
scope.$parent = parentScope
37033707
// for two-way binding on alias
@@ -5058,6 +5062,10 @@ return /******/ (function(modules) { // webpackBootstrap
50585062
bind: function () {
50595063
var attr = this.arg
50605064
var tag = this.el.tagName
5065+
// should be deep watch on object mode
5066+
if (!attr) {
5067+
this.deep = true
5068+
}
50615069
// handle interpolation bindings
50625070
if (this.descriptor.interp) {
50635071
// only allow binding on native attributes
@@ -5344,6 +5352,8 @@ return /******/ (function(modules) { // webpackBootstrap
53445352

53455353
module.exports = {
53465354

5355+
deep: true,
5356+
53475357
update: function (value) {
53485358
if (value && typeof value === 'string') {
53495359
this.handleObject(stringToObject(value))
@@ -6154,19 +6164,18 @@ return /******/ (function(modules) { // webpackBootstrap
61546164
* getters, so that every nested property inside the object
61556165
* is collected as a "deep" dependency.
61566166
*
6157-
* @param {Object} obj
6167+
* @param {*} val
61586168
*/
61596169

6160-
function traverse (obj) {
6161-
var key, val, i
6162-
for (key in obj) {
6163-
val = obj[key]
6164-
if (_.isArray(val)) {
6165-
i = val.length
6166-
while (i--) traverse(val[i])
6167-
} else if (_.isObject(val)) {
6168-
traverse(val)
6169-
}
6170+
function traverse (val) {
6171+
var i, keys
6172+
if (_.isArray(val)) {
6173+
i = val.length
6174+
while (i--) traverse(val[i])
6175+
} else if (_.isObject(val)) {
6176+
keys = Object.keys(val)
6177+
i = keys.length
6178+
while (i--) traverse(val[keys[i]])
61706179
}
61716180
}
61726181

@@ -7112,7 +7121,7 @@ return /******/ (function(modules) { // webpackBootstrap
71127121

71137122
p.enterNextTick = function () {
71147123

7115-
// Importnatn hack:
7124+
// Important hack:
71167125
// in Chrome, if a just-entered element is applied the
71177126
// leave class while its interpolated property still has
71187127
// a very small value (within one frame), Chrome will
@@ -9457,15 +9466,15 @@ return /******/ (function(modules) { // webpackBootstrap
94579466
while (i--) {
94589467
key = params[i]
94599468
mappedKey = _.camelize(key)
9460-
val = _.attr(this.el, key)
9469+
val = _.getBindAttr(this.el, key)
94619470
if (val != null) {
9462-
// static
9463-
this.params[mappedKey] = val === '' ? true : val
9464-
} else {
94659471
// dynamic
9466-
val = _.getBindAttr(this.el, key)
9472+
this._setupParamWatcher(mappedKey, val)
9473+
} else {
9474+
// static
9475+
val = _.attr(this.el, key)
94679476
if (val != null) {
9468-
this._setupParamWatcher(mappedKey, val)
9477+
this.params[mappedKey] = val === '' ? true : val
94699478
}
94709479
}
94719480
}
@@ -9522,7 +9531,7 @@ return /******/ (function(modules) { // webpackBootstrap
95229531
fn.call(scope, scope)
95239532
}
95249533
if (this.filters) {
9525-
handler = this.vm._applyFilters(handler, null, this.filters)
9534+
handler = scope._applyFilters(handler, null, this.filters)
95269535
}
95279536
this.update(handler)
95289537
return true

dist/vue.min.js

+4-4
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": "1.0.3",
3+
"version": "1.0.4",
44
"author": "Evan You <[email protected]>",
55
"license": "MIT",
66
"description": "Simple, Fast & Composable MVVM for building interactive interfaces",

src/vue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extend(p, require('./api/dom'))
8585
extend(p, require('./api/events'))
8686
extend(p, require('./api/lifecycle'))
8787

88-
Vue.version = '1.0.3'
88+
Vue.version = '1.0.4'
8989
module.exports = _.Vue = Vue
9090

9191
/* istanbul ignore if */

0 commit comments

Comments
 (0)