ShadowEditor/ShadowEditor.UI/test/08 BooleanTest.html
2018-11-12 20:53:32 +08:00

41 lines
847 B
HTML

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<title>08 BooleanTest</title>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
.red {
background-color: #ccc;
}
</style>
</head>
<body>
<script src="../dist/ShadowEditor.UI.js"></script>
<script>
const {
Control,
UI
} = Shadow;
var control = UI.create({
xtype: 'boolean',
text: 'Auto Save',
value: true,
cls: 'red',
style: {
borderBottom: '1px solid #aaa'
},
onChange: function () {
alert(this.getValue());
}
});
control.render();
</script>
</body>
</html>