- withLoginInfo 改为接收完整 opts(含 method/headers/params) - 等待 login_window 的 destroy 事件(=登录成功信号) - 登录成功后重试原始请求 - 重试仍401则返回null(避免死循环) - 用户手动关闭登录窗口时也触发重试,401则返回null
1.6 KiB
1.6 KiB
title2
此控件是标题控件,标题也有大小
用法
<html>
<head>
<link href="/bricks/css/bricks.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script src="/bricks/bricks.js"></script>
<script type="text/javascript">
const opts =
{
"widget": {
"widgettype": "VBox",
"options": {
},
"subwidgets": [
{
"widgettype": "Title1",
"options": {
"text": "Pic Viewer",
"i18n": true
}
},
{
"widgettype": "Title2",
"options": {
"text": "Pic Viewer",
"i18n": true
}
},
{
"widgettype": "Title3",
"options": {
"text": "Pic Viewer",
"i18n": true
}
},
{
"widgettype": "Title4",
"options": {
"text": "Pic Viewer",
"i18n": true
}
},
{
"widgettype": "Title5",
"options": {
"text": "Pic Viewer",
"i18n": true
}
},
{
"widgettype": "Title6",
"options": {
"text": "Pic Viewer",
"i18n": true
}
},
]
}
}
;
const app = new BricksApp(opts);
app.run();
</script>
</body>
</html>
效果图
options
| 参数 | 参数说明 | 类型 | 是否必填 | 可选值 | 默认值 |
|---|---|---|---|---|---|
| text | 标题的文本内容 | String | 是 | --- | --- |
| i18n | 是否国际化 | Boolean | 是 | true/false | --- |
