This commit is contained in:
2023-07-10 22:04:49 +08:00
parent df89d8df5c
commit c7841414db
12 changed files with 484 additions and 167 deletions

View File

@@ -78,9 +78,15 @@
</el-select>
</el-form-item>
<el-form-item prop="content">
<span style="color: #9ca3af">描述: 请从技术栈功能适用场景解决那些痛点等方面介绍项目突出特点和闪光的亮点</span>
<el-tiptap style="margin-top: 5px" v-model="form.content" :readonly="false" :showMenubar="true"
:extensions="extensions"/>
<el-input
type="textarea"
placeholder="描述: 请从技术栈,功能,适用场景,解决那些痛点等方面介绍项目,突出特点和闪光的亮点。"
v-model="form.content"
maxlength="500"
rows="5"
show-word-limit
>
</el-input>
</el-form-item>
<el-form-item style="display: flex;flex-direction: row;justify-content: flex-end">
<el-button type="primary" @click="submitProject" round>提交<i class="el-icon-s-promotion"></i></el-button>
@@ -136,19 +142,7 @@
import SearchInput from "@/components/Home/SearchInput.vue";
import PublishArticle from "@/components/Paper/PublishArticle.vue";
import Vue from "vue";
import {
Blockquote,
Bold, BulletList,
CodeBlock, CodeView,
Doc, FontSize, FontType, FormatClear, HardBreak,
Heading, History, HorizontalRule,
Iframe,
Image, Indent, Italic, LineHeight,
Link, ListItem, OrderedList,
Paragraph, Preview, Print, SelectAll, Strike,
Text, TextAlign, TextColor, TextHighlight, TodoItem, TodoList, TrailingNode,
Underline
} from "element-tiptap";
import axios from "axios";
export default {
@@ -159,45 +153,6 @@ export default {
openPublishArticle:false,
openPublishProject:false,
openFileUploadDialog:false,
extensions: [
new Link,
new Image,
new Iframe,
new CodeBlock,
new Blockquote,
new Doc(),
new Text(),
new Paragraph(),
new Heading({level: 5}), // 支持多级标题设置为5级
new Bold({bubble: true}), // 在气泡菜单中渲染菜单按钮
new Underline({bubble: true, menubar: false}), // 在气泡菜单而不在菜单栏中渲染菜单按钮
new Italic(),
new Strike(),
new ListItem(),
new BulletList(),
new OrderedList(),
new TodoItem,
new TodoList,
new TextAlign({alignments: ['left', 'center', 'right', 'justify'],}),
new Indent({
minIndent: 0,
maxIndent: 7,
}),
new LineHeight({lineHeights: ['100%', '200%', '300%']}),
new HorizontalRule,
new HardBreak,
new TrailingNode,
new History,
new FormatClear,
new TextColor({bubble: true}),
new TextHighlight,
new Preview,
new Print,
new SelectAll,
new FontType,
new FontSize,
new CodeView,
],
form: {
url: null,
title: null,