|
| 1 | +<template> |
| 2 | + <div class="container"> |
| 3 | + <div class="treeMenu"> |
| 4 | + <tiny-tree-menu :data="treeData" default-expand-all></tiny-tree-menu> |
| 5 | + </div> |
| 6 | + <div class="index"> |
| 7 | + <NuxtPage></NuxtPage> |
| 8 | + </div> |
| 9 | + </div> |
| 10 | +</template> |
| 11 | + |
| 12 | +<script setup> |
| 13 | +import { ref } from 'vue' |
| 14 | +import { TreeMenu as TinyTreeMenu } from '@opentiny/vue' |
| 15 | +
|
| 16 | +const treeData = ref([ |
| 17 | + { |
| 18 | + id: 100, |
| 19 | + label: '基础', |
| 20 | + children: [ |
| 21 | + { id: 101, label: 'Button 按钮', url: '/Button' }, |
| 22 | + { id: 102, label: 'ButtonGroup 按钮组', url: 'ButtonGroup' }, |
| 23 | + { id: 103, label: 'Color 色彩', url: 'Color' }, |
| 24 | + { id: 104, label: 'Container 容器布局', url: 'Container' }, |
| 25 | + { id: 105, label: 'Font 字体', url: 'Font' }, |
| 26 | + { id: 106, label: 'Icon 图标', url: 'Icon' }, |
| 27 | + { id: 107, label: 'Layout 栅格布局', url: 'Layout' }, |
| 28 | + { id: 108, label: 'Link 链接', url: 'Link' }, |
| 29 | + { id: 109, label: 'Divider 分割线', url: 'Divider' } |
| 30 | + ] |
| 31 | + }, |
| 32 | + { |
| 33 | + id: 200, |
| 34 | + label: '导航', |
| 35 | + children: [ |
| 36 | + { id: 201, label: 'ActionMenu 动作菜单', url: 'ActionMenu' }, |
| 37 | + { id: 202, label: 'Anchor 锚点', url: 'Anchor' }, |
| 38 | + { id: 203, label: 'Breadcrumb 面包屑', url: 'Breadcrumb' }, |
| 39 | + { id: 204, label: 'Dropdown 下拉菜单', url: 'Dropdown' }, |
| 40 | + { id: 205, label: 'FallMenu 瀑布菜单', url: 'FallMenu' }, |
| 41 | + { id: 206, label: 'LinkMenu 收藏夹菜单', url: 'LinkMenu' }, |
| 42 | + { id: 207, label: 'NavMenu 导航菜单', url: 'NavMenu' }, |
| 43 | + { id: 208, label: 'Pager 分页', url: 'Pager' }, |
| 44 | + { id: 209, label: 'Steps 步骤条', url: 'Steps' }, |
| 45 | + { id: 210, label: 'ToggleMenu 收缩菜单', url: 'ToggleMenu' }, |
| 46 | + { id: 211, label: 'TreeMenu 树形菜单', url: 'TreeMenu' } |
| 47 | + ] |
| 48 | + }, |
| 49 | + { |
| 50 | + id: 300, |
| 51 | + label: '表单', |
| 52 | + children: [ |
| 53 | + { id: 301, label: 'AutoComplete 自动完成', url: 'AutoComplete' }, |
| 54 | + { id: 302, label: 'Cascader 级联选择器', url: 'Cascader' }, |
| 55 | + { id: 303, label: 'CascaderPanel 级联面板', url: 'CascaderPanel' }, |
| 56 | + { id: 304, label: 'Checkbox 多选框', url: 'Checkbox' }, |
| 57 | + { id: 305, label: 'ColorPicker 颜色选择器', url: 'ColorPicker' }, |
| 58 | + { id: 306, label: 'ColorSelectPanel 颜色选择面板', url: 'ColorSelectPanel' }, |
| 59 | + { id: 307, label: 'DatePicker 日期选择器', url: 'DatePicker' }, |
| 60 | + { id: 308, label: 'DropTimes 下拉时间', url: 'DropTimes' }, |
| 61 | + { id: 309, label: 'Form 表单', url: 'Form' }, |
| 62 | + { id: 310, label: 'Input 输入框', url: 'Input' }, |
| 63 | + { id: 311, label: 'IpAddress 树形菜单', url: 'IpAddress' }, |
| 64 | + { id: 312, label: 'Numeric 数字输入框', url: 'Numeric' }, |
| 65 | + { id: 313, label: 'PopEditor 弹出编辑', url: 'PopEditor' }, |
| 66 | + { id: 314, label: 'PopUpload 弹出上传', url: 'PopUpload' }, |
| 67 | + { id: 315, label: 'Radio 单选框', url: 'Radio' }, |
| 68 | + { id: 316, label: 'Rate 评分', url: 'Rate' }, |
| 69 | + { id: 317, label: 'Search 搜索', url: 'Search' }, |
| 70 | + { id: 318, label: 'Select 选择器', url: 'Select' }, |
| 71 | + { id: 319, label: 'Slider 滑块', url: 'Slider' }, |
| 72 | + { id: 320, label: 'Switch 开关', url: 'Switch' }, |
| 73 | + { id: 321, label: 'TimePicker 时间选择器', url: 'TimePicker' }, |
| 74 | + { id: 322, label: 'TimeSelect 时间选择', url: 'TimeSelect' }, |
| 75 | + { id: 323, label: 'Transfer 穿梭框', url: 'Transfer' } |
| 76 | + ] |
| 77 | + }, |
| 78 | + { |
| 79 | + id: 400, |
| 80 | + label: '表格', |
| 81 | + children: [ |
| 82 | + { id: 401, label: '基本用法', url: 'GridBase' }, |
| 83 | + { id: 402, label: '序号列', url: 'GridSerialColumn' }, |
| 84 | + { id: 403, label: '操作列', url: 'GridOperationColumn' }, |
| 85 | + { id: 404, label: '空数据', url: 'GridEmpty' }, |
| 86 | + { id: 405, label: '数据源', url: 'GridDataSource' }, |
| 87 | + { id: 406, label: '大数据', url: 'GridLargeData' }, |
| 88 | + { id: 407, label: '分页', url: 'GridPager' }, |
| 89 | + { id: 408, label: '编辑', url: 'GridEdit' }, |
| 90 | + { id: 409, label: '工具栏', url: 'GridToolbar' }, |
| 91 | + { id: 410, label: '加载中', url: 'GridLoading' }, |
| 92 | + { id: 411, label: '宽高尺寸', url: 'GridSize' }, |
| 93 | + { id: 412, label: '外观设置', url: 'GridAppearanceSettings' }, |
| 94 | + { id: 413, label: '高亮', url: 'GridHighlight' }, |
| 95 | + { id: 414, label: '提示', url: 'GridTip' }, |
| 96 | + { id: 415, label: '对齐方式', url: 'GridAlign' }, |
| 97 | + { id: 416, label: '表头', url: 'GridHeader' }, |
| 98 | + { id: 417, label: '表尾', url: 'GridFooter' }, |
| 99 | + { id: 418, label: '自定义样式', url: 'GridCustomStyle' }, |
| 100 | + { id: 419, label: '排序', url: 'GridSort' }, |
| 101 | + { id: 420, label: '筛选', url: 'GridFilter' }, |
| 102 | + { id: 421, label: '冻结', url: 'GridFixed' }, |
| 103 | + { id: 422, label: '合并', url: 'GridSpan' }, |
| 104 | + { id: 423, label: '拖拽', url: 'GridDrag' }, |
| 105 | + { id: 424, label: '右键菜单', url: 'GridContextMenu' }, |
| 106 | + { id: 425, label: '编辑器', url: 'GridEditor' }, |
| 107 | + { id: 426, label: '表格校验', url: 'GridValidation' }, |
| 108 | + { id: 427, label: '事件', url: 'GridEvent' }, |
| 109 | + { id: 428, label: '插槽', url: 'GridSlot' }, |
| 110 | + { id: 429, label: '个性化', url: 'GridCustom' }, |
| 111 | + { id: 430, label: '树表', url: 'GridTreeTable' }, |
| 112 | + { id: 431, label: '展开行', url: 'GridExpand' }, |
| 113 | + { id: 432, label: '导入导出', url: 'GridIO' }, |
| 114 | + { id: 433, label: '鼠标和键盘配置', url: 'GridMouseKeyboard' } |
| 115 | + ] |
| 116 | + }, |
| 117 | + { |
| 118 | + id: 500, |
| 119 | + label: '数据展示', |
| 120 | + children: [ |
| 121 | + { id: 501, label: 'Badge 标记', url: 'Badge' }, |
| 122 | + { id: 502, label: 'Calendar 日历', url: 'Calendar' }, |
| 123 | + { id: 503, label: 'CalendarView 日历视图', url: 'CalendarView' }, |
| 124 | + { id: 504, label: 'Carousel 走马灯', url: 'Carousel' }, |
| 125 | + { id: 505, label: 'Collapse 折叠面板', url: 'Collapse' }, |
| 126 | + { id: 506, label: 'FlowChart 流程图', url: 'FlowChart' }, |
| 127 | + { id: 507, label: 'Guide 引导', url: 'Guide' }, |
| 128 | + { id: 508, label: 'Image 图片', url: 'Image' }, |
| 129 | + { id: 509, label: 'InfiniteScroll 无限滚动', url: 'InfiniteScroll' }, |
| 130 | + { id: 510, label: 'Milestone 里程碑', url: 'Milestone' }, |
| 131 | + { id: 511, label: 'QrCode 二维码', url: 'QrCode' }, |
| 132 | + { id: 512, label: 'Statistic 统计数值', url: 'Statistic' }, |
| 133 | + { id: 513, label: 'Tag 标签', url: 'Tag' }, |
| 134 | + { id: 514, label: 'TagGroup 标签组', url: 'TagGroup' }, |
| 135 | + { id: 515, label: 'Timeline 时间线', url: 'Timeline' }, |
| 136 | + { id: 516, label: 'Tree 树形控件', url: 'Tree' }, |
| 137 | + { id: 517, label: 'Wizard 流程图', url: 'Wizard' } |
| 138 | + ] |
| 139 | + }, |
| 140 | + { |
| 141 | + id: 600, |
| 142 | + label: '反馈', |
| 143 | + children: [ |
| 144 | + { id: 601, label: 'Alert 警告', url: 'Alert' }, |
| 145 | + { id: 602, label: 'DialogBox 对话框', url: 'DialogBox' }, |
| 146 | + { id: 603, label: 'Drawer 抽屉', url: 'Drawer' }, |
| 147 | + { id: 604, label: 'Loading 加载', url: 'Loading' }, |
| 148 | + { id: 605, label: 'Modal 模态框', url: 'Modal' }, |
| 149 | + { id: 606, label: 'Notify 通知', url: 'Notify' }, |
| 150 | + { id: 607, label: 'PopConfirm 气泡确认框', url: 'PopConfirm' }, |
| 151 | + { id: 608, label: 'Progress 进度条', url: 'Progress' }, |
| 152 | + { id: 609, label: 'Popover 气泡卡片', url: 'Popover' }, |
| 153 | + { id: 610, label: 'Skeleton 骨架屏', url: 'Skeleton' }, |
| 154 | + { id: 611, label: 'Tooltip 文字提示', url: 'Tooltip' } |
| 155 | + ] |
| 156 | + }, |
| 157 | + { |
| 158 | + id: 700, |
| 159 | + label: '图表', |
| 160 | + children: [ |
| 161 | + { id: 701, label: 'LineChart 折线图', url: 'LineChart' }, |
| 162 | + { id: 702, label: 'BarChart 对话框', url: 'BarChart' }, |
| 163 | + { id: 703, label: 'PieChart 饼图', url: 'PieChart' }, |
| 164 | + { id: 704, label: 'RingChart 环图', url: 'RingChart' }, |
| 165 | + { id: 705, label: 'WaterfallChart 瀑布图', url: 'WaterfallChart' }, |
| 166 | + { id: 706, label: 'RadarChart 雷达图', url: 'RadarChart' }, |
| 167 | + { id: 707, label: 'TreeChart 树图', url: 'TreeChart' }, |
| 168 | + { id: 708, label: 'ProcessChart 进度图', url: 'ProcessChart' } |
| 169 | + ] |
| 170 | + }, |
| 171 | + { |
| 172 | + id: 800, |
| 173 | + label: '其他', |
| 174 | + children: [ |
| 175 | + { id: 801, label: 'Crop 图片裁剪', url: 'Crop' }, |
| 176 | + { id: 802, label: 'DialogSelect 弹窗选择', url: 'DialogSelect' }, |
| 177 | + { id: 803, label: 'FilterPanel 过滤器面板', url: 'FilterPanel' }, |
| 178 | + { id: 804, label: 'Fullscreen 全屏', url: 'Fullscreen' }, |
| 179 | + { id: 805, label: 'ScrollText 文字滚动', url: 'ScrollText' }, |
| 180 | + { id: 806, label: 'Split 面板分割', url: 'Split' }, |
| 181 | + { id: 807, label: 'TextPopup 输入框', url: 'TextPopup' }, |
| 182 | + { id: 808, label: 'Watermark 水印', url: 'Watermark' } |
| 183 | + ] |
| 184 | + } |
| 185 | +]) |
| 186 | +</script> |
| 187 | + |
| 188 | +<style> |
| 189 | +.container { |
| 190 | + display: flex; |
| 191 | + height: 100vh; |
| 192 | +} |
| 193 | +.treeMenu { |
| 194 | + height: 100vh; |
| 195 | + position: fixed; |
| 196 | + left: 0; |
| 197 | + top: 0; |
| 198 | + overflow-y: auto; |
| 199 | +} |
| 200 | +.index { |
| 201 | + flex: 2; |
| 202 | + display: flex; |
| 203 | + align-items: center; |
| 204 | + justify-content: center; |
| 205 | + overflow-x: auto; |
| 206 | +} |
| 207 | +</style> |
0 commit comments