Skip to content

Commit

Permalink
feat:#1 首页文章展示
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Oct 9, 2022
1 parent 2d414ac commit abaaee2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 5 additions & 2 deletions components/default/Header.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<header>
<el-page-header :icon="ArrowLeft" title="返回" @click="onBack" v-if="false">
<el-page-header :icon="ArrowLeft" title="返回" @click="onBack" v-if="$route.fullPath!='/' && isM">
<template #content>
<div class="flex items-center">
<span class="text-large font-600 mr-3"> {{ $route.fullPath }} </span>
Expand All @@ -11,7 +11,7 @@
<header-time/>
<header-menu/>

<div class="h-6" />
<div class="h-6"/>
</header>
</template>

Expand All @@ -20,11 +20,14 @@ import {ElPageHeader} from "element-plus";
import {ArrowLeft} from '@element-plus/icons-vue'
import HeaderTime from "~/components/default/HeaderTime.vue";
import HeaderMenu from "~/components/default/HeaderMenu.vue";
import {isMobile} from "~/lib/util";
const router = useRouter();
const onBack = () => {
router.go(-1)
}
const isM = isMobile()
</script>

<script lang="ts">
Expand Down
4 changes: 1 addition & 3 deletions components/default/HomePostList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@
</template>

<script lang="ts" setup>
import logUtil from "~/lib/logUtil";
import {SERVER_API_CONSTANTS} from "~/lib/constants/serverApiConstants";
import {Post} from "~/lib/common/post";
import {isMobile} from "~/lib/util";
import {ElCard, ElRow, ElCol, ElButton} from "element-plus";
import {ElButton, ElCard, ElCol, ElRow} from "element-plus";
const postData = ref({
isMobile: isMobile(),
Expand Down Expand Up @@ -115,7 +114,6 @@ export default {
margin-top: 15px;
float: left;
font-weight: bold;
color: #212121 !important;
}
.read-more:hover {
Expand Down

0 comments on commit abaaee2

Please sign in to comment.