1
1
/*!
2
- * Vue.js v0.12.11
2
+ * Vue.js v0.12.12
3
3
* (c) 2015 Evan You
4
4
* Released under the MIT License.
5
5
*/
@@ -459,6 +459,25 @@ return /******/ (function(modules) { // webpackBootstrap
459
459
return cb
460
460
}
461
461
462
+ /**
463
+ * Check if two values are loosely equal - that is,
464
+ * if they are plain objects, do they have the same shape?
465
+ *
466
+ * @param {* } a
467
+ * @param {* } b
468
+ * @return {Boolean }
469
+ */
470
+
471
+ exports . looseEqual = function ( a , b ) {
472
+ /* eslint-disable eqeqeq */
473
+ return a == b || (
474
+ exports . isObject ( a ) && exports . isObject ( b )
475
+ ? JSON . stringify ( a ) === JSON . stringify ( b )
476
+ : false
477
+ )
478
+ /* eslint-enable eqeqeq */
479
+ }
480
+
462
481
463
482
/***/ } ,
464
483
/* 3 */
@@ -6215,9 +6234,7 @@ return /******/ (function(modules) { // webpackBootstrap
6215
6234
} ,
6216
6235
6217
6236
update : function ( value ) {
6218
- /* eslint-disable eqeqeq */
6219
- this . el . checked = value == this . getValue ( )
6220
- /* eslint-enable eqeqeq */
6237
+ this . el . checked = _ . looseEqual ( value , this . getValue ( ) )
6221
6238
}
6222
6239
}
6223
6240
@@ -6293,7 +6310,7 @@ return /******/ (function(modules) { // webpackBootstrap
6293
6310
/* eslint-disable eqeqeq */
6294
6311
op . selected = multi
6295
6312
? indexOf ( value , val ) > - 1
6296
- : equals ( value , val )
6313
+ : _ . looseEqual ( value , val )
6297
6314
/* eslint-enable eqeqeq */
6298
6315
}
6299
6316
} ,
@@ -6450,29 +6467,19 @@ return /******/ (function(modules) { // webpackBootstrap
6450
6467
function indexOf ( arr , val ) {
6451
6468
var i = arr . length
6452
6469
while ( i -- ) {
6453
- if ( equals ( arr [ i ] , val ) ) {
6470
+ if ( _ . looseEqual ( arr [ i ] , val ) ) {
6454
6471
return i
6455
6472
}
6456
6473
}
6457
6474
return - 1
6458
6475
}
6459
6476
6460
- /**
6461
- * Check if two values are loosely equal. If two objects
6462
- * have the same shape, they are considered equal too:
6463
- * equals({a: 1}, {a: 1}) => true
6464
- */
6465
-
6466
- function equals ( a , b ) {
6467
- /* eslint-disable eqeqeq */
6468
- return a == b || JSON . stringify ( a ) == JSON . stringify ( b )
6469
- /* eslint-enable eqeqeq */
6470
- }
6471
-
6472
6477
6473
6478
/***/ } ,
6474
6479
/* 44 */
6475
- /***/ function ( module , exports ) {
6480
+ /***/ function ( module , exports , __webpack_require__ ) {
6481
+
6482
+ var _ = __webpack_require__ ( 1 )
6476
6483
6477
6484
module . exports = {
6478
6485
@@ -6483,11 +6490,11 @@ return /******/ (function(modules) { // webpackBootstrap
6483
6490
var falseExp = this . _checkParam ( 'false-exp' )
6484
6491
6485
6492
this . _matchValue = function ( value ) {
6486
- var trueValue = true
6487
6493
if ( trueExp !== null ) {
6488
- trueValue = self . vm . $eval ( trueExp )
6494
+ return _ . looseEqual ( value , self . vm . $eval ( trueExp ) )
6495
+ } else {
6496
+ return ! ! value
6489
6497
}
6490
- return trueValue === value
6491
6498
}
6492
6499
6493
6500
function getValue ( ) {
0 commit comments