Commit 8557ea8c by lijiabin

【需求 25171】feat: 新增问吧富文本发布入口

parent 80e7e8b8
...@@ -127,6 +127,23 @@ ...@@ -127,6 +127,23 @@
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</UploadImgIcon> </UploadImgIcon>
<el-tooltip
v-if="type === ArticleTypeEnum.QUESTION"
content="进入大区域富文本编辑页"
placement="top"
>
<el-button
text
class="h-10 px-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700 rounded-lg"
@click="goToRichEditor"
>
<el-icon size="18">
<IEpEditPen />
</el-icon>
<span class="ml-1 text-xs">使用富文本编辑</span>
</el-button>
</el-tooltip>
</div> </div>
<!-- 右侧操作按钮 --> <!-- 右侧操作按钮 -->
...@@ -178,9 +195,11 @@ import RichTextarea from '../RichTextarea/index.vue' ...@@ -178,9 +195,11 @@ import RichTextarea from '../RichTextarea/index.vue'
import UploadImgIcon from '../UploadImgIcon/index.vue' import UploadImgIcon from '../UploadImgIcon/index.vue'
import { push } from 'notivue' import { push } from 'notivue'
import { useTourStore } from '@/stores' import { useTourStore } from '@/stores'
import { useRouter } from 'vue-router'
const tourStore = useTourStore() const tourStore = useTourStore()
const { showAskTabTour } = storeToRefs(tourStore) const { showAskTabTour } = storeToRefs(tourStore)
const router = useRouter()
// 暂时只有 问吧 和 实践 需要发布框 这俩都需要实名 // 暂时只有 问吧 和 实践 需要发布框 这俩都需要实名
type ArticleType = ArticleTypeEnum.QUESTION | ArticleTypeEnum.PRACTICE type ArticleType = ArticleTypeEnum.QUESTION | ArticleTypeEnum.PRACTICE
...@@ -277,6 +296,11 @@ const handleAddTag = () => { ...@@ -277,6 +296,11 @@ const handleAddTag = () => {
selectTagsDialogRef.value?.open() selectTagsDialogRef.value?.open()
} }
// 快捷发布区空间有限,问吧的富文本内容统一在大区域编辑页完成。
const goToRichEditor = () => {
router.push('/publishLongArticle/question')
}
const closeAskTabTour = () => { const closeAskTabTour = () => {
showAskTabTour.value = false showAskTabTour.value = false
} }
......
...@@ -20,12 +20,7 @@ ...@@ -20,12 +20,7 @@
<!-- 富文本编辑器 --> <!-- 富文本编辑器 -->
<div> <div>
<el-form-item prop="content"> <el-form-item prop="content">
<!-- 问吧和实践不是富文本 --> <template v-if="form.type === ArticleTypeEnum.PRACTICE">
<template
v-if="
form.type === ArticleTypeEnum.PRACTICE || form.type === ArticleTypeEnum.QUESTION
"
>
<el-input <el-input
:placeholder="`请输入${text}内容`" :placeholder="`请输入${text}内容`"
v-model="form.content" v-model="form.content"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment