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