Skip to content

Commit d7683c1

Browse files
update menu
1 parent 3c39d76 commit d7683c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+73067
-4214
lines changed

components/components.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ export { List, ListItem } from './list'
103103
export type { Props as LoadingBarProps } from './loadingbar'
104104
export { default as LoadingBar } from './loadingbar'
105105

106-
export type { Props as MenuProps, Item as MenuItem } from './menu'
107-
export { default as Menu } from './menu'
106+
export type { MenuProps, MenuItemProps } from './menu'
107+
export { Menu, MenuItem } from './menu'
108108

109109
export type { Props as MessageProps, Message as MessageOptions } from './message'
110110
export { default as Message } from './message'

components/menu/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import Menu from './Menu.vue'
2-
export type { Props, Item } from './Menu.vue'
3-
import { withInstall } from '../utils/type'
1+
import Menu from './menu'
2+
import MenuItem from './menuitem'
43

5-
export default withInstall(Menu)
4+
export type { MenuProps } from './menu'
5+
export type { MenuItemProps } from './menuitem'
6+
7+
export { Menu, MenuItem }
File renamed without changes.

components/menu/menu/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Menu from './Menu.vue'
2+
export type { Props as MenuProps } from './Menu.vue'
3+
import { withInstall } from '../../utils/type'
4+
5+
export default withInstall(Menu)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<script setup lang="ts">
2+
import type { CSSProperties } from 'vue'
3+
export interface Props {
4+
label?: string // 内容的描述标签 string | slot
5+
span?: number // 包含列的数量;当使用水平列表且未设置 span 时等效于 span: 1,但最后一行的最后一项,会包含该行剩余的所有列数
6+
labelStyle?: CSSProperties // 自定义标签样式,优先级高于 Description 的 labelStyle
7+
contentStyle?: CSSProperties // 自定义内容样式,优先级高于 Description 的 contentStyle
8+
}
9+
withDefaults(defineProps<Props>(), {
10+
label: undefined,
11+
span: undefined,
12+
labelStyle: () => ({}),
13+
contentStyle: () => ({})
14+
})
15+
</script>
16+
<template>
17+
<div class="descriptions-item" :data-span="span">
18+
</div>
19+
</template>
20+
<style lang="less" scoped>
21+
</style>

components/menu/menuitem/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import MenuItem from './MenuItem.vue'
2+
export type { Props as MenuItemProps } from './MenuItem.vue'
3+
import { withInstall } from '../../utils/type'
4+
5+
export default withInstall(MenuItem)

0 commit comments

Comments
 (0)