From ed8a450409d89a448b4394300d33ebc2fd31fe0d Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 28 Oct 2023 17:27:15 +0800
Subject: [PATCH] 首页文件修改
---
components/gridMenu/index.vue | 78 ++++++++++++++++++++++++---------------
1 files changed, 48 insertions(+), 30 deletions(-)
diff --git a/components/gridMenu/index.vue b/components/gridMenu/index.vue
index e4e63e7..d8fb6c5 100644
--- a/components/gridMenu/index.vue
+++ b/components/gridMenu/index.vue
@@ -1,16 +1,22 @@
<template>
<view class="cur-container">
- <view>
- {{gridData.title}}
+ <view v-if="!gridData.useSlot">
+ <view>
+ {{gridData.title}}
+ </view>
+ <view>
+ <view class="l">
+ {{gridData.data}}
+ </view>
+ <view class="r">
+ <u-icon name="phone-fill" color="#fff"></u-icon>
+ {{gridData.phone}}
+ </view>
+ </view>
</view>
- <view>
- <view class="l">
- {{gridData.data}}
- </view>
- <view class="r">
- <u-icon name="phone-fill" color="#fff"></u-icon>
- {{gridData.phone}}
- </view>
+
+ <view class="slot-box" v-else>
+ {{gridData.title}}
</view>
</view>
</template>
@@ -33,33 +39,45 @@
<style lang="scss" scoped>
.cur-container {
- padding: 10rpx;
display: flex;
- flex-direction: column;
-
- & > view:first-child {
- height: 60%;
+
+ &>view {
+ flex: 1;
+ padding: 10rpx;
display: flex;
- align-items: center;
- justify-content: flex-start;
- }
-
- & > view:last-child {
- height: 40%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-size: 24rpx;
-
- .l {
+ flex-direction: column;
+
+ &>view:first-child {
+ height: 60%;
+ display: flex;
+ align-items: center;
justify-content: flex-start;
}
-
- .r {
+
+ &>view:last-child {
+ height: 40%;
display: flex;
- justify-content: flex-end;
+ justify-content: space-between;
align-items: center;
+ font-size: 24rpx;
+
+ .l {
+ justify-content: flex-start;
+ }
+
+ .r {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ }
}
}
+
+ .slot-box {
+ padding: 10rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3