docs: ✏️ 修正 drop-menu-item options 默认数据结构注释 (#1087)

This commit is contained in:
Gerald Wang 2025-08-24 17:40:53 +08:00 committed by GitHub
parent 2e67adf2ba
commit 7a2cd2da93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -198,7 +198,7 @@ const handleBeforeToggle: DropMenuItemBeforeToggle = ({ status, resolve }) => {
| ------------- | ---------------------------------------------------------------------- | ----------------------------- | ------ | ---------- | -------- |
| v-model | 当前选中项对应选中的 value | string / number | - | - | - |
| disabled | 禁用菜单 | boolean | - | false | - |
| options | 列表数据,对应数据结构 `[{text: '标题', value: '0', tip: '提示文字'}]` | array | - | - | - |
| options | 列表数据,对应数据结构 `[{label: '标题', value: '0', tip: '提示文字'}]` | array | - | - | - |
| icon-name | 选中的图标名称(可选名称在 wd-icon 组件中) | string | - | check | - |
| title | 菜单标题 | string | - | - | - |
| icon | 菜单图标 | string | - | arrow-down | - |

View File

@ -25,7 +25,7 @@ export const dorpMenuItemProps = {
*/
modelValue: [String, Number],
/**
* [{text: '标题', value: '0', tip: '提示文字'}]
* [{label: '标题', value: '0', tip: '提示文字'}]
*/
options: makeArrayProp<Record<string, any>>(),
/**

View File

@ -1,7 +1,7 @@
import { type ExtractPropTypes, type InjectionKey, type Ref } from 'vue'
import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props'
export type DropDirction = 'up' | 'down'
export type DropDirection = 'up' | 'down'
export type DropMenuProvide = {
props: Partial<DropMenuProps>
@ -20,7 +20,7 @@ export const dropMenuProps = {
/**
* up down
*/
direction: makeStringProp<DropDirction>('down'),
direction: makeStringProp<DropDirection>('down'),
/**
*
*/