Skip to content

Commit

Permalink
feat: 修改选择发布界面的样式 (#380)
Browse files Browse the repository at this point in the history
* feat: 实现图鉴详情的猫咪信息部分

* feat: 修改选择发布类型界面

* feat: 修改选择发布类型界面的样式

* feat: 修改选择发布类型界面的样式
  • Loading branch information
python-No2 authored Oct 13, 2023
1 parent 653d947 commit 5b86919
Showing 1 changed file with 10 additions and 31 deletions.
41 changes: 10 additions & 31 deletions src/components/BottomBar/WhatTypeToDraft.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,17 @@
>
<view class="choices">
<view class="choice" @click="goToPage(Pages.DraftMoment)">
<view class="text"
>社区动态
<view v-if="props.current === 'community'" class="current"
>当前页</view
></view
>
<view class="text">社区动态</view>
</view>
<view class="choice" @click="goToPage(Pages.DraftPost)">
<view class="text"
>世界帖子
<view v-if="props.current === 'world'" class="current"
>当前页</view
></view
>
<view class="text">世界帖子</view>
</view>
</view>
</view>
</template>

<script setup lang="ts">
import { Pages } from "@/utils/url";
interface Props {
current: string;
}
const props = withDefaults(defineProps<Props>(), {
current: ""
});
const emits = defineEmits(["toggleShowingDraft"]);
const goToPage = (url: string) => {
uni.navigateTo({
Expand All @@ -59,32 +43,27 @@ const goToPage = (url: string) => {
display: flex;
flex-direction: column;
align-items: center;
background-color: #ffffff;
border-radius: 4vw;
.choice {
box-sizing: border-box;
width: 48vw;
height: 10vw;
width: 40vw;
height: 12vw;
background-color: #fdfdfd;
display: flex;
justify-content: center;
align-items: center;
border-radius: 1vw;
margin-top: 2vw;
border-radius: 8vw;
color: #1fa1ff;
font-weight: bold;
.text {
width: fit-content;
position: relative;
.current {
position: absolute;
right: -10vw;
top: 0.4vw;
font-size: 3vw;
color: #1fa1ff;
}
}
&:active {
background-color: #f3f9fe;
width: 45vw;
border-radius: 2vw;
width: 40vw;
border-radius: 8vw;
}
}
}
Expand Down

0 comments on commit 5b86919

Please sign in to comment.