mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
43 lines
885 B
HTML
43 lines
885 B
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="zh-cn">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>05 DivTest</title>
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
<style>
|
|
.bg {
|
|
border: 1px solid #555;
|
|
background-color: #aaa;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<script src="../dist/ShadowEditor.UI.js"></script>
|
|
<script>
|
|
const {
|
|
Control,
|
|
UI
|
|
} = Shadow;
|
|
|
|
var control = UI.create({
|
|
xtype: 'div',
|
|
cls: 'bg',
|
|
style: {
|
|
color: 'red'
|
|
},
|
|
html: 'Hello, world!',
|
|
listeners: {
|
|
click: function () {
|
|
alert('You clicked div!');
|
|
}
|
|
}
|
|
});
|
|
|
|
control.render();
|
|
</script>
|
|
</body>
|
|
|
|
</html> |