Commit 8557ea8c by lijiabin

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

parent 80e7e8b8
......@@ -127,6 +127,23 @@
</el-button>
</el-tooltip>
</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>
<!-- 右侧操作按钮 -->
......@@ -178,9 +195,11 @@ import RichTextarea from '../RichTextarea/index.vue'
import UploadImgIcon from '../UploadImgIcon/index.vue'
import { push } from 'notivue'
import { useTourStore } from '@/stores'
import { useRouter } from 'vue-router'
const tourStore = useTourStore()
const { showAskTabTour } = storeToRefs(tourStore)
const router = useRouter()
// 暂时只有 问吧 和 实践 需要发布框 这俩都需要实名
type ArticleType = ArticleTypeEnum.QUESTION | ArticleTypeEnum.PRACTICE
......@@ -277,6 +296,11 @@ const handleAddTag = () => {
selectTagsDialogRef.value?.open()
}
// 快捷发布区空间有限,问吧的富文本内容统一在大区域编辑页完成。
const goToRichEditor = () => {
router.push('/publishLongArticle/question')
}
const closeAskTabTour = () => {
showAskTabTour.value = false
}
......
......@@ -20,12 +20,7 @@
<!-- 富文本编辑器 -->
<div>
<el-form-item prop="content">
<!-- 问吧和实践不是富文本 -->
<template
v-if="
form.type === ArticleTypeEnum.PRACTICE || form.type === ArticleTypeEnum.QUESTION
"
>
<template v-if="form.type === ArticleTypeEnum.PRACTICE">
<el-input
:placeholder="`请输入${text}内容`"
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