2021-06-03 22:09:30 +08:00
|
|
|
|
---
|
|
|
|
|
title: Year 年份选择
|
|
|
|
|
description:
|
|
|
|
|
type: 0
|
|
|
|
|
group: null
|
|
|
|
|
menuName: Year 年份选择
|
|
|
|
|
icon:
|
|
|
|
|
order: 61
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## 基本用法
|
|
|
|
|
|
|
|
|
|
```schema: scope="body"
|
|
|
|
|
{
|
|
|
|
|
"type": "form",
|
2021-08-09 18:05:01 +08:00
|
|
|
|
"api": "/api/mock2/form/saveForm",
|
2021-06-03 22:09:30 +08:00
|
|
|
|
"body": [
|
|
|
|
|
{
|
|
|
|
|
"type": "input-year",
|
|
|
|
|
"name": "year",
|
|
|
|
|
"label": "年份选择"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
更多用法和配置可以参考 [InputDate 日期](input-date),year 就是 data 的特定配置,所以 data 的所有配置都能使用。
|
2022-03-17 21:25:12 +08:00
|
|
|
|
|
|
|
|
|
## 事件表
|
|
|
|
|
|
|
|
|
|
| 事件名称 | 事件参数 | 说明 |
|
|
|
|
|
|-------------------|------------------------------------------------|----------------------|
|
2022-03-18 13:45:29 +08:00
|
|
|
|
| change | `value: string` 时间值 | 值变化 |
|
2022-03-17 21:25:12 +08:00
|
|
|
|
| focus | - | 获得焦点(非内嵌模式) |
|
|
|
|
|
| blur | - | 失去焦点(非内嵌模式) |
|
|
|
|
|
|
|
|
|
|
## 动作表
|
|
|
|
|
|
|
|
|
|
| 动作名称 | 动作配置 | 说明 |
|
|
|
|
|
|-------------------|-------------------------|------------------------|
|
|
|
|
|
| clear | - | 清空 |
|
2022-03-18 13:45:29 +08:00
|
|
|
|
| reset | - | 值重置 |
|