Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix 当第一次没有定义某属性进行隐藏后,然后再替换整个对象,让它拥有此属性时,注释节点重复生成引发的BUG,见index_if4.html
- Loading branch information
qincheng
committed
Feb 10, 2014
1 parent
04e6d53
commit 1d8ae1f
Showing
3 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>ms-if</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
|
||
<script src="avalon.js"></script> | ||
|
||
<script> | ||
var detailRange = avalon.define('detailRange', function(vm) { | ||
vm.wt = {} | ||
}) | ||
|
||
setTimeout(function() { | ||
detailRange.wt = {ID: "132", MC: "显示!!"} | ||
}, 3000) | ||
|
||
setTimeout(function() { | ||
detailRange.wt = {} | ||
},5000) | ||
|
||
avalon.scan() | ||
|
||
</script> | ||
</head> | ||
<body> | ||
<div ms-controller="detailRange" class="parent"> | ||
这是比较输出结果:{{wt.ID != null}} | ||
<div class="data-content" ms-visible="wt.ID != null"> | ||
这是visible的: | ||
<span>{{wt.MC}}</span> | ||
</div> | ||
<div class="data-content222" ms-if="wt.ID != null"> | ||
这是if的: | ||
<span>{{wt.MC}}</span> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> |