mirror of https://github.com/rocboss/paopao-ce
parent
33631a9806
commit
b2a66c3788
@ -1,100 +1,99 @@
|
||||
:root {
|
||||
// 如果要变更中间栏的大小,修改此处即可
|
||||
--content-main: 500px;
|
||||
// 如果要变更中间栏的大小,修改此处即可
|
||||
--content-main: 500px;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
margin: 0;
|
||||
margin: 0;
|
||||
|
||||
.app-wrap {
|
||||
width: 100%;
|
||||
// max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.app-wrap {
|
||||
width: 100%;
|
||||
// max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.main-wrap {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
|
||||
.content-wrap {
|
||||
width: 100%;
|
||||
max-width: var(--content-main);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main-content-wrap {
|
||||
margin: 0;
|
||||
border-top: none;
|
||||
border-radius: 0;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
|
||||
.content-wrap {
|
||||
width: 100%;
|
||||
max-width: var(--content-main);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main-content-wrap {
|
||||
margin: 0;
|
||||
border-top: none;
|
||||
border-radius: 0;
|
||||
|
||||
.n-list-item {
|
||||
padding: 0;
|
||||
}
|
||||
.n-list-item {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty-wrap {
|
||||
min-height: 300px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 300px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.hash-link,
|
||||
.user-link {
|
||||
color: #18a058;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
color: #18a058;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.beian-link {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.75;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.75;
|
||||
}
|
||||
}
|
||||
|
||||
.username-link {
|
||||
color: #000;
|
||||
color: none;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
color: #000;
|
||||
color: none;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.dark {
|
||||
|
||||
.hash-link,
|
||||
.user-link {
|
||||
color: #63e2b7;
|
||||
}
|
||||
|
||||
.username-link {
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.beian-link {
|
||||
color: #ddd;
|
||||
}
|
||||
.hash-link,
|
||||
.user-link {
|
||||
color: #63e2b7;
|
||||
}
|
||||
|
||||
.username-link {
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.beian-link {
|
||||
color: #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 821px) {
|
||||
.content-wrap {
|
||||
top: 0;
|
||||
left: 60px;
|
||||
position: absolute !important;
|
||||
width: calc(100% - 60px) !important;
|
||||
}
|
||||
}
|
||||
.content-wrap {
|
||||
top: 0;
|
||||
left: 60px;
|
||||
position: absolute !important;
|
||||
width: calc(100% - 60px) !important;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,27 +1,30 @@
|
||||
<template>
|
||||
<div class="skeleton-item" v-for="i in new Array(num)" :key="i">
|
||||
<div class="content">
|
||||
<n-skeleton text :repeat="2" />
|
||||
<n-skeleton text style="width: 60%" />
|
||||
</div>
|
||||
<div v-for="i in new Array(num)" :key="i" class="skeleton-item">
|
||||
<div class="content">
|
||||
<n-skeleton text :repeat="2" />
|
||||
<n-skeleton text style="width: 60%" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const props = withDefaults(defineProps<{
|
||||
num: number
|
||||
}>(), {
|
||||
num: 1
|
||||
});
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
num: number;
|
||||
}>(),
|
||||
{
|
||||
num: 1,
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.skeleton-item {
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,280 +1,283 @@
|
||||
<template>
|
||||
<div class="images-wrap">
|
||||
<n-image-group v-if="[1].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="2">
|
||||
<template v-for="img in props.imgs" :key="img.id">
|
||||
<n-gi>
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x1"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
<div class="images-wrap">
|
||||
<n-image-group v-if="[1].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="2">
|
||||
<template v-for="img in props.imgs" :key="img.id">
|
||||
<n-gi>
|
||||
<n-image
|
||||
class="post-img x1"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
|
||||
<n-image-group v-if="[2, 3].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3">
|
||||
<template v-for="img in props.imgs" :key="img.id">
|
||||
<n-gi>
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
<n-image-group v-if="[2, 3].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3">
|
||||
<template v-for="img in props.imgs" :key="img.id">
|
||||
<n-gi>
|
||||
<n-image
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
|
||||
<n-image-group v-if="[4].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="4">
|
||||
<template v-for="img in props.imgs" :key="img.id">
|
||||
<n-gi>
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x3"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
<n-image-group v-if="[4].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="4">
|
||||
<template v-for="img in props.imgs" :key="img.id">
|
||||
<n-gi>
|
||||
<n-image
|
||||
class="post-img x3"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
|
||||
<n-image-group v-if="[5].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3">
|
||||
<template v-for="(img, idx) in props.imgs" :key="img.id">
|
||||
<n-gi v-if="idx < 3">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="2" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs" :key="img.id">
|
||||
<n-gi v-if="idx >= 3">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x1"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
<n-image-group v-if="[5].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3">
|
||||
<template v-for="(img, idx) in props.imgs" :key="img.id">
|
||||
<n-gi v-if="idx < 3">
|
||||
<n-image
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="2" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs" :key="img.id">
|
||||
<n-gi v-if="idx >= 3">
|
||||
<n-image
|
||||
class="post-img x1"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
|
||||
<n-image-group v-if="[6].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3">
|
||||
<template v-for="(img, idx) in props.imgs" :key="img.id">
|
||||
<n-gi v-if="idx < 3">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs" :key="img.id">
|
||||
<n-gi v-if="idx >= 3">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
<n-image-group v-if="[6].includes(props.imgs.length)">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3">
|
||||
<template v-for="(img, idx) in props.imgs" :key="img.id">
|
||||
<n-gi v-if="idx < 3">
|
||||
<n-image
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs" :key="img.id">
|
||||
<n-gi v-if="idx >= 3">
|
||||
<n-image
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
|
||||
<n-image-group v-if="props.imgs.length === 7">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="4">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi :key="img.id" v-if="idx < 4">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x3"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi :key="img.id" v-if="idx >= 4">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
<n-image-group v-if="props.imgs.length === 7">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="4">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi v-if="idx < 4" :key="img.id">
|
||||
<n-image
|
||||
class="post-img x3"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi v-if="idx >= 4" :key="img.id">
|
||||
<n-image
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
|
||||
<n-image-group v-if="props.imgs.length === 8">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="4">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi :key="img.id" v-if="idx < 4">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x3"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="4" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi :key="img.id" v-if="idx >= 4">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x3"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
<n-image-group v-if="props.imgs.length === 8">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="4">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi v-if="idx < 4" :key="img.id">
|
||||
<n-image
|
||||
class="post-img x3"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="4" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi v-if="idx >= 4" :key="img.id">
|
||||
<n-image
|
||||
class="post-img x3"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
|
||||
<n-image-group v-if="props.imgs.length === 9">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi :key="img.id" v-if="idx < 3">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi :key="img.id" v-if="idx >= 3 && idx < 6">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi :key="img.id" v-if="idx >= 6">
|
||||
<n-image
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
</div>
|
||||
<n-image-group v-if="props.imgs.length === 9">
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi v-if="idx < 3" :key="img.id">
|
||||
<n-image
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi v-if="idx >= 3 && idx < 6" :key="img.id">
|
||||
<n-image
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
<n-grid :x-gap="4" :y-gap="4" :cols="3" style="margin-top: 4px">
|
||||
<template v-for="(img, idx) in props.imgs">
|
||||
<n-gi v-if="idx >= 6" :key="img.id">
|
||||
<n-image
|
||||
class="post-img x2"
|
||||
object-fit="cover"
|
||||
:src="img.content + thumbnail"
|
||||
:preview-src="img.content"
|
||||
@error="() => (img.content = defaultImg)"
|
||||
@click.stop
|
||||
/>
|
||||
</n-gi>
|
||||
</template>
|
||||
</n-grid>
|
||||
</n-image-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
const defaultImg =
|
||||
'https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png';
|
||||
'https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png';
|
||||
const thumbnail =
|
||||
'?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png';
|
||||
const props = withDefaults(defineProps<{
|
||||
imgs: Item.PostItemProps[],
|
||||
}>(), {
|
||||
imgs: () => []
|
||||
});
|
||||
'?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png';
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
imgs: Item.PostItemProps[];
|
||||
}>(),
|
||||
{
|
||||
imgs: () => [],
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.images-wrap {
|
||||
margin-top: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.post-img {
|
||||
display: flex;
|
||||
margin: 0;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid #eee;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
display: flex;
|
||||
margin: 0;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
border: 1px solid #eee;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.x1 {
|
||||
height: 140px;
|
||||
height: 140px;
|
||||
}
|
||||
.x2 {
|
||||
height: 90px;
|
||||
height: 90px;
|
||||
}
|
||||
.x3 {
|
||||
height: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
.dark {
|
||||
.post-img {
|
||||
border: 1px solid #333;
|
||||
}
|
||||
.post-img {
|
||||
border: 1px solid #333;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 821px) {
|
||||
.x1 {
|
||||
height: 100px;
|
||||
}
|
||||
.x2 {
|
||||
height: 70px;
|
||||
}
|
||||
.x3 {
|
||||
height: 50px;
|
||||
}
|
||||
.x1 {
|
||||
height: 100px;
|
||||
}
|
||||
.x2 {
|
||||
height: 70px;
|
||||
}
|
||||
.x3 {
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,40 +1,38 @@
|
||||
<template>
|
||||
<div class="link-wrap">
|
||||
<div class="link-item" v-for="link in props.links" :key="link.id">
|
||||
<n-icon class="hash-link"><link-outline /></n-icon>
|
||||
<a
|
||||
:href="link.content"
|
||||
class="hash-link"
|
||||
target="_blank"
|
||||
@click.stop
|
||||
>
|
||||
<span class="link-txt">{{ link.content }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="link-wrap">
|
||||
<div v-for="link in props.links" :key="link.id" class="link-item">
|
||||
<n-icon class="hash-link"><link-outline /></n-icon>
|
||||
<a :href="link.content" class="hash-link" target="_blank" @click.stop>
|
||||
<span class="link-txt">{{ link.content }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { LinkOutline } from '@vicons/ionicons5';
|
||||
const props = withDefaults(defineProps<{
|
||||
links: Item.PostItemProps[]
|
||||
}>(), {
|
||||
links: () => []
|
||||
});
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
links: Item.PostItemProps[];
|
||||
}>(),
|
||||
{
|
||||
links: () => [],
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.link-wrap {
|
||||
margin-bottom: 10px;
|
||||
.link-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.hash-link {
|
||||
.link-txt {
|
||||
margin-left: 4px;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
margin-bottom: 10px;
|
||||
.link-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.hash-link {
|
||||
.link-txt {
|
||||
margin-left: 4px;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,34 +1,37 @@
|
||||
<template>
|
||||
<div class="skeleton-item" v-for="i in new Array(num)" :key="i">
|
||||
<div class="user">
|
||||
<n-skeleton circle size="small" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<n-skeleton text :repeat="3" />
|
||||
<n-skeleton text style="width: 60%" />
|
||||
</div>
|
||||
<div v-for="i in new Array(num)" :key="i" class="skeleton-item">
|
||||
<div class="user">
|
||||
<n-skeleton circle size="small" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<n-skeleton text :repeat="3" />
|
||||
<n-skeleton text style="width: 60%" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const props = withDefaults(defineProps<{
|
||||
num: number,
|
||||
}>(), {
|
||||
num: 1
|
||||
});
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
num: number;
|
||||
}>(),
|
||||
{
|
||||
num: 1,
|
||||
},
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.skeleton-item {
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
|
||||
.user {
|
||||
width: 42px;
|
||||
}
|
||||
.user {
|
||||
width: 42px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: calc(100% - 42px);
|
||||
}
|
||||
.content {
|
||||
width: calc(100% - 42px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,188 +1,182 @@
|
||||
declare module NetParams {
|
||||
|
||||
interface AuthUserLogin {
|
||||
/** 用户名 */
|
||||
username: string,
|
||||
/** 密码 */
|
||||
password: string
|
||||
}
|
||||
|
||||
interface AuthUserRegister {
|
||||
/** 用户名 */
|
||||
username: string,
|
||||
/** 密码 */
|
||||
password: string
|
||||
}
|
||||
|
||||
type AuthUserInfo = string
|
||||
|
||||
interface AuthUpdateUserPassword {
|
||||
/** 新密码 */
|
||||
password: string,
|
||||
/** 旧密码 */
|
||||
old_password: string
|
||||
}
|
||||
|
||||
interface UserGetCollections {
|
||||
page: number,
|
||||
page_size: number
|
||||
}
|
||||
|
||||
interface UserPrecheckAttachment {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface UserGetAttachment {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface UserGetUnreadMsgCount {
|
||||
|
||||
}
|
||||
|
||||
interface UserGetMessages {
|
||||
page: number,
|
||||
page_size: number
|
||||
}
|
||||
|
||||
interface UserGetUserPosts {
|
||||
/** 用户名 */
|
||||
username: string,
|
||||
page: number,
|
||||
page_size: number
|
||||
}
|
||||
|
||||
interface UserGetStars {
|
||||
page: number,
|
||||
page_size: number
|
||||
}
|
||||
|
||||
interface UserGetUserProfile {
|
||||
username: string
|
||||
}
|
||||
|
||||
interface UserGetBills {
|
||||
page: number,
|
||||
page_size: number
|
||||
}
|
||||
|
||||
interface UserReqRecharge {
|
||||
amount: number
|
||||
}
|
||||
|
||||
interface UserGetRecharge {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface UserBindUserPhone {
|
||||
phone: string,
|
||||
captcha: string
|
||||
}
|
||||
|
||||
interface UserGetCaptcha {
|
||||
|
||||
}
|
||||
|
||||
interface UserWhisper {
|
||||
user_id: number,
|
||||
content: string
|
||||
}
|
||||
|
||||
interface UserChangePassword {
|
||||
/** 新密码 */
|
||||
password: string,
|
||||
/** 旧密码 */
|
||||
old_password: string
|
||||
}
|
||||
|
||||
interface UserChangeNickname {
|
||||
/** 昵称 */
|
||||
nickname: string
|
||||
}
|
||||
|
||||
interface PostGetPost {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostGetPosts {
|
||||
query: string | null,
|
||||
type: string,
|
||||
page: number,
|
||||
page_size: number
|
||||
}
|
||||
|
||||
interface PostLockPost {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostStickPost {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostGetPostStar {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostPostStar {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostGetPostCollection {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostPostCollection {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostGetTags {
|
||||
type: "hot" | string,
|
||||
num: number
|
||||
}
|
||||
|
||||
interface PostGetPostComments {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostCreatePost {
|
||||
/** 帖子内容列表 */
|
||||
contents: Partial<Item.PostItemProps>[],
|
||||
/** 标签列表 */
|
||||
tags: string[],
|
||||
/** 艾特用户列表 */
|
||||
users: string[],
|
||||
/** 附件价格 */
|
||||
attachment_price: number
|
||||
}
|
||||
|
||||
interface PostDeletePost {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostCreateComment {
|
||||
/** 内容ID */
|
||||
post_id: number,
|
||||
/** 帖子内容列表 */
|
||||
contents: Partial<Item.CommentItemProps>[],
|
||||
/** 艾特用户列表 */
|
||||
users: string[]
|
||||
}
|
||||
|
||||
interface PostDeleteComment {
|
||||
id: number
|
||||
}
|
||||
|
||||
interface PostCreateCommentReply {
|
||||
/** 艾特的用户UID */
|
||||
at_user_id: number,
|
||||
/** 回复的评论ID */
|
||||
comment_id: number,
|
||||
/** 回复内容 */
|
||||
content: string
|
||||
}
|
||||
|
||||
interface PostDeleteCommentReply{
|
||||
id: number
|
||||
}
|
||||
|
||||
declare namespace NetParams {
|
||||
interface AuthUserLogin {
|
||||
/** 用户名 */
|
||||
username: string;
|
||||
/** 密码 */
|
||||
password: string;
|
||||
}
|
||||
|
||||
interface AuthUserRegister {
|
||||
/** 用户名 */
|
||||
username: string;
|
||||
/** 密码 */
|
||||
password: string;
|
||||
}
|
||||
|
||||
type AuthUserInfo = string;
|
||||
|
||||
interface AuthUpdateUserPassword {
|
||||
/** 新密码 */
|
||||
password: string;
|
||||
/** 旧密码 */
|
||||
old_password: string;
|
||||
}
|
||||
|
||||
interface UserGetCollections {
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
interface UserPrecheckAttachment {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface UserGetAttachment {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface UserGetUnreadMsgCount {}
|
||||
|
||||
interface UserGetMessages {
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
interface UserGetUserPosts {
|
||||
/** 用户名 */
|
||||
username: string;
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
interface UserGetStars {
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
interface UserGetUserProfile {
|
||||
username: string;
|
||||
}
|
||||
|
||||
interface UserGetBills {
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
interface UserReqRecharge {
|
||||
amount: number;
|
||||
}
|
||||
|
||||
interface UserGetRecharge {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface UserBindUserPhone {
|
||||
phone: string;
|
||||
captcha: string;
|
||||
}
|
||||
|
||||
interface UserGetCaptcha {}
|
||||
|
||||
interface UserWhisper {
|
||||
user_id: number;
|
||||
content: string;
|
||||
}
|
||||
|
||||
interface UserChangePassword {
|
||||
/** 新密码 */
|
||||
password: string;
|
||||
/** 旧密码 */
|
||||
old_password: string;
|
||||
}
|
||||
|
||||
interface UserChangeNickname {
|
||||
/** 昵称 */
|
||||
nickname: string;
|
||||
}
|
||||
|
||||
interface PostGetPost {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostGetPosts {
|
||||
query: string | null;
|
||||
type: string;
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
interface PostLockPost {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostStickPost {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostGetPostStar {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostPostStar {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostGetPostCollection {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostPostCollection {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostGetTags {
|
||||
type: 'hot' | string;
|
||||
num: number;
|
||||
}
|
||||
|
||||
interface PostGetPostComments {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostCreatePost {
|
||||
/** 帖子内容列表 */
|
||||
contents: Partial<Item.PostItemProps>[];
|
||||
/** 标签列表 */
|
||||
tags: string[];
|
||||
/** 艾特用户列表 */
|
||||
users: string[];
|
||||
/** 附件价格 */
|
||||
attachment_price: number;
|
||||
}
|
||||
|
||||
interface PostDeletePost {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostCreateComment {
|
||||
/** 内容ID */
|
||||
post_id: number;
|
||||
/** 帖子内容列表 */
|
||||
contents: Partial<Item.CommentItemProps>[];
|
||||
/** 艾特用户列表 */
|
||||
users: string[];
|
||||
}
|
||||
|
||||
interface PostDeleteComment {
|
||||
id: number;
|
||||
}
|
||||
|
||||
interface PostCreateCommentReply {
|
||||
/** 艾特的用户UID */
|
||||
at_user_id: number;
|
||||
/** 回复的评论ID */
|
||||
comment_id: number;
|
||||
/** 回复内容 */
|
||||
content: string;
|
||||
}
|
||||
|
||||
interface PostDeleteCommentReply {
|
||||
id: number;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue