fix: 尝试修复水合问题

This commit is contained in:
camera-2018
2023-07-22 14:58:47 +08:00
parent 5c8dad5e81
commit c429d3dd5f
3 changed files with 15 additions and 27 deletions

View File

@@ -18,9 +18,9 @@ const goUrl = (url) => {
<img class="avatar-img" :src="member.avatar" :alt="member.name"> <img class="avatar-img" :src="member.avatar" :alt="member.name">
</figure> </figure>
<div class="data"> <div class="data">
<h1 class="name"> <div class="author_name">
{{ member.name }} {{ member.name }}
</h1> </div>
<p v-if="member.title || member.org" class="affiliation"> <p v-if="member.title || member.org" class="affiliation">
<span v-if="member.title" class="title"> <span v-if="member.title" class="title">
{{ member.title }} {{ member.title }}
@@ -157,7 +157,7 @@ const goUrl = (url) => {
object-fit: cover; object-fit: cover;
} }
.name { .author_name {
margin: 0; margin: 0;
font-weight: 600; font-weight: 600;
cursor: pointer; cursor: pointer;

View File

@@ -111,18 +111,6 @@ const showTime = computed(() => {
return formatShowDate(props.Date) 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> </script>
<style scoped> <style scoped>
@@ -214,7 +202,7 @@ const showTime = computed(() => {
height: 8px; height: 8px;
margin: 0 10px; margin: 0 10px;
background-color: #4e5969; background-color: #4e5969;
} }
.cover-img { .cover-img {
width: 120px; width: 120px;
height: 80px; height: 80px;

View File

@@ -59,12 +59,12 @@ const pluginLists = computed(() => {
</div> </div>
<div class="divider" style="margin-bottom: 1rem;" /> <div class="divider" style="margin-bottom: 1rem;" />
</div> --> </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"> <div class="card-list">
<PostItem v-for="(item, index) in pluginLists" :key="index" :Title="item.Title" :Content="item.Content" <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"/> :Date="item.Date" :Author="item.Author" :tag="item?.tag" :cover="item?.cover" :PostURL="item.PostURL" :AuthorURL="item.AuthorURL"/>
</div> </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> </div>
</template> </template>
@@ -131,9 +131,9 @@ const pluginLists = computed(() => {
} }
.card-list { .card-list {
display: grid; display: flex;
/* gap: 1.5rem; */ flex-direction: column;
/* grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); */ gap: 2rem;
} }
.card { .card {