-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/tag' of https://github.com/Hazi7/weilai.team into dev
- Loading branch information
Showing
10 changed files
with
184 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<script setup lang="ts"> | ||
import TagRightBar from '@/features/community/components/tag/TagRightBar.vue'; | ||
import TagSuggest from '@/features/community/components/tag/TagSuggest.vue'; | ||
import NewsContent from '@/features/community/components/NewsContent.vue'; | ||
import CommunityTag from '@/features/community/composables/CommunityTag'; | ||
import { ref, watch } from 'vue'; | ||
import { useRoute } from "vue-router"; | ||
const route = useRoute(); | ||
const { tagPostList, getPostList } = CommunityTag(); | ||
const props = defineProps({ | ||
tag: { | ||
type: String, | ||
default: 0, | ||
}, | ||
}); | ||
const tag = ref(''); | ||
function getTag() { | ||
console.log(props.tag); | ||
// if ("tag" in route.params) { | ||
// tag.value = route.params.tag as string; | ||
// } else { | ||
// tag.value = ""; | ||
// } | ||
getPostList(props.tag); | ||
} | ||
getTag(); | ||
watch( | ||
props, | ||
(newVal) => { | ||
getTag() | ||
} | ||
); | ||
</script> | ||
|
||
<template> | ||
<div class="tag-container"> | ||
<!-- <div>标签</div> --> | ||
<!-- <tag-word-cloud></tag-word-cloud> --> | ||
<div class="all-article"> | ||
<NewsContent :tagPostList="tagPostList" /> | ||
</div> | ||
<div class="right-bar"> | ||
<tag-suggest style="margin: 0 0 30px 0;"></tag-suggest> | ||
<!-- <HotTag style="width: 350px;"></HotTag> --> | ||
<tag-right-bar style=""></tag-right-bar> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped lang="scss"> | ||
.tag-container { | ||
margin-top: 100px; | ||
display: flex; | ||
.all-article { | ||
width: calc(100% - 350px); | ||
} | ||
.right-bar { | ||
width: 330px; | ||
margin-left: 20px; | ||
} | ||
@media screen and (max-width: 1200px) { | ||
// .right-bar { | ||
// display: none; | ||
// } | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export interface Data { | ||
data: ArticleInfo; | ||
code: Number | ||
} | ||
export interface AdminData { | ||
data: AdminPostInfo; | ||
|