Skip to content

Commit b2e9cc8

Browse files
committed
docs: add version requirement
1 parent 94e37d6 commit b2e9cc8

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

docs/src/components/common-ui/vben-api-component.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -131,27 +131,27 @@ function fetchApi(): Promise<Record<string, any>> {
131131

132132
### Props
133133

134-
| 属性名 | 描述 | 类型 | 默认值 |
134+
| 属性名 | 描述 | 类型 | 默认值 | 版本要求 |
135135
| --- | --- | --- | --- | --- |
136-
| modelValue(v-model) | 当前值 | `any` | - |
137-
| component | 欲包装的组件(以下称为目标组件) | `Component` | - |
138-
| numberToString | 是否将value从数字转为string | `boolean` | `false` |
139-
| api | 获取数据的函数 | `(arg?: any) => Promise<OptionsItem[] \| Record<string, any>>` | - |
140-
| params | 传递给api的参数 | `Record<string, any>` | - |
141-
| resultField | 从api返回的结果中提取options数组的字段名 | `string` | - |
142-
| labelField | label字段名 | `string` | `label` |
143-
| childrenField | 子级数据字段名,需要层级数据的组件可用 | `string` | `` |
144-
| valueField | value字段名 | `string` | `value` |
145-
| optionsPropName | 目标组件接收options数据的属性名称 | `string` | `options` |
146-
| modelPropName | 目标组件的双向绑定属性名,默认为modelValue。部分组件可能为value | `string` | `modelValue` |
147-
| immediate | 是否立即调用api | `boolean` | `true` |
148-
| alwaysLoad | 每次`visibleEvent`事件发生时都重新请求数据 | `boolean` | `false` |
149-
| beforeFetch | 在api请求之前的回调函数 | `AnyPromiseFunction<any, any>` | - |
150-
| afterFetch | 在api请求之后的回调函数 | `AnyPromiseFunction<any, any>` | - |
151-
| options | 直接传入选项数据,也作为api返回空数据时的后备数据 | `OptionsItem[]` | - |
152-
| visibleEvent | 触发重新请求数据的事件名 | `string` | - |
153-
| loadingSlot | 目标组件的插槽名称,用来显示一个"加载中"的图标 | `string` | - |
154-
| autoSelect | 自动设置选项 | `'first' \| 'last' \| 'none'\| false` | false | - |
136+
| modelValue(v-model) | 当前值 | `any` | - | - |
137+
| component | 欲包装的组件(以下称为目标组件) | `Component` | - | - |
138+
| numberToString | 是否将value从数字转为string | `boolean` | `false` | - |
139+
| api | 获取数据的函数 | `(arg?: any) => Promise<OptionsItem[] \| Record<string, any>>` | - | - |
140+
| params | 传递给api的参数 | `Record<string, any>` | - | - |
141+
| resultField | 从api返回的结果中提取options数组的字段名 | `string` | - | - |
142+
| labelField | label字段名 | `string` | `label` | - |
143+
| childrenField | 子级数据字段名,需要层级数据的组件可用 | `string` | `` | - |
144+
| valueField | value字段名 | `string` | `value` | - |
145+
| optionsPropName | 目标组件接收options数据的属性名称 | `string` | `options` | - |
146+
| modelPropName | 目标组件的双向绑定属性名,默认为modelValue。部分组件可能为value | `string` | `modelValue` | - |
147+
| immediate | 是否立即调用api | `boolean` | `true` | - |
148+
| alwaysLoad | 每次`visibleEvent`事件发生时都重新请求数据 | `boolean` | `false` | - |
149+
| beforeFetch | 在api请求之前的回调函数 | `AnyPromiseFunction<any, any>` | - | - |
150+
| afterFetch | 在api请求之后的回调函数 | `AnyPromiseFunction<any, any>` | - | - |
151+
| options | 直接传入选项数据,也作为api返回空数据时的后备数据 | `OptionsItem[]` | - | - |
152+
| visibleEvent | 触发重新请求数据的事件名 | `string` | - | - |
153+
| loadingSlot | 目标组件的插槽名称,用来显示一个"加载中"的图标 | `string` | - | - |
154+
| autoSelect | 自动设置选项 | `'first' \| 'last' \| 'none'\| false` | `false` | >5.5.4 |
155155

156156
#### autoSelect 自动设置选项
157157

0 commit comments

Comments
 (0)