Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pet-business-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘怀志
pet-business-web
Commits
f8be83f6
Commit
f8be83f6
authored
Jul 03, 2023
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
富文本编辑器统一修改
parent
6775e7fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
index.vue
src/components/Editor/index.vue
+7
-0
rich-text.vue
src/views/document-management/rich-text.vue
+7
-0
No files found.
src/components/Editor/index.vue
View file @
f8be83f6
...
@@ -110,6 +110,8 @@ export default {
...
@@ -110,6 +110,8 @@ export default {
this
.
currentValue
=
val
===
null
?
''
:
val
this
.
currentValue
=
val
===
null
?
''
:
val
if
(
this
.
Quill
)
{
if
(
this
.
Quill
)
{
this
.
Quill
.
pasteHTML
(
this
.
currentValue
)
this
.
Quill
.
pasteHTML
(
this
.
currentValue
)
const
length
=
this
.
Quill
.
getLength
()
this
.
Quill
.
setSelection
(
length
)
}
}
}
}
},
},
...
@@ -139,6 +141,8 @@ export default {
...
@@ -139,6 +141,8 @@ export default {
})
})
}
}
this
.
Quill
.
pasteHTML
(
this
.
currentValue
)
this
.
Quill
.
pasteHTML
(
this
.
currentValue
)
const
length
=
this
.
Quill
.
getLength
()
this
.
Quill
.
setSelection
(
length
)
this
.
Quill
.
on
(
'text-change'
,
(
delta
,
oldDelta
,
source
)
=>
{
this
.
Quill
.
on
(
'text-change'
,
(
delta
,
oldDelta
,
source
)
=>
{
const
html
=
this
.
$refs
.
editor
.
children
[
0
].
innerHTML
const
html
=
this
.
$refs
.
editor
.
children
[
0
].
innerHTML
const
text
=
this
.
Quill
.
getText
()
const
text
=
this
.
Quill
.
getText
()
...
@@ -270,4 +274,7 @@ export default {
...
@@ -270,4 +274,7 @@ export default {
.ql-snow
.ql-picker.ql-font
.ql-picker-item
[
data-value
=
"monospace"
]
::before
{
.ql-snow
.ql-picker.ql-font
.ql-picker-item
[
data-value
=
"monospace"
]
::before
{
content
:
"等宽字体"
;
content
:
"等宽字体"
;
}
}
.ql-editor.ql-blank
::before
{
font-style
:
normal
;
}
</
style
>
</
style
>
src/views/document-management/rich-text.vue
View file @
f8be83f6
...
@@ -112,6 +112,8 @@ export default {
...
@@ -112,6 +112,8 @@ export default {
this
.
currentValue
=
val
===
null
?
''
:
val
this
.
currentValue
=
val
===
null
?
''
:
val
if
(
this
.
Quill
)
{
if
(
this
.
Quill
)
{
this
.
Quill
.
pasteHTML
(
this
.
currentValue
)
this
.
Quill
.
pasteHTML
(
this
.
currentValue
)
const
length
=
this
.
Quill
.
getLength
()
this
.
Quill
.
setSelection
(
length
)
}
}
}
}
},
},
...
@@ -141,6 +143,8 @@ export default {
...
@@ -141,6 +143,8 @@ export default {
})
})
}
}
this
.
Quill
.
pasteHTML
(
this
.
currentValue
)
this
.
Quill
.
pasteHTML
(
this
.
currentValue
)
const
length
=
this
.
Quill
.
getLength
()
this
.
Quill
.
setSelection
(
length
)
this
.
Quill
.
on
(
'text-change'
,
(
delta
,
oldDelta
,
source
)
=>
{
this
.
Quill
.
on
(
'text-change'
,
(
delta
,
oldDelta
,
source
)
=>
{
const
html
=
this
.
$refs
.
editor
.
children
[
0
].
innerHTML
const
html
=
this
.
$refs
.
editor
.
children
[
0
].
innerHTML
const
text
=
this
.
Quill
.
getText
()
const
text
=
this
.
Quill
.
getText
()
...
@@ -272,4 +276,7 @@ export default {
...
@@ -272,4 +276,7 @@ export default {
.ql-snow
.ql-picker.ql-font
.ql-picker-item
[
data-value
=
"monospace"
]
::before
{
.ql-snow
.ql-picker.ql-font
.ql-picker-item
[
data-value
=
"monospace"
]
::before
{
content
:
"等宽字体"
;
content
:
"等宽字体"
;
}
}
.ql-editor.ql-blank
::before
{
font-style
:
normal
;
}
</
style
>
</
style
>
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