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 a8d78507
authored
Jan 30, 2023
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
欢迎语支持换行
1 parent
2b230186
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
28 deletions
linkwe-pc/src/components/TextareaExtend.vue
linkwe-pc/src/components/previewInMobileClient.vue
linkwe-pc/src/components/TextareaExtend.vue
View file @
a8d7850
// 带 插入 表情/客户昵称 等扩展工具栏的文本内容框
// 带 插入 表情/客户昵称 等扩展工具栏的文本内容框
<
script
>
<
script
>
export
default
{
export
default
{
name
:
''
,
name
:
''
,
props
:
{
props
:
{
value
:
''
,
value
:
''
,
// ['emoji','insertCustomerNickName']
// ['emoji','insertCustomerNickName']
toolbar
:
{
toolbar
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[
'emoji'
],
default
:
()
=>
[
'emoji'
]
},
}
},
},
components
:
{
components
:
{
SelectEmoji
:
()
=>
import
(
'@/components/SelectEmoji'
),
SelectEmoji
:
()
=>
import
(
'@/components/SelectEmoji'
)
},
},
data
()
{
data
()
{
return
{}
return
{}
...
@@ -23,8 +23,8 @@ export default {
...
@@ -23,8 +23,8 @@ export default {
},
},
set
(
val
)
{
set
(
val
)
{
this
.
$emit
(
'input'
,
val
)
this
.
$emit
(
'input'
,
val
)
},
}
},
}
},
},
watch
:
{},
watch
:
{},
created
()
{},
created
()
{},
...
@@ -36,9 +36,9 @@ export default {
...
@@ -36,9 +36,9 @@ export default {
const
content
=
this
.
proxyValue
||
''
const
content
=
this
.
proxyValue
||
''
const
textIndex
=
$textarea
.
selectionStart
const
textIndex
=
$textarea
.
selectionStart
this
.
proxyValue
=
content
.
slice
(
0
,
textIndex
)
+
value
+
content
.
slice
(
textIndex
)
this
.
proxyValue
=
content
.
slice
(
0
,
textIndex
)
+
value
+
content
.
slice
(
textIndex
)
},
}
},
}
}
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -55,4 +55,8 @@ export default {
...
@@ -55,4 +55,8 @@ export default {
</div>
</div>
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
>
textarea
{
white-space
:
pre-wrap
;
//保留所有空格
}
</
style
>
linkwe-pc/src/components/previewInMobileClient.vue
View file @
a8d7850
<
template
>
<
template
>
<div
class=
"preview"
>
<div
class=
"preview"
>
<div
class=
"title"
>
{{
name
}}
</div>
<div
class=
"title"
>
{{
name
}}
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"item"
>
<div
class=
"item"
>
<div
class=
"avatar222"
><img
src=
"../assets/drainageCode/header.png"
></div>
<div
class=
"avatar222"
><img
src=
"../assets/drainageCode/header.png"
/
></div>
<div
class=
"msg"
>
<div
class=
"msg"
>
<div
class=
"word"
>
<div
class=
"word"
>
{{
list
.
welcomeMsg
}}
<p
style=
"line-height: 18px;"
v-html=
"list.welcomeMsg.replace(/\n|\r\n/g, '
<br>
').replace(/ /g, '
&
nbsp')"
>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"item"
v-for=
"(data, key) in list.materialMsgList"
:key=
"key"
>
<div
class=
"item"
v-for=
"(data, key) in list.materialMsgList"
:key=
"key"
>
<div
class=
"avatar222"
><img
src=
"../assets/drainageCode/header.png"
></div>
<div
class=
"avatar222"
><img
src=
"../assets/drainageCode/header.png"
/
></div>
<div
class=
"msg"
v-if=
"data.msgType === '4'"
>
<div
class=
"msg"
v-if=
"data.msgType === '4'"
>
<div
class=
"word"
>
<div
class=
"word"
>
{{
data
.
content
}}
{{
data
.
content
}}
</div>
</div>
</div>
</div>
<div
class=
"msg"
v-if=
"data.msgType === '0'"
>
<div
class=
"msg"
v-if=
"data.msgType === '0'"
>
...
@@ -25,7 +28,7 @@
...
@@ -25,7 +28,7 @@
<div
class=
"msg"
v-if=
"data.msgType === '8'"
>
<div
class=
"msg"
v-if=
"data.msgType === '8'"
>
<div
class=
"word-and-image"
>
<div
class=
"word-and-image"
>
<div>
<div>
{{
data
.
materialName
}}
{{
data
.
materialName
}}
</div>
</div>
<div
class=
"sub-content"
>
<div
class=
"sub-content"
>
<div>
<div>
...
@@ -40,12 +43,10 @@
...
@@ -40,12 +43,10 @@
<div
class=
"msg"
v-if=
"data.msgType === '9'"
>
<div
class=
"msg"
v-if=
"data.msgType === '9'"
>
<div
class=
"miniprogram"
>
<div
class=
"miniprogram"
>
<div
class=
"mini-header"
>
<div
class=
"mini-header"
>
<img
src=
"../assets/drainageCode/miniprogram-icon.png"
alt=
""
>
{{
data
.
materialName
}}
<img
src=
"../assets/drainageCode/miniprogram-icon.png"
alt=
""
/>
{{
data
.
materialName
}}
</div>
<img
class=
"mini-img"
:src=
"data.coverUrl"
>
<div
class=
"mini-footer"
>
<img
src=
"../assets/drainageCode/miniprogram-link.png"
/>
小程序
</div>
</div>
<img
class=
"mini-img"
:src=
"data.coverUrl"
/>
<div
class=
"mini-footer"
><img
src=
"../assets/drainageCode/miniprogram-link.png"
/>
小程序
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -91,7 +92,6 @@
...
@@ -91,7 +92,6 @@
</div>
</div>
</div>
</div>
</div>
-->
</div>
-->
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -102,20 +102,20 @@
...
@@ -102,20 +102,20 @@
props
:
{
props
:
{
name
:
{
name
:
{
type
:
String
,
type
:
String
,
default
:
"小微"
default
:
'小微'
},
},
list
:
{
list
:
{
type
:
Object
,
type
:
Object
,
default
:
{}
default
:
{}
}
}
},
},
data
()
{
data
()
{
return
{}
return
{}
},
},
computed
:
{},
computed
:
{},
created
()
{
},
created
()
{
},
mounted
()
{
},
mounted
()
{
},
methods
:
{},
methods
:
{}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -181,7 +181,7 @@
...
@@ -181,7 +181,7 @@
margin-left
:
5px
;
margin-left
:
5px
;
&:before
{
&:before
{
content
:
" "
;
content
:
' '
;
display
:
block
;
display
:
block
;
position
:
absolute
;
position
:
absolute
;
left
:
-5px
;
left
:
-5px
;
...
...
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