-
Notifications
You must be signed in to change notification settings - Fork 297
/
Copy pathmenu-icon-composition-api.vue
150 lines (146 loc) · 2.78 KB
/
menu-icon-composition-api.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<template>
<div class="preview">
<tiny-nav-menu :data="menuData"></tiny-nav-menu>
</div>
</template>
<script setup lang="jsx">
import { ref } from 'vue'
import { TinyNavMenu } from '@opentiny/vue'
import { iconTotal, iconGenerating } from '@opentiny/vue-icon'
const menuData = ref([
{
title: '首页',
url: '',
id: '1',
icon: iconTotal()
},
{
title: '指南',
url: '',
id: '2',
children: [
{
title: '引入组件',
url: '',
id: '2-1',
icon: iconTotal()
},
{
title: '后端适配器',
url: '',
id: '2-2'
}
]
},
{
title: '组件',
url: '',
id: '3',
children: [
{
title: '表单组件',
url: '',
id: '3-1',
children: [
{
title: 'Datepicker 日期',
url: 'datepicker',
id: '3-1-1',
icon: iconTotal()
},
{
title: 'Cascader 级联选择器',
url: 'cascader',
id: '3-1-2',
icon: iconGenerating()
},
{
title: 'DropTimes 下拉时间',
url: 'droptimes',
id: '3-1-3'
}
]
},
{
title: '数据展示',
url: '',
id: '3-2',
children: [
{
title: 'Card 卡片',
url: 'card',
id: '3-2-1'
},
{
title: 'Collapse 折叠面板',
url: 'collapse',
id: '3-2-2'
},
{
title: 'Guide 引导',
url: 'guide',
id: '3-2-3'
}
]
},
{
title: '导航组件',
url: '',
id: '3-3',
children: [
{
title: 'ToggleMenu 收缩菜单',
url: 'toggleMenu',
id: '3-3-1'
},
{
title: 'TreeMenu 树型菜单',
url: 'treemenu',
id: '3-3-2'
},
{
title: 'Breadcrumb 面包屑',
url: 'breadcrumb',
id: '3-3-3'
}
]
},
{
title: '业务组件',
url: '',
id: '3-4',
children: [
{
title: 'Amount 金额',
url: 'amount',
id: '3-4-1'
},
{
title: 'Area 片区',
url: 'area',
id: '3-4-2'
},
{
title: 'Company 公司',
url: 'company',
id: '3-4-3'
}
]
}
]
},
{
title: '其他',
url: 'crop',
id: '4'
}
])
</script>
<style scoped>
.preview {
min-height: 450px;
}
.preview .tiny-nav-menu a:hover {
text-decoration: none;
}
</style>