Skip to content

Commit f27de02

Browse files
committed
1.0.13
1 parent df400db commit f27de02

File tree

4 files changed

+68
-71
lines changed

4 files changed

+68
-71
lines changed

src/guide/installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
title: Installation
33
type: guide
44
order: 0
5-
vue_version: 1.0.12
6-
dev_size: "244.43"
7-
min_size: "69.35"
8-
gz_size: "23.79"
5+
vue_version: 1.0.13
6+
dev_size: "244.48"
7+
min_size: "69.37"
8+
gz_size: "23.85"
99
---
1010

1111
> **Compatibility Note:** Vue.js does not support IE8 and below.

themes/vue/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
google_analytics: UA-46852172-1
22
root_domain: vuejs.org
3-
vue_version: 1.0.12
3+
vue_version: 1.0.13

themes/vue/source/js/vue.js

Lines changed: 59 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue.js v1.0.12
2+
* Vue.js v1.0.13
33
* (c) 2015 Evan You
44
* Released under the MIT License.
55
*/
@@ -851,22 +851,10 @@
851851
}
852852
}
853853

854-
/**
855-
* Replace all interpolation tags in a piece of text.
856-
*
857-
* @param {String} text
858-
* @return {String}
859-
*/
860-
861-
function removeTags(text) {
862-
return text.replace(tagRE, '');
863-
}
864-
865854
var text$1 = Object.freeze({
866855
compileRegex: compileRegex,
867856
parseText: parseText,
868-
tokensToExp: tokensToExp,
869-
removeTags: removeTags
857+
tokensToExp: tokensToExp
870858
});
871859

872860
var delimiters = ['{{', '}}'];
@@ -1967,7 +1955,7 @@
19671955

19681956
def(arrayProto, '$set', function $set(index, val) {
19691957
if (index >= this.length) {
1970-
this.length = index + 1;
1958+
this.length = Number(index) + 1;
19711959
}
19721960
return this.splice(index, 1, val)[0];
19731961
});
@@ -2083,8 +2071,7 @@
20832071

