| | |
| | | <template> |
| | | <view class="menu-box" @click="curMenuClick(curMenu)"> |
| | | <view v-if="imgShow"> |
| | | <u--image :src="curMenu.imgUrl" :width='curMenu.imgWidth || 54' :height='curMenu.imgHeight || 54' shape="circle"></u--image> |
| | | </view> |
| | | <view v-if="textShow" :style="{height: curMenu.numHeight ? curMenu.numHeight + 'px' : '56rpx'}"> |
| | | {{curMenu.num}} |
| | | </view> |
| | | <view :style="{height: curMenu.titleHeight ? curMenu.titleHeight + 'px' : '56rpx'}"> |
| | | {{curMenu.title}} |
| | | </view> |
| | | <view class="menu-box" @click="curMenuClick(curMenu)"> |
| | | <view v-if="imgShow"> |
| | | <u--image :src="curMenu.imgUrl" :width='curMenu.imgWidth || 40' :height='curMenu.imgHeight || 40' |
| | | shape="circle"></u--image> |
| | | </view> |
| | | <view v-if="textShow" :style="{height: curMenu.numHeight ? curMenu.numHeight + 'px' : '56rpx'}"> |
| | | {{curMenu.num}} |
| | | </view> |
| | | <view :style="{height: curMenu.titleHeight ? curMenu.titleHeight + 'px' : '56rpx'}"> |
| | | {{curMenu.title}} |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | return {} |
| | | } |
| | | }, |
| | | |
| | | |
| | | imgShow: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | |
| | | |
| | | textShow: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | curMenuClick(e) { |
| | | console.log('当前点击处') |
| | | |
| | | |
| | | if (e.event) { |
| | | e.event(e) |
| | | } |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | font-size: 28rpx; |
| | | |
| | | & > view { |
| | | |
| | | &>view { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | & > view:first-child { |
| | | |
| | | &>view:first-child { |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | </style> |