u
This commit is contained in:
1 parent
898d209594
commit
0189bf89c9
31 files changed
+745
-3
No files matched your search
@@ -0,0 +1,90 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
},
|
||||
subTitle: {
|
||||
type: String,
|
||||
},
|
||||
inContainer: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const containerClass = computed(() => {
|
||||
return props.inContainer ? 'container-inner' : 'container-fixed'
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="containerClass">
|
||||
<div class="empty-wrapper">
|
||||
<img class="empty-image" src="/no-data.svg">
|
||||
|
||||
<div v-if="title" class="empty-title">
|
||||
{{ title }}
|
||||
</div>
|
||||
|
||||
<div v-if="subTitle" class="empty-subtitle">
|
||||
{{ subTitle }}
|
||||
</div>
|
||||
|
||||
<div v-if="$slots.extra" class="empty-extra">
|
||||
<slot name="extra" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container-inner {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container-fixed {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.empty-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.empty-image {
|
||||
width: 360px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.empty-title {
|
||||
margin-top: 24px;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.empty-subtitle {
|
||||
margin-top: 12px;
|
||||
font-size: 18px;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
max-width: 360px;
|
||||
}
|
||||
|
||||
.empty-extra {
|
||||
margin-top: 28px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,76 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
inContainer: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
|
||||
const containerClass = computed(() => {
|
||||
return props.inContainer ? 'container-inner' : 'container-fixed'
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="containerClass">
|
||||
<!-- From Uiverse.io by nazeer004 -->
|
||||
<div class="loader">
|
||||
<span>link56.net</span>
|
||||
<span>link56.net</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container-inner {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container-fixed {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
/* From Uiverse.io by nazeer004 */
|
||||
.loader {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.loader span {
|
||||
position: absolute;
|
||||
color: #fff;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 38px;
|
||||
letter-spacing: 5px;
|
||||
}
|
||||
|
||||
.loader span:nth-child(1) {
|
||||
color: transparent;
|
||||
-webkit-text-stroke: 0.3px rgb(0, 57, 244);
|
||||
}
|
||||
|
||||
.loader span:nth-child(2) {
|
||||
color: rgb(0, 4, 255);
|
||||
-webkit-text-stroke: 1px rgb(17, 0, 255);
|
||||
animation: uiverse723 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes uiverse723 {
|
||||
0%,
|
||||
100% {
|
||||
clip-path: polygon(0% 45%, 15% 44%, 32% 50%, 54% 60%, 70% 61%, 84% 59%, 100% 52%, 100% 100%, 0% 100%);
|
||||
}
|
||||
|
||||
50% {
|
||||
clip-path: polygon(0% 60%, 16% 65%, 34% 66%, 51% 62%, 67% 50%, 84% 45%, 100% 46%, 100% 100%, 0% 100%);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -13,8 +13,8 @@ const userStore = useUserStore()
|
||||
const menuList = [
|
||||
{ name: '首页', path: '/' },
|
||||
{ name: '企业名录', path: '/company' },
|
||||
{ name: '论坛中心', path: '/forum' },
|
||||
{ name: '关于我们', path: '/companies' },
|
||||
{ name: '论坛中心', path: '/post' },
|
||||
{ name: '关于我们', path: '/aboutus' },
|
||||
{ name: '联系我们', path: '/forum' },
|
||||
]
|
||||
|
||||
|
||||
@@ -18,6 +18,19 @@ const router = createRouter({
|
||||
path: '/company',
|
||||
component: () => import('@/views/company/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/post',
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
component: () => import('@/views/post/home/index.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: '/aboutus',
|
||||
component: () => import('@/views/aboutus/index.vue'),
|
||||
},
|
||||
{
|
||||
path: '/company/detail',
|
||||
component: () => import('@/views/company/detail/index.vue'),
|
||||
|
||||
@@ -13,6 +13,8 @@ declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
AnchorMenu: typeof import('./../components/anchor-menu/index.vue')['default']
|
||||
AreaSelect: typeof import('./../components/AreaSelect.vue')['default']
|
||||
CustomEmpty: typeof import('./../components/CustomEmpty.vue')['default']
|
||||
CustomLoading: typeof import('./../components/custom-loading/index.vue')['default']
|
||||
Directory: typeof import('./../components/wang-editor/modules/directory.vue')['default']
|
||||
EmailCodeInput: typeof import('./../components/EmailCodeInput.vue')['default']
|
||||
HelloWorld: typeof import('./../components/HelloWorld.vue')['default']
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>123</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
||||
@@ -0,0 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="" />
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
||||
@@ -0,0 +1,146 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import CustomLoading from '@/components/custom-loading/index.vue'
|
||||
import CustomEmpty from '@/components/CustomEmpty.vue'
|
||||
|
||||
const loading = ref<boolean>(false)
|
||||
|
||||
const dataResult = ref<BasePageResult<any>>({
|
||||
total: 0,
|
||||
records: [],
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="loading">
|
||||
<CustomLoading />
|
||||
</div>
|
||||
<CustomEmpty v-else-if="dataResult.total === 0" title="🍵 帖子空空如也" sub-title="快来创建第一个贴子吧">
|
||||
<template #extra>
|
||||
<el-button type="primary">
|
||||
创建帖子
|
||||
</el-button>
|
||||
</template>
|
||||
</CustomEmpty>
|
||||
|
||||
|
||||
<div v-else class="post-container">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.post-container {
|
||||
height: 100%;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.post-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.post-item {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
background-color: #ffffff;
|
||||
transition: all 0.3s ease;
|
||||
border-bottom: 1px solid #f6f6f6;
|
||||
}
|
||||
.post-content {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
.post-title {
|
||||
font-weight: blod;
|
||||
font-size: 18px;
|
||||
width: 500px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: #005da6;
|
||||
text-decoration: underline;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
.post-title:hover {
|
||||
color: #fa8c16;
|
||||
}
|
||||
.post-summary {
|
||||
font-size: 13px;
|
||||
color: #999;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
|
||||
line-clamp: 2;
|
||||
box-orient: vertical;
|
||||
}
|
||||
.post-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.post-meta {
|
||||
display: flex;
|
||||
color: #777;
|
||||
.post-meta-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.post-author {
|
||||
max-width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.post-tags {
|
||||
max-width: 300px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
.post-tag {
|
||||
background-color: #165dff;
|
||||
border-radius: 2px;
|
||||
font-size: 10px;
|
||||
padding: 4px 8px;
|
||||
text-align: center;
|
||||
color: #ffffff;
|
||||
display: inline-block;
|
||||
line-height: 12px;
|
||||
max-width: 80px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.post-cover {
|
||||
width: 180px;
|
||||
overflow: hidden;
|
||||
max-height: 140px;
|
||||
min-height: 120px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
.spin-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 24px 0px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class=""></div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
//
|
||||
</style>
|
||||
@@ -0,0 +1,31 @@
|
||||
<script lang="ts" setup>
|
||||
import Nav from './components/nav.vue' // 导航栏组件
|
||||
import PostList from './components/post-list.vue' // 帖子列表组件
|
||||
import Sidebar from './components/sidebar.vue' // 推荐组件
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="post">
|
||||
<Nav class="nav" />
|
||||
<PostList class="post-list" />
|
||||
<Sidebar class="sidebar" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.post {
|
||||
display: flex;
|
||||
padding: 0px 60px;
|
||||
width: 100%;
|
||||
}
|
||||
.nav {
|
||||
width: 200px;
|
||||
}
|
||||
.sidebar {
|
||||
width: 250px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.post-list {
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user