amis/examples/components/Linkage/Page.jsx
liaoxuezhi 65ac422ed6
1.2.x 文档&示例配置调整 (#2064)
* 补充容错

* fix: form 中 name 关联顶层数据初始化失效

* 更新 examples

* 文档调整

* 删除多余的文档, 调整 schema

* schema 调整

* schema 调整

* control 类型容器 control 改成 body

* 修复一个选项加载的bug

* form 注册直接用 type
2021-06-07 10:09:55 +08:00

49 lines
1.1 KiB
JavaScript
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.

export default {
type: 'page',
title: '地址栏变化自动更新',
initApi: '/api/mock2/form/initData?id=${id}',
aside: {
type: 'wrapper',
size: 'xs',
className: '',
body: {
type: 'nav',
stacked: true,
links: [
{
label: '页面1',
to: '?id=1'
},
{
label: '页面2',
children: [
{
label: '页面2-1',
to: '?id=2-1'
},
{
label: '页面2-2',
to: '?id=2-2'
},
{
label: '页面2-3disabled',
disabled: true,
to: '?id=2-3'
}
]
},
{
label: '页面3',
to: '?id=3'
}
]
}
},
body: [
'<p><span class="text-danger">注意 page 渲染器的 `initApi` 中有变量跟地址栏中变量关联,只要值发生了变化,就会重新拉取一次 initApi。</sapn></p>',
'<p>这些数据是通过 initApi 拉取到的数据。 `\\$infoId`: <span class="text-danger">${infoId|default:空}</span></p>'
]
};