Skip to content

Commit

Permalink
fix: 尝试修复水合问题
Browse files Browse the repository at this point in the history
  • Loading branch information
camera-2018 committed Jul 22, 2023
1 parent 5c8dad5 commit c429d3d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 27 deletions.
6 changes: 3 additions & 3 deletions components/BloggerItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const goUrl = (url) => {
<img class="avatar-img" :src="member.avatar" :alt="member.name">
</figure>
<div class="data">
<h1 class="name">
<div class="author_name">
{{ member.name }}
</h1>
</div>
<p v-if="member.title || member.org" class="affiliation">
<span v-if="member.title" class="title">
{{ member.title }}
Expand Down Expand Up @@ -157,7 +157,7 @@ const goUrl = (url) => {
object-fit: cover;
}
.name {
.author_name {
margin: 0;
font-weight: 600;
cursor: pointer;
Expand Down
26 changes: 7 additions & 19 deletions components/PostItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,6 @@ const showTime = computed(() => {
return formatShowDate(props.Date)
})
// function isWrappedWithPreventDefault(element: HTMLElement) {
// let parent = element.parentElement
// while (parent) {
// if (parent.hasAttribute('preventDefault')) {
// return true
// }
// parent = parent.parentElement
// }
// return false
// }
</script>
<style scoped>
Expand Down Expand Up @@ -208,13 +196,13 @@ const showTime = computed(() => {
margin-top: 8px;
}
.badge-list .split:not(:last-child)::after {
content: '';
display: inline-block;
width: 1px;
height: 8px;
margin: 0 10px;
background-color: #4e5969;
}
content: '';
display: inline-block;
width: 1px;
height: 8px;
margin: 0 10px;
background-color: #4e5969;
}
.cover-img {
width: 120px;
height: 80px;
Expand Down
10 changes: 5 additions & 5 deletions components/PostList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ const pluginLists = computed(() => {
</div>
<div class="divider" style="margin-bottom: 1rem;" />
</div> -->
<Pagination :pageTotal="pageTotal" v-model="pageNum" style="width: 100%;" key="0" />
<Pagination :pageTotal="pageTotal" v-model="pageNum" style="width: 100%;padding: 1rem 0;" key="0" />
<div class="card-list">
<PostItem v-for="(item, index) in pluginLists" :key="index" :Title="item.Title" :Content="item.Content"
:Date="item.Date" :Author="item.Author" :tag="item?.tag" :cover="item?.cover" :PostURL="item.PostURL" :AuthorURL="item.AuthorURL"/>
</div>
<Pagination :pageTotal="pageTotal" v-model="pageNum" style="width: 100%;" key="1" />
<Pagination :pageTotal="pageTotal" v-model="pageNum" style="width: 100%;padding: 1rem 0;" key="1" />
</div>
</template>

Expand Down Expand Up @@ -131,9 +131,9 @@ const pluginLists = computed(() => {
}
.card-list {
display: grid;
/* gap: 1.5rem; */
/* grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); */
display: flex;
flex-direction: column;
gap: 2rem;
}
.card {
Expand Down

0 comments on commit c429d3d

Please sign in to comment.