20842072
Observer.prototype.walk = function (obj) {
20852073
var keys = Object.keys(obj);
2086-
var i = keys.length;
2087-
while (i--) {
2074+
for (var i = 0, l = keys.length; i < l; i++) {
20882075
this.convert(keys[i], obj[keys[i]]);
20892076
}
20902077
};
@@ -2096,8 +2083,7 @@
20962083
*/
20972084

20982085
Observer.prototype.observeArray = function (items) {
2099-
var i = items.length;
2100-
while (i--) {
2086+
for (var i = 0, l = items.length; i < l; i++) {
21012087
observe(items[i]);
21022088
}
21032089
};
@@ -2161,10 +2147,8 @@
21612147
*/
21622148

21632149
function copyAugment(target, src, keys) {
2164-
var i = keys.length;
2165-
var key;
2166-
while (i--) {
2167-
key = keys[i];
2150+
for (var i = 0, l = keys.length; i < l; i++) {
2151+
var key = keys[i];
21682152
def(target, key, src[key]);
21692153
}
21702154
}
@@ -3348,7 +3332,7 @@
33483332
var cloak = {
33493333
bind: function bind() {
33503334
var el = this.el;
3351-
this.vm.$once('hook:compiled', function () {
3335+
this.vm.$once('pre-hook:compiled', function () {
33523336
el.removeAttribute('v-cloak');
33533337
});
33543338
}
@@ -3360,9 +3344,20 @@
33603344
}
33613345
};
33623346

3347+
var ON = 700;
3348+
var MODEL = 800;
3349+
var BIND = 850;
3350+
var TRANSITION = 1100;
3351+
var EL = 1500;
3352+
var COMPONENT = 1500;
3353+
var PARTIAL = 1750;
3354+
var SLOT = 1750;
3355+
var FOR = 2000;
3356+
var IF = 2000;
3357+
33633358
var el = {
33643359

3365-
priority: 1500,
3360+
priority: EL,
33663361

33673362
bind: function bind() {
33683363
/* istanbul ignore if */
@@ -3513,7 +3508,7 @@
35133508

35143509
var bind = {
35153510

3516-
priority: 850,
3511+
priority: BIND,
35173512

35183513
bind: function bind() {
35193514
var attr = this.arg;
@@ -3563,34 +3558,43 @@
35633558
handleObject: style.handleObject,
35643559

35653560
handleSingle: function handleSingle(attr, value) {
3566-
if (!this.descriptor.interp && attrWithPropsRE.test(attr) && attr in this.el) {
3567-
this.el[attr] = attr === 'value' ? value == null // IE9 will set input.value to "null" for null...
3561+
var el = this.el;
3562+
var interp = this.descriptor.interp;
3563+
if (!interp && attrWithPropsRE.test(attr) && attr in el) {
3564+
el[attr] = attr === 'value' ? value == null // IE9 will set input.value to "null" for null...
35683565
? '' : value : value;
35693566
}
35703567
// set model props
35713568
var modelProp = modelProps[attr];
3572-
if (modelProp) {
3573-
this.el[modelProp] = value;
3569+
if (!interp && modelProp) {
3570+
el[modelProp] = value;
35743571
// update v-model if present
3575-
var model = this.el.__v_model;
3572+
var model = el.__v_model;
35763573
if (model) {
35773574
model.listener();
35783575
}
35793576
}
35803577
// do not set value attribute for textarea
3581-
if (attr === 'value' && this.el.tagName === 'TEXTAREA') {
3582-
this.el.removeAttribute(attr);
3578+
if (attr === 'value' && el.tagName === 'TEXTAREA') {
3579+
el.removeAttribute(attr);
35833580
return;
35843581
}
35853582
// update attribute
35863583
if (value != null && value !== false) {
3587-
if (xlinkRE.test(attr)) {
3588-
this.el.setAttributeNS(xlinkNS, attr, value);
3584+
if (attr === 'class') {
3585+
// handle edge case #1960:
3586+
// class interpolation should not overwrite Vue transition class
3587+
if (el.__v_trans) {
3588+
value += ' ' + el.__v_trans.id + '-transition';
3589+
}
3590+
setClass(el, value);
3591+
} else if (xlinkRE.test(attr)) {
3592+
el.setAttributeNS(xlinkNS, attr, value);
35893593
} else {
3590-
this.el.setAttribute(attr, value);
3594+
el.setAttribute(attr, value);
35913595
}
35923596
} else {
3593-
this.el.removeAttribute(attr);
3597+
el.removeAttribute(attr);
35943598
}
35953599
}
35963600
};
@@ -3646,7 +3650,7 @@
36463650
var on = {
36473651

36483652
acceptStatement: true,
3649-
priority: 700,
3653+
priority: ON,
36503654

36513655
bind: function bind() {
36523656
// deal with iframes
@@ -4037,7 +4041,7 @@
40374041

40384042
var model = {
40394043

4040-
priority: 800,
4044+
priority: MODEL,
40414045
twoWay: true,
40424046
handlers: handlers,
40434047
params: ['lazy', 'number', 'debounce'],
@@ -4609,7 +4613,7 @@
46094613

46104614
var vIf = {
46114615

4612-
priority: 2000,
4616+
priority: IF,
46134617

46144618
bind: function bind() {
46154619
var el = this.el;
@@ -4672,7 +4676,7 @@
46724676

46734677
var vFor = {
46744678

4675-
priority: 2000,
4679+
priority: FOR,
46764680

46774681
params: ['track-by', 'stagger', 'enter-stagger', 'leave-stagger'],
46784682

@@ -5667,7 +5671,7 @@
56675671

56685672
var transition = {
56695673

5670-
priority: 1100,
5674+
priority: TRANSITION,
56715675

56725676
update: function update(id, oldId) {
56735677
var el = this.el;
@@ -5718,7 +5722,7 @@
57185722
// important: defer the child watcher creation until
57195723
// the created hook (after data observation)
57205724
var self = this;
5721-
child.$once('hook:created', function () {
5725+
child.$once('pre-hook:created', function () {
57225726
self.childWatcher = new Watcher(child, childKey, function (val) {
57235727
parentWatcher.set(val);
57245728
}, {
@@ -5741,7 +5745,7 @@
57415745

57425746
var component = {
57435747

5744-
priority: 1500,
5748+
priority: COMPONENT,
57455749

57465750
params: ['keep-alive', 'transition-mode', 'inline-template'],
57475751

@@ -6934,12 +6938,8 @@
69346938
// attribute interpolations
69356939
if (tokens) {
69366940
value = tokensToExp(tokens);
6937-
if (name === 'class') {
6938-
pushDir('class', internalDirectives['class'], true);
6939-
} else {
6940-
arg = name;
6941-
pushDir('bind', publicDirectives.bind, true);
6942-
}
6941+
arg = name;
6942+
pushDir('bind', publicDirectives.bind, true);
69436943
// warn against mixing mustaches with v-bind
69446944
if ('development' !== 'production') {
69456945
if (name === 'class' && Array.prototype.some.call(attrs, function (attr) {
@@ -7600,6 +7600,7 @@
76007600
*/
76017601

76027602
Vue.prototype._callHook = function (hook) {
7603+
this.$emit('pre-hook:' + hook);
76037604
var handlers = this.$options[hook];
76047605
if (handlers) {
76057606
for (var i = 0, j = handlers.length; i < j; i++) {
@@ -7676,13 +7677,7 @@
76767677
// remove attribute
76777678
if ((name !== 'cloak' || this.vm._isCompiled) && this.el && this.el.removeAttribute) {
76787679
var attr = descriptor.attr || 'v-' + name;
7679-
if (attr !== 'class') {
7680-
this.el.removeAttribute(attr);
7681-
} else {
7682-
// for class interpolations, only remove the parts that
7683-
// need to be interpolated.
7684-
setClass(this.el, removeTags(this.el.getAttribute('class')).trim().replace(/\s+/g, ' '));
7685-
}
7680+
this.el.removeAttribute(attr);
76867681
}
76877682

76887683
// copy def properties
@@ -7792,7 +7787,8 @@
77927787
called = true;
77937788
}
77947789
}, {
7795-
immediate: true
7790+
immediate: true,
7791+
user: false
77967792
});(this._paramUnwatchFns || (this._paramUnwatchFns = [])).push(unwatch);
77977793
};
77987794

@@ -8481,7 +8477,8 @@
84818477
var watcher = new Watcher(vm, expOrFn, cb, {
84828478
deep: options && options.deep,
84838479
sync: options && options.sync,
8484-
filters: parsed && parsed.filters
8480+
filters: parsed && parsed.filters,
8481+
user: !options || options.user !== false
84858482
});
84868483
if (options && options.immediate) {
84878484
cb.call(vm, watcher.value);
@@ -9245,7 +9242,7 @@
92459242

92469243
var partial = {
92479244

9248-
priority: 1750,
9245+
priority: PARTIAL,
92499246

92509247
params: ['name'],
92519248

@@ -9296,7 +9293,7 @@
92969293

92979294
var slot = {
92989295

9299-
priority: 1750,
9296+
priority: SLOT,
93009297

93019298
bind: function bind() {
93029299
var host = this.vm;
@@ -9401,7 +9398,7 @@
94019398
partial: partial
94029399
};
94039400

9404-
Vue.version = '1.0.12';
9401+
Vue.version = '1.0.13';
94059402

94069403
/**
94079404
* Vue and every constructor that extends Vue has an

themes/vue/source/js/vue.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)