ShadowEditor/ShadowEditor.Web/test/ui/29 PromptTest.html
2018-08-01 21:34:58 +08:00

33 lines
958 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<title>Prompt Test</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" rel="stylesheet" />
<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>
var control = UI.create({
xtype: 'prompt',
title: '输入',
label: '姓名',
value: '张三',
callback: (event, value) => {
UI.msg(`你的姓名是${value}`);
}
});
control.render();
control.show();
// 或者UI.prompt('请输入', '年龄', '20', (event, value) => { console.log(value); });
</script>
</body>
</html>