mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
乱改。
This commit is contained in:
parent
e630ad2263
commit
53afb28d4e
119
ShadowEditor.UI/assets/css/icon/iconfont.css
Normal file
119
ShadowEditor.UI/assets/css/icon/iconfont.css
Normal file
File diff suppressed because one or more lines are too long
BIN
ShadowEditor.UI/assets/css/icon/iconfont.eot
Normal file
BIN
ShadowEditor.UI/assets/css/icon/iconfont.eot
Normal file
Binary file not shown.
1
ShadowEditor.UI/assets/css/icon/iconfont.js
Normal file
1
ShadowEditor.UI/assets/css/icon/iconfont.js
Normal file
File diff suppressed because one or more lines are too long
179
ShadowEditor.UI/assets/css/icon/iconfont.svg
Normal file
179
ShadowEditor.UI/assets/css/icon/iconfont.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 82 KiB |
BIN
ShadowEditor.UI/assets/css/icon/iconfont.ttf
Normal file
BIN
ShadowEditor.UI/assets/css/icon/iconfont.ttf
Normal file
Binary file not shown.
BIN
ShadowEditor.UI/assets/css/icon/iconfont.woff
Normal file
BIN
ShadowEditor.UI/assets/css/icon/iconfont.woff
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
import { Control, UI } from './third_party';
|
||||
import { Control, UI } from '../third_party';
|
||||
|
||||
/**
|
||||
* 布尔值
|
||||
@ -53,4 +53,6 @@ Boolean.prototype.setValue = function (value) {
|
||||
this.input.checked = value;
|
||||
};
|
||||
|
||||
UI.addXType('boolean', Boolean);
|
||||
|
||||
export default Boolean;
|
||||
@ -1,13 +1,12 @@
|
||||
import Control from './Control';
|
||||
import { Control, UI } from '../third_party';
|
||||
|
||||
/**
|
||||
* 复选框
|
||||
* @author tengge / https://github.com/tengge1
|
||||
* @param {*} options
|
||||
*/
|
||||
function Checkbox(options) {
|
||||
function Checkbox(options = {}) {
|
||||
Control.call(this, options);
|
||||
options = options || {};
|
||||
|
||||
this.value = options.value || false;
|
||||
this.cls = options.cls || 'Checkbox';
|
||||
@ -51,4 +50,6 @@ Checkbox.prototype.setValue = function (value) {
|
||||
return this;
|
||||
};
|
||||
|
||||
UI.addXType('checkbox', Checkbox);
|
||||
|
||||
export default Checkbox;
|
||||
@ -1,4 +1,4 @@
|
||||
import Control from './Control';
|
||||
import { Control, UI } from '../third_party';
|
||||
|
||||
/**
|
||||
* 关闭按钮
|
||||
@ -40,4 +40,6 @@ CloseButton.prototype.render = function () {
|
||||
this.dom.appendChild(this.icon);
|
||||
};
|
||||
|
||||
UI.addXType('closebutton', CloseButton);
|
||||
|
||||
export default CloseButton;
|
||||
@ -1,4 +1,4 @@
|
||||
import Control from './Control';
|
||||
import { Control, UI } from '../third_party';
|
||||
|
||||
/**
|
||||
* 颜色选择器
|
||||
@ -67,4 +67,6 @@ Color.prototype.setHexValue = function (hex) {
|
||||
return this;
|
||||
};
|
||||
|
||||
UI.addXType('color', Color);
|
||||
|
||||
export default Color;
|
||||
@ -1,4 +1,4 @@
|
||||
import Control from './Control';
|
||||
import { Control, UI } from '../third_party';
|
||||
|
||||
/**
|
||||
* 输入框
|
||||
@ -4,4 +4,10 @@ import '../assets/css/ui.css';
|
||||
import './common/Html';
|
||||
import './common/Container';
|
||||
|
||||
// form
|
||||
import './form/Boolean';
|
||||
import './form/Checkbox';
|
||||
import './form/CloseButton';
|
||||
import './form/Color';
|
||||
|
||||
export { Control, UI } from './third_party';
|
||||
@ -6,7 +6,6 @@
|
||||
<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">
|
||||
<link href="../../assets/css/main.css" rel="stylesheet" />
|
||||
<style>
|
||||
.red {
|
||||
background-color: #ccc;
|
||||
@ -31,7 +30,7 @@
|
||||
borderBottom: '1px solid #aaa'
|
||||
},
|
||||
onChange: function () {
|
||||
UI.msg(this.getValue());
|
||||
alert(this.getValue());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -6,21 +6,24 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Checkbox Test</title>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<link href="../../assets/css/main.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="../../node_modules/three/build/three.js"></script>
|
||||
<script src="../../dist/ShadowEditor.js"></script>
|
||||
<script src="../dist/ShadowEditor.UI.js"></script>
|
||||
<script>
|
||||
var control = Shadow.UI.create({
|
||||
const {
|
||||
Control,
|
||||
UI
|
||||
} = Shadow;
|
||||
|
||||
var control = UI.create({
|
||||
xtype: 'checkbox',
|
||||
value: true,
|
||||
style: {
|
||||
borderBottom: '1px solid #aaa'
|
||||
},
|
||||
onChange: function () {
|
||||
UI.msg(this.getValue());
|
||||
alert(this.getValue());
|
||||
}
|
||||
});
|
||||
|
||||
@ -4,23 +4,26 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CloseButton Test</title>
|
||||
<title>10 CloseButtonTest</title>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<link href="../../assets/css/icon/iconfont.css" />
|
||||
<link href="../../assets/css/main.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="../assets/css/icon/iconfont.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="../../node_modules/three/build/three.js"></script>
|
||||
<script src="../../dist/ShadowEditor.js"></script>
|
||||
<script src="../dist/ShadowEditor.UI.js"></script>
|
||||
<script>
|
||||
var control = Shadow.UI.create({
|
||||
const {
|
||||
Control,
|
||||
UI
|
||||
} = Shadow;
|
||||
|
||||
var control = UI.create({
|
||||
xtype: 'closebutton',
|
||||
style: {
|
||||
color: '#555'
|
||||
},
|
||||
onClick: function () {
|
||||
UI.msg('You clicked CloseButton.');
|
||||
alert('You clicked CloseButton.');
|
||||
}
|
||||
});
|
||||
|
||||
@ -6,18 +6,21 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Color Test</title>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<link href="../../assets/css/main.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="../../node_modules/three/build/three.js"></script>
|
||||
<script src="../../dist/ShadowEditor.js"></script>
|
||||
<script src="../dist/ShadowEditor.UI.js"></script>
|
||||
<script>
|
||||
var control = Shadow.UI.create({
|
||||
const {
|
||||
Control,
|
||||
UI
|
||||
} = Shadow;
|
||||
|
||||
var control = UI.create({
|
||||
xtype: 'color',
|
||||
value: '#ff0000',
|
||||
onChange: function () {
|
||||
UI.msg(`Value: ${this.getValue()}\nHexValue: ${this.getHexValue()}`);
|
||||
alert(`Value: ${this.getValue()}\nHexValue: ${this.getHexValue()}`);
|
||||
}
|
||||
});
|
||||
|
||||
@ -6,14 +6,17 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Horizontal Rule Test</title>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<link href="../../assets/css/main.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="../../node_modules/three/build/three.js"></script>
|
||||
<script src="../../dist/ShadowEditor.js"></script>
|
||||
<script src="../dist/ShadowEditor.UI.js"></script>
|
||||
<script>
|
||||
var control = Shadow.UI.create({
|
||||
const {
|
||||
Control,
|
||||
UI
|
||||
} = Shadow;
|
||||
|
||||
var control = UI.create({
|
||||
xtype: 'hr'
|
||||
});
|
||||
|
||||
@ -6,14 +6,17 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Input Test</title>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<link href="../../assets/css/main.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="../../node_modules/three/build/three.js"></script>
|
||||
<script src="../../dist/ShadowEditor.js"></script>
|
||||
<script src="../dist/ShadowEditor.UI.js"></script>
|
||||
<script>
|
||||
var control = Shadow.UI.create({
|
||||
const {
|
||||
Control,
|
||||
UI
|
||||
} = Shadow;
|
||||
|
||||
var control = UI.create({
|
||||
xtype: 'input',
|
||||
value: '123',
|
||||
onChange: function () {
|
||||
Loading…
x
Reference in New Issue
Block a user