Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
school-paper-admin-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
school-paper
school-paper-admin-front
Commits
ad73f2de
Commit
ad73f2de
authored
Jul 24, 2023
by
裴梁博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/v1/plb' into 'feature/v1/zmj'
Feature/v1/plb See merge request
!1
parents
837b90ca
d4a680a5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
src/components/Editor/index.vue
+21
-14
src/views/school-paper/questionBank/index.vue
+0
-0
No files found.
src/components/Editor/index.vue
View file @
ad73f2de
...
...
@@ -56,13 +56,19 @@ export default {
type
:
{
type
:
String
,
default
:
"url"
,
}
},
iconType
:
{
type
:
Array
,
default
:
()
=>
{
return
[
"link"
,
"image"
,
"video"
];
// 链接、图片、视频
},
},
},
data
()
{
return
{
uploadUrl
:
process
.
env
.
VUE_APP_BASE_API
+
"/system/oss/upload"
,
// 上传的图片服务器地址
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
Authorization
:
"Bearer "
+
getToken
()
,
},
Quill
:
null
,
currentValue
:
""
,
...
...
@@ -73,16 +79,16 @@ export default {
modules
:
{
// 工具栏配置
toolbar
:
[
[
"bold"
,
"italic"
,
"underline"
,
"strike"
],
// 加粗 斜体 下划线 删除线
[
"blockquote"
,
"code-block"
],
// 引用 代码块
[{
list
:
"ordered"
},
{
list
:
"bullet"
}],
// 有序、无序列表
[{
indent
:
"-1"
},
{
indent
:
"+1"
}],
// 缩进
[{
size
:
[
"small"
,
false
,
"large"
,
"huge"
]
}],
// 字体大小
[{
header
:
[
1
,
2
,
3
,
4
,
5
,
6
,
false
]
}],
// 标题
[{
color
:
[]
},
{
background
:
[]
}],
// 字体颜色、字体背景颜色
[{
align
:
[]
}],
// 对齐方式
[
"clean"
],
// 清除文本格式
[
"link"
,
"image"
,
"video"
]
// 链接、图片、视频
[
"bold"
,
"italic"
,
"underline"
,
"strike"
],
// 加粗 斜体 下划线 删除线
[
"blockquote"
,
"code-block"
],
// 引用 代码块
[{
list
:
"ordered"
},
{
list
:
"bullet"
}],
// 有序、无序列表
[{
indent
:
"-1"
},
{
indent
:
"+1"
}],
// 缩进
[{
size
:
[
"small"
,
false
,
"large"
,
"huge"
]
}],
// 字体大小
[{
header
:
[
1
,
2
,
3
,
4
,
5
,
6
,
false
]
}],
// 标题
[{
color
:
[]
},
{
background
:
[]
}],
// 字体颜色、字体背景颜色
[{
align
:
[]
}],
// 对齐方式
[
"clean"
],
// 清除文本格式
this
.
iconType
,
// 链接、图片、视频
],
},
placeholder
:
"请输入内容"
,
...
...
@@ -126,7 +132,7 @@ export default {
const
editor
=
this
.
$refs
.
editor
;
this
.
Quill
=
new
Quill
(
editor
,
this
.
options
);
// 如果设置了上传地址则自定义图片上传事件
if
(
this
.
type
==
'url'
)
{
if
(
this
.
type
==
"url"
)
{
let
toolbar
=
this
.
Quill
.
getModule
(
"toolbar"
);
toolbar
.
addHandler
(
"image"
,
(
value
)
=>
{
this
.
uploadType
=
"image"
;
...
...
@@ -191,7 +197,8 @@ export default {
</
script
>
<
style
>
.editor
,
.ql-toolbar
{
.editor
,
.ql-toolbar
{
white-space
:
pre-wrap
!important
;
line-height
:
normal
!important
;
}
...
...
src/views/school-paper/questionBank/index.vue
View file @
ad73f2de
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment