- withLoginInfo 改为接收完整 opts(含 method/headers/params) - 等待 login_window 的 destroy 事件(=登录成功信号) - 登录成功后重试原始请求 - 重试仍401则返回null(避免死循环) - 用户手动关闭登录窗口时也触发重试,401则返回null
44 lines
1.0 KiB
Markdown
44 lines
1.0 KiB
Markdown
# docs
|
|
|
|
## 用法
|
|
|
|
```html
|
|
<html>
|
|
<head>
|
|
</head>
|
|
<body>
|
|
<script src="/marked.js"></script>
|
|
<script src="http://kimird.com/bricks/bricks.js"></script>
|
|
<script>
|
|
const opts =
|
|
{
|
|
"widget": {
|
|
"widgettype":"MarkdownViewer",
|
|
"options":{
|
|
"navigator":true,
|
|
"md_url":"../docs/index.md"
|
|
}
|
|
}
|
|
}
|
|
|
|
;
|
|
const app = new BricksApp(opts);
|
|
app.run();
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|
|
```
|
|
|
|
## widget参数说明
|
|
|
|
| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 |
|
|
| ---------- | -------- | ------ | -------- | ------ | ------ |
|
|
| widgettype | 控件类型 | String | 是 | --- | --- |
|
|
|
|
### widget.options参数说明
|
|
|
|
| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 |
|
|
| --------- | ---------------- | ------- | -------- | ---------- | ------ |
|
|
| navigator | 是否可以导航指向 | Boolean | 是 | true/false | --- |
|
|
| md_url | 数据来源地址 | String | 是 | --- | --- | |