专题页面nav调整

This commit is contained in:
祝梦园 2024-02-18 10:57:49 +08:00
parent f1cad19531
commit 63288736d4
5 changed files with 42092 additions and 54 deletions

View File

@ -1,20 +1,23 @@
<template>
<el-row class="wrapper">
<el-col style="margin-bottom: 1rem;">
<el-menu type="border-card" :default-active="currentTopic" style="margin-top: -2px;border: 0;" mode="horizontal"
<div class="wrapper">
<div style="background: white">
<el-menu type="border-card" :default-active="currentTopic"
style="width: 96%;margin: 0 auto" mode="horizontal"
@select="handleSelectTopic">
<el-menu-item index="news">最新</el-menu-item>
<el-menu-item v-for="topic in topicNavs" :key="topic.idTopic" :index="topic.topicUri">{{topic.topicTitle}}
<el-menu-item v-for="topic in topicNavs" :key="topic.idTopic" :index="topic.topicUri">{{ topic.topicTitle }}
</el-menu-item>
</el-menu>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
import {mapState} from 'vuex'
export default {
export default {
name: "topicNav",
props: {
currentTopic: {
@ -28,6 +31,7 @@
isFetching: state => state.topic.fetching
})
},
watch: {},
methods: {
handleSelectTopic(item) {
this.$router.push({
@ -35,7 +39,7 @@
});
}
}
}
}
</script>
<style scoped>

View File

@ -117,7 +117,7 @@ export default {
proxy: [ //proxy配置
['/api', {
target: apiConfig.BASE, //api请求路径
pathRewrite: {'^/api': isDevMode ? '/api/v1' : '/api'} //重定向请求路径防止路由、api路径的冲突
pathRewrite: {'^/api': isDevMode ? '/api' : '/api'} //重定向请求路径防止路由、api路径的冲突
}],
['/ws', {
target: apiConfig.BASE //api请求路径

31738
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,5 @@
<template>
<div>
<el-row style="margin-top: 20px;">
<el-col style="margin-bottom: 1rem;">
<el-breadcrumb separator-class="el-icon-arrow-right">
@ -12,10 +10,8 @@
<el-col style="margin: .5rem;">
<el-button size="small" @click="createTopic" plain>创建专题</el-button>
</el-col>
</el-row> <el-row :gutter="20">
</el-row>
<el-row :gutter="20">
<el-col :span="8" style="margin-bottom: .5rem;" v-for="topic in topics.list" :key="topic.idTopic">
<el-card shadow="never">
<div class="card-body d-flex flex-column">
@ -24,7 +20,7 @@
<img style="margin-right: 10px;" :src="topic.topicIconPath" :alt="topic.topicTitle"
class="topic-brand-img">
</el-col>
<el-col :span="20" >
<el-col :span="20">
<el-link rel="nofollow" @click="onRouter('admin-topic-detail',topic.topicUri)" :underline="false">
<span style="font-size: 20px;font-weight: bold"> {{ topic.topicTitle }}</span>
</el-link>

10300
yarn.lock Normal file

File diff suppressed because it is too large Load Diff