Skip to content

Commit 61f2cda

Browse files
author
唐斌
committed
更新文档
1 parent 8bb06e6 commit 61f2cda

File tree

5 files changed

+20
-14
lines changed

5 files changed

+20
-14
lines changed

doc/css/doc.css

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
right: 5px;
88
z-index: 9;
99
}
10+
h1 span[id],
11+
h2 span[id],
12+
h3 span[id],
13+
h4 span[id],
14+
h5 span[id],
15+
h6 span[id] {
16+
cursor: pointer;
17+
}
1018

1119
/*避免对话框样式被工具生成的全局样式污染*/
1220
.ui-dialog table,
@@ -21,13 +29,6 @@
2129
}
2230

2331

24-
.d-outer table,
25-
.d-outer table tr,
26-
.d-outer tr td,
27-
.d-outer tr:nth-child(2n) {
28-
border: 0 none;
29-
}
30-
3132
code.sh_sourceCode { color: #000000; font-weight: normal; font-style: normal; }
3233
code.sh_sourceCode .sh_keyword { color: #009; font-weight: bold; font-style: normal; }
3334
code.sh_sourceCode .sh_type { color: #0000ff; font-weight: normal; font-style: normal; }

doc/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@
322322
<body>
323323
<h1>artDialog<code>v6</code></h1>
324324

325-
<p><a href="http://aui.github.io/artDialog/">首页</a> &gt; <a href="http://aui.github.io/artDialog/">文档与示例</a></p>
325+
<p><a href="http://aui.github.io/artDialog/">首页</a> &gt; <a href="http://aui.github.io/artDialog/doc/index.html">文档与示例</a></p>
326326

327327
<hr />
328328

@@ -659,7 +659,7 @@ <h3><span id="quickref-iframe">创建 iframe 内容</span></h3>
659659
dialog.close().remove();
660660
</code></pre>
661661

662-
<h2>方法</h2>
662+
<h2><span id="api">方法</span></h2>
663663

664664
<p>若无特别说明,方法均支持链式调用。</p>
665665

@@ -684,6 +684,7 @@ <h4>示例</h4>
684684

685685
<pre><code>var d = dialog({
686686
id: 'api-show-dialog',
687+
quickClose: true,
687688
content: '右键菜单'
688689
});
689690
$(document).on('contextmenu', function (event) {
@@ -832,7 +833,7 @@ <h3><span id="api-dialog-getCurrent">dialog.getCurrent()</span></h3>
832833

833834
<p><strong>注意</strong>:这是一个静态方法。</p>
834835

835-
<h2>配置参数</h2>
836+
<h2><span id="option">配置参数</span></h2>
836837

837838
<h3><span id="option-content">content</span></h3>
838839

doc/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# artDialog``v6``
22

3-
[首页](http://aui.github.io/artDialog/) &gt; [文档与示例](http://aui.github.io/artDialog/)
3+
[首页](http://aui.github.io/artDialog/) &gt; [文档与示例](http://aui.github.io/artDialog/doc/index.html)
44

55
============================
66

@@ -300,7 +300,7 @@ dialog.height(400);
300300
dialog.close().remove();
301301
```
302302

303-
## 方法
303+
## [方法](id:api)
304304

305305
若无特别说明,方法均支持链式调用。
306306

@@ -324,6 +324,7 @@ d.show(document.getElementById('api-show'));
324324
```
325325
var d = dialog({
326326
id: 'api-show-dialog',
327+
quickClose: true,
327328
content: '右键菜单'
328329
});
329330
$(document).on('contextmenu', function (event) {
@@ -480,7 +481,7 @@ dialog({
480481

481482
**注意**:这是一个静态方法。
482483

483-
## 配置参数
484+
## [配置参数](id:option)
484485

485486
### [content](id:option-content)
486487

doc/js/doc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ $(document).on('click', 'button[data-code]', function () {
128128
var id = $(this).data('code');
129129
runCode(id);
130130
return false;
131+
}).on('click', 'h1 [id], h2 [id], h3 [id], h4 [id], h5 [id], h6 [id]', function () {
132+
var id = this.id;
133+
location.hash = id;
131134
});
132135

133-
134136
});

src/dialog-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ define({
6666
quickClose: false,
6767

6868
// css 文件路径,留空则不会使用 js 自动加载样式
69+
// 注意:css 只允许加载一个
6970
cssUri: '../css/ui-dialog.css',
7071

7172
// 模板(使用 table 解决 IE7 宽度自适应的 BUG)

0 commit comments

Comments
 (0)