mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 04:28:32 +08:00
Merge remote-tracking branch 'baidu/master'
This commit is contained in:
commit
fe64093ca6
@ -15,7 +15,7 @@ order: 27
|
||||
```schema: scope="body"
|
||||
{
|
||||
"type": "avatar",
|
||||
"src": "../../../examples/static/ai-fake-face.jpg"
|
||||
"src": "https://suda.cdn.bcebos.com/images/amis/ai-fake-face.jpg"
|
||||
}
|
||||
```
|
||||
|
||||
@ -48,7 +48,7 @@ src、text 都支持变量,可以从上下文中动态获取图片或文字,
|
||||
```schema
|
||||
{
|
||||
"data": {
|
||||
"myAvatar": "../../../examples/static/ai-fake-face.jpg"
|
||||
"myAvatar": "https://suda.cdn.bcebos.com/images/amis/ai-fake-face.jpg"
|
||||
},
|
||||
"type": "page",
|
||||
"body": [
|
||||
@ -98,12 +98,12 @@ src、text 都支持变量,可以从上下文中动态获取图片或文字,
|
||||
{
|
||||
"type": "avatar",
|
||||
"size": 20,
|
||||
"src": "../../../examples/static/ai-fake-face.jpg"
|
||||
"src": "https://suda.cdn.bcebos.com/images/amis/ai-fake-face.jpg"
|
||||
},
|
||||
{
|
||||
"type": "avatar",
|
||||
"size": 60,
|
||||
"src": "../../../examples/static/ai-fake-face.jpg"
|
||||
"src": "https://suda.cdn.bcebos.com/images/amis/ai-fake-face.jpg"
|
||||
}
|
||||
]
|
||||
|
||||
@ -118,27 +118,27 @@ src、text 都支持变量,可以从上下文中动态获取图片或文字,
|
||||
{
|
||||
"type": "avatar",
|
||||
"fit": "cover",
|
||||
"src": "../../../examples/static/plumeria.jpeg"
|
||||
"src": "https://suda.cdn.bcebos.com/images/amis/plumeria.jpeg"
|
||||
},
|
||||
{
|
||||
"type": "avatar",
|
||||
"fit": "fill",
|
||||
"src": "../../../examples/static/plumeria.jpeg"
|
||||
"src": "https://suda.cdn.bcebos.com/images/amis/plumeria.jpeg"
|
||||
},
|
||||
{
|
||||
"type": "avatar",
|
||||
"fit": "contain",
|
||||
"src": "../../../examples/static/plumeria.jpeg"
|
||||
"src": "https://suda.cdn.bcebos.com/images/amis/plumeria.jpeg"
|
||||
},
|
||||
{
|
||||
"type": "avatar",
|
||||
"fit": "none",
|
||||
"src": "../../../examples/static/plumeria.jpeg"
|
||||
"src": "https://suda.cdn.bcebos.com/images/amis/plumeria.jpeg"
|
||||
},
|
||||
{
|
||||
"type": "avatar",
|
||||
"fit": "scale-down",
|
||||
"src": "../../../examples/static/plumeria.jpeg"
|
||||
"src": "https://suda.cdn.bcebos.com/images/amis/plumeria.jpeg"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
@ -43,6 +43,42 @@ order: 36
|
||||
}
|
||||
```
|
||||
|
||||
## 横向
|
||||
|
||||
设置 `inline` 可以横向显示
|
||||
|
||||
```schema: scope="body"
|
||||
{
|
||||
"type": "form",
|
||||
"controls": [
|
||||
{
|
||||
"name": "radios",
|
||||
"type": "radios",
|
||||
"label": "radios",
|
||||
"inline": true,
|
||||
"options": [
|
||||
{
|
||||
"label": "OptionA",
|
||||
"value": "a"
|
||||
},
|
||||
{
|
||||
"label": "OptionB",
|
||||
"value": "b"
|
||||
},
|
||||
{
|
||||
"label": "OptionC",
|
||||
"value": "c"
|
||||
},
|
||||
{
|
||||
"label": "OptionD",
|
||||
"value": "d"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 属性表
|
||||
|
||||
当做选择器表单项使用时,除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置
|
||||
|
@ -377,4 +377,3 @@ items 里的属性还支持 `visibleOn` 和 `hiddenOn` 表达式,能隐藏部
|
||||
| items[].span | `SchemaTpl` | | 属性值跨几列 |
|
||||
| items[].visibleOn | [表达式](../../docs/concepts/expression) | | 显示表达式 |
|
||||
| items[].hiddenOn | [表达式](../../docs/concepts/expression) | | 隐藏表达式 |
|
||||
| items[].span | `SchemaTpl` | | 属性值跨几列 |
|
||||
|
@ -692,7 +692,7 @@ export default function entry({pathPrefix}) {
|
||||
{/* expamles */}
|
||||
<Redirect
|
||||
from={`${ContextPath}/examples`}
|
||||
to={`${ContextPath}/examples/pages/simple`}
|
||||
to={`${ContextPath}/examples/index`}
|
||||
/>
|
||||
<Redirect
|
||||
from={`${ContextPath}/${locate}/style`}
|
||||
|
@ -5,6 +5,15 @@ export const components = [
|
||||
{
|
||||
label: '布局',
|
||||
children: [
|
||||
{
|
||||
label: '组件介绍',
|
||||
path: '/zh-CN/components/index',
|
||||
getComponent: () =>
|
||||
// @ts-ignore
|
||||
import('../../docs/zh-CN/components/index.md').then(
|
||||
makeMarkdownRenderer
|
||||
)
|
||||
},
|
||||
{
|
||||
label: 'Page 页面',
|
||||
path: '/zh-CN/components/page',
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import {match} from 'path-to-regexp';
|
||||
import makeSchemaRenderer from './SchemaRender';
|
||||
|
||||
import SimplePageSchema from './Page/Simple';
|
||||
import IndexPageSchema from './Index';
|
||||
import ErrorPageSchema from './Page/Error';
|
||||
import FormPageSchema from './Page/Form';
|
||||
import ModeFormSchema from './Form/Mode';
|
||||
@ -97,8 +97,8 @@ export const examples = [
|
||||
children: [
|
||||
{
|
||||
label: '简单页面',
|
||||
path: '/examples/pages/simple',
|
||||
component: makeSchemaRenderer(SimplePageSchema)
|
||||
path: '/examples/index',
|
||||
component: makeSchemaRenderer(IndexPageSchema)
|
||||
},
|
||||
{
|
||||
label: '初始化出错',
|
||||
|
@ -44,7 +44,7 @@ export class AnchorNavRenderer extends AnchorNav {
|
||||
render,
|
||||
classnames: cx
|
||||
} = this.props;
|
||||
debugger;
|
||||
|
||||
if (renderFormItems && !section.type && section.controls) {
|
||||
return (
|
||||
<div className={cx(`Form--${formMode || 'normal'}`)}>
|
||||
|
Loading…
Reference in New Issue
Block a user