Merge pull request 'master' (#888) from master into prod
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/888
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" class="article-detail">
|
<div v-loading="loading" class="article-detail">
|
||||||
<el-form :model="formData" >
|
<el-form :model="formData">
|
||||||
<h2 class="article-title">{{ formData.articleTitle }}</h2>
|
<h2 class="article-title">{{ formData.articleTitle }}</h2>
|
||||||
<div class="article-title">
|
<div class="article-title">
|
||||||
<Tag dictType="article_type" :value="formData.articleType"/>
|
<Tag dictType="article_type" :value="formData.articleType"/>
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-row gutter="20">
|
<el-row gutter="20">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item >
|
<el-form-item>
|
||||||
<div v-html="formData.articleContent"></div>
|
<div class="article-a" v-html="formData.articleContent"></div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -21,8 +21,9 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {ElNotification} from "element-plus";
|
import {ElNotification} from "element-plus";
|
||||||
import {getArticleDetail} from "@/api/article";
|
import {getArticleDetail} from "@/api/article";
|
||||||
const loading=ref(false)
|
|
||||||
const formData=ref({})
|
const loading = ref(false)
|
||||||
|
const formData = ref({})
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const getDetailInfo = async () => {
|
const getDetailInfo = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
@@ -30,7 +31,7 @@ const getDetailInfo = async () => {
|
|||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
formData.value = res.data
|
formData.value = res.data
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}else{
|
} else {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
@@ -46,17 +47,29 @@ onMounted(async () => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.article-a {
|
||||||
|
p {
|
||||||
|
a {
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.article-detail{
|
|
||||||
|
.article-detail {
|
||||||
padding: 0 30px;
|
padding: 0 30px;
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.article-title{
|
|
||||||
|
.article-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
>span:nth-child(2){
|
|
||||||
|
> span:nth-child(2) {
|
||||||
margin: 15px;
|
margin: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user