This repository has been archived by the owner on Aug 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 179
演示文档使用 require 调用 #1111
Labels
Comments
+1 |
+2 |
+3 |
@afc163 我搞得差不多了,把 jsx 和这个一起搞了。 |
完成了。http://spmjs.io/docs/arale-dialog/examples/ 简单包裹了不含 唯一的问题是 ````iframe 里的代码没有进行处理。因为 iframe 里如果这么显示感觉怪怪的: <link href="../src/dialog.css" rel="stylesheet">
<input type="button" id="trigger1" value="默认样式对话框" />
<script>
var ConfirmBox = require('dialog').ConfirmBox;
var cb = new ConfirmBox({
trigger: '#trigger1',
title: '我真是标题啊',
message: '我是内容 我是内容',
onConfirm: function() {
var that = this;
this.set('title', '三秒后关闭对话框');
this.set('message', '不要啊!!');
setTimeout(function() {
that.hide();
}, 3000);
}
});
</script> |
擦,刚看到 @sorrycc 的回复。 |
nice try |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
目前在演示中是用 seajs.use 来调用。页面会自动插入代码进行运行和展示。
对 seajs 进行弱化后,应该推荐用 require 来调用 CommonJS 模块。因此希望演示文档可以这么写:
同样会自动插入执行和展示演示代码。
The text was updated successfully, but these errors were encountered: