Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8e318520
authored
Nov 06, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
富文本回显问题
1 parent
b2606e2c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
23 deletions
vue3-lw-pc/src/components/MessageContentForm.vue
vue3-lw-pc/src/components/common/QuillEditor.vue
vue3-lw-pc/src/views/contentCenter/trackMaterial/articleAdd.vue
vue3-lw-pc/src/components/MessageContentForm.vue
View file @
8e31852
...
...
@@ -143,7 +143,7 @@
</Upload>
</el-form-item>
<el-form-item
label=
"外链预览"
>
<iframe
class=
"iframe"
v-if=
"form.materialUrl"
:src=
"form.materialUrl"
:key
=
"form.materialUrl"
></iframe>
<iframe
class=
"iframe"
:src
=
"form.materialUrl"
></iframe>
</el-form-item>
</template>
...
...
@@ -266,11 +266,7 @@
show-word-limit
></el-input>
</el-form-item>
<!-- 富文本content -->
<DefineQuillEditor
style=
"margin: 10px 10px 0"
:value=
"form.content"
@
change=
"getContent"
ref=
"myQuillEditor"
></DefineQuillEditor>
<QuillEditor
style=
"margin: 10px 10px 0"
v-model=
"form.content"
ref=
"myQuillEditor"
></QuillEditor>
</
template
>
<!-- 海报 -->
<
template
v-else-if=
"type === '5'"
>
...
...
@@ -289,7 +285,7 @@
<
script
>
import
PosterAdd
from
'@/views/contentCenter/components/PosterAdd.vue'
import
Define
QuillEditor
from
'@/components/common/QuillEditor.vue'
import
QuillEditor
from
'@/components/common/QuillEditor.vue'
import
{
add
,
update
}
from
'@/api/material'
var
validateHtml
=
(
rule
,
value
,
callback
)
=>
{
if
(
/
\.
html$/gi
.
test
(
value
))
{
...
...
@@ -309,7 +305,7 @@ export default {
name
:
'message-content-form'
,
components
:
{
PosterAdd
,
Define
QuillEditor
,
QuillEditor
,
},
data
()
{
return
{
...
...
@@ -451,9 +447,6 @@ export default {
},
},
methods
:
{
getContent
(
con
)
{
this
.
form
.
content
=
con
},
getPicUrl
(
val
)
{
this
.
form
.
coverUrl
=
val
},
...
...
vue3-lw-pc/src/components/common/QuillEditor.vue
View file @
8e31852
...
...
@@ -19,14 +19,17 @@ import SelectEmoji from '@/components/SelectEmoji'
export
default
{
components
:
{
QuillEditor
,
SelectEmoji
},
props
:
{
v
alue
:
{
modelV
alue
:
{
type
:
String
,
},
},
emits
:
[
'
chang
e'
],
emits
:
[
'
update:modelValu
e'
],
watch
:
{
value
(
val
)
{
this
.
content
=
val
modelValue
:
{
immediate
:
true
,
handler
(
val
)
{
this
.
content
=
val
},
},
imgUrl
(
val
)
{
let
quill
=
this
.
$refs
.
quill
.
getQuill
()
...
...
@@ -89,7 +92,7 @@ export default {
},
methods
:
{
onEditorChange
()
{
this
.
$emit
(
'
chang
e'
,
this
.
content
)
this
.
$emit
(
'
update:modelValu
e'
,
this
.
content
)
},
onProgress
(
percent
)
{
this
.
uploadLoading
=
percent
>
0
&&
percent
<
100
...
...
vue3-lw-pc/src/views/contentCenter/trackMaterial/articleAdd.vue
View file @
8e31852
...
...
@@ -6,8 +6,8 @@
<el-col
:span=
"18"
class=
"g-card"
style=
"margin-right: 16px; margin-top: 10px"
>
<el-form-item
label-width=
"0px"
>
<!-- 富文本content -->
<
!--
<quill-editor
v-model=
"form.content"
ref=
"myQuillEditor"
></quill-editor>
--
>
<
DefineQuillEditor
:value=
"form.content"
@
change=
"getContent"
ref=
"myQuillEditor"
></DefineQuillEditor
>
<
QuillEditor
v-model=
"form.content"
ref=
"myQuillEditor"
></QuillEditor
>
<
!--
<DefineQuillEditor
:value=
"form.content"
@
change=
"getContent"
ref=
"myQuillEditor"
></DefineQuillEditor>
--
>
</el-form-item>
</el-col>
<el-col
:span=
"6"
class=
"g-card"
>
...
...
@@ -65,12 +65,12 @@
</template>
<
script
>
import
Define
QuillEditor
from
'@/components/common/QuillEditor.vue'
import
QuillEditor
from
'@/components/common/QuillEditor.vue'
import
{
getTree
,
add
,
update
,
getList
}
from
'@/api/material'
import
PreviewInPhone
from
'@/components/ContentCenter/PreviewInPhone'
// import * as Quill from 'quill'
export
default
{
components
:
{
Define
QuillEditor
,
PreviewInPhone
},
components
:
{
QuillEditor
,
PreviewInPhone
},
data
()
{
return
{
form
:
{},
// 素材表单
...
...
@@ -116,9 +116,6 @@ export default {
// Quill.register(Align, true)
},
methods
:
{
getContent
(
con
)
{
this
.
form
.
content
=
con
},
preview
()
{
this
.
dialogVisible
=
true
this
.
mobForm
=
[]
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment