From b77cc2d2012ecb4b876538ac7aee3edac7db8a2f Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Sun, 12 Nov 2023 19:05:07 +0800
Subject: [PATCH] 通知公告
---
components/curMenu/index.vue | 43 ++++++++++++++++++++++++++++---------------
1 files changed, 28 insertions(+), 15 deletions(-)
diff --git a/components/curMenu/index.vue b/components/curMenu/index.vue
index 4867076..80c6bd1 100644
--- a/components/curMenu/index.vue
+++ b/components/curMenu/index.vue
@@ -1,12 +1,16 @@
<template>
- <view class="menu-box" @click="curMenuClick(curMenu)">
- <view>
- <u--image :src="curMenu.imgUrl" :width='curMenu.imgWidth || 54' :height='curMenu.height || 54' shape="circle"></u--image>
- </view>
- <view :style="{height: curMenu.height || '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>
@@ -17,13 +21,23 @@
default: () => {
return {}
}
- }
+ },
+
+ imgShow: {
+ type: Boolean,
+ default: true
+ },
+
+ textShow: {
+ type: Boolean,
+ default: false
+ },
},
-
+
methods: {
curMenuClick(e) {
console.log('当前点击处')
-
+
if (e.event) {
e.event(e)
}
@@ -37,16 +51,15 @@
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>
\ No newline at end of file
--
Gitblit v1.9.3