This repository has been archived on 2023-08-29. You can view files and clone it, but cannot push or open issues/pull-requests.
yutent
/
anot.js
Archived
1
0
Fork 0
1.x
宇天 2018-12-26 16:59:04 +08:00
parent b5a9ef0695
commit 98b21a64ec
1 changed files with 4 additions and 5 deletions

View File

@ -307,7 +307,6 @@ function observeObject(source, options) {
$vmodel[name] = source[name]
})
/* jshint ignore:start */
// hideProperty($vmodel, '$ups', null)
hideProperty($vmodel, '$id', 'anonymous')
hideProperty($vmodel, '$up', old ? old.$up : null)
@ -343,9 +342,7 @@ function observeObject(source, options) {
}
})
}
/* jshint ignore:end */
//必须设置了$active,$events
simple.forEach(function(name) {
var oldVal = old && old[name]
var val = ($vmodel[name] = state[name])
@ -373,8 +370,10 @@ function observeObject(source, options) {
$vmodel.$active = true
if (old && old.$up && old.$up.$children) {
old.$up.$children.push($vmodel)
if ($vmodel.$id !== 'anonymous') {
if (old && old.$up && old.$up.$children) {
old.$up.$children.push($vmodel)
}
}
return $vmodel