| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <template>
- <view class="menu">
- <view class="group" v-for="(menu, index) of menus" :key="index">
- <view class="group-title">
- <text>{{menu.title}}</text>
- </view>
- <view class="sub-group" v-for="(item, subIndex) of menu.subs" :key="subIndex">
- <view class="sub-item" @click="$emit('clickSub', { path: item.path, params: { a: '1' } })">
- <text>{{item.title}}</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import menus from './menus'
- export default {
- data() {
- return {
- menus,
- }
- },
- mounted() {
- }
- }
- </script>
- <style lang="less" scoped>
- .menu {
- width: 120px;
- background: white;
- overflow-y: scroll;
- .group {
- .group-title {
- padding: 0 8px;
- line-height: 40px;
- }
- .sub-group {
- cursor: pointer;
- .sub-item {
- text-align: center;
- line-height: 32px;
- font-size: 12px;
- }
- }
- }
- }
- </style>
|