amis2/examples/components/Form/Hint.jsx

93 lines
1.9 KiB
React
Raw Normal View History

2019-04-30 11:11:25 +08:00
export default {
2019-11-07 10:41:14 +08:00
$schema: 'https://houtai.baidu.com/v2/schemas/page.json#',
title: '其他类型演示',
body: [
{
type: 'form',
api: '/api/mock2/saveForm?waitSeconds=2',
title: 'Hint demo',
mode: 'horizontal',
horizontal: {
leftFixed: true
},
controls: [
2019-04-30 11:11:25 +08:00
{
2019-11-07 10:41:14 +08:00
name: 'button',
type: 'button',
label: 'ID',
value: '',
size: 'xs',
hint: '比如输入 a-xxxx-xxx'
},
2019-04-30 11:11:25 +08:00
2019-11-07 10:41:14 +08:00
{
type: 'input-group',
size: 'md',
label: 'Icon 组合',
controls: [
{
type: 'icon',
addOnclassName: 'no-bg',
className: 'text-sm',
icon: 'search',
vendor: 'iconfont'
},
{
type: 'text',
placeholder: '搜索作业ID/名称',
inputClassName: 'b-l-none p-l-none',
name: 'jobName'
}
]
},
2019-04-30 11:11:25 +08:00
2019-11-07 10:41:14 +08:00
{
name: 'a',
type: 'text',
label: 'ID',
value: '',
size: 'xs',
hint: '比如输入 a-xxxx-xxx'
},
2019-04-30 11:11:25 +08:00
2019-11-07 10:41:14 +08:00
{
name: 'b',
type: 'text',
label: 'ID',
value: '',
size: 'sm',
hint: '比如输入 a-xxxx-xxx'
},
2019-04-30 11:11:25 +08:00
2019-11-07 10:41:14 +08:00
{
name: 'c',
type: 'text',
label: 'ID',
value: '',
size: 'md',
hint: '比如输入 a-xxxx-xxx'
},
2019-04-30 11:11:25 +08:00
2019-11-07 10:41:14 +08:00
{
name: 'd',
type: 'text',
label: 'ID',
value: '',
size: 'lg',
hint: '比如输入 a-xxxx-xxx'
},
2019-04-30 11:11:25 +08:00
2019-11-07 10:41:14 +08:00
{
name: 'tag',
type: 'tag',
label: 'Tag',
size: 'md',
clearable: true,
placeholder: '多个标签以逗号分隔',
options: ['周小度', '杜小度']
2019-04-30 11:11:25 +08:00
}
2019-11-07 10:41:14 +08:00
]
}
]
2019-04-30 11:11:25 +08:00
};