New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avalon对于ms-visible绑定的处理 #474
Comments
有例子吗? |
@RubyLouvre 就这样解决了?!,i 服了y. |
我叫你给例子,你这么久都不给例子 |
<!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<script src="avalon.js"></script>
<script>
var model = avalon.define({
$id: "test",
aaa: false,
click: function() {
model.aaa = !model.aaa
}
})
</script>
<style>
.eee {
display:inline-block;
}
</style>
</head>
<body ms-controller="test">
<div ms-visible="aaa" style="display: none" class="eee">xxxx</div>
<button ms-click="click">点我</button>
</body>
</html> 正确得到inline-block <!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<script src="avalon.js"></script>
<script>
var model = avalon.define({
$id: "test",
aaa: false,
click: function() {
model.aaa = !model.aaa
}
})
</script>
<style>
</style>
</head>
<body ms-controller="test">
<ol>
<li ms-visible="aaa" style="display: none" >xxxx</li>
</ol>
<button ms-click="click">点我</button>
</body>
</html> 正确得到list-item <!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<script src="avalon.js"></script>
<script>
var model = avalon.define({
$id: "test",
aaa: false,
click: function() {
model.aaa = !model.aaa
}
})
</script>
<style>
</style>
</head>
<body ms-controller="test">
<table ms-visible="aaa" style="display: none;border:1px solid red" >
<tr><td>ccc</td></tr>
</table>
<button ms-click="click">点我</button>
</body>
</html> 正确得到table <!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<script src="avalon.js"></script>
<script>
var model = avalon.define({
$id: "test",
aaa: false,
click: function() {
model.aaa = !model.aaa
}
})
</script>
<style type="text/css">
#flex-container {//CSS3最新的伸缩盒规范
width:100%;
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row;
flex-direction: row;
}
#flex-container .flex-item {//水平两栏布局
border:1px solid #f00;
/* flexbox specific properties */
-webkit-flex: auto;
flex: auto;
}
</style>
</head>
<body ms-controller="test">
<div id="flex-container" ms-visible="aaa" style="display: none;">
<div class="flex-item">Flex Box 1</div>
<div class="flex-item">Flex Box 2</div>
</div>
<button ms-click="click">点我</button>
</body>
</html> 正确得到flex |
把display:none写到css里试下,例子在这http://jsfiddle.net/thirteen/geusj21b/1/ @RubyLouvre |
已修 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
最近的一次更新 cd1399b,把ms-visible绑定取node默认display值调整了,再目前最新commit的3002行,项目引用后发现好像有问题,如下
The text was updated successfully, but these errors were encountered: