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 defbf35c
authored
Apr 21, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
pc 手机预览手机背景统一,滚动条统一为hover显示等
1 parent
0d7a373f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
196 additions
and
156 deletions
linkwe-pc/src/components/PhoneDialog.vue
linkwe-pc/src/components/PhoneTemplate.vue
linkwe-pc/src/styles/index.scss
linkwe-pc/src/views/drainageCode/smartForms/add.vue
linkwe-pc/src/components/PhoneDialog.vue
View file @
defbf35
...
...
@@ -31,113 +31,82 @@ export default {
</
script
>
<
template
>
<div
class=
"preview ac"
>
<div
class=
"top"
>
小微
</div>
<div
class=
"small"
>
{{
lwConfig
.
COMPANY_NAME
||
'仟微科技'
}}
-企微
</div>
<div
class=
"time"
>
凌晨2:20
</div>
<PhoneTemplate>
<div
class=
"time"
>
13:14
</div>
<ul
class=
"msg-ul"
>
<li
class=
"flex msg-li"
>
<el-avatar
shape=
"square"
size=
"small"
:src=
"require('@/assets/image/profile.jpg')"
></el-avatar>
<el-avatar
shape=
"square"
size=
"small"
:src=
"require('@/assets/image/profile.jpg')"
></el-avatar>
<div
class=
"msg"
>
{{
message
}}
</div>
</li>
<li
class=
"flex msg-li"
v-if=
"isOther"
>
<el-avatar
shape=
"square"
size=
"small"
:src=
"require('@/assets/image/profile.jpg')"
></el-avatar>
<el-avatar
shape=
"square"
size=
"small"
:src=
"require('@/assets/image/profile.jpg')"
></el-avatar>
<div
class=
"msg"
style=
"line-height: 0; padding: 5px"
>
<slot></slot>
</div>
</li>
<li
class=
"flex msg-li"
v-for=
"message in messageList"
:key=
"message"
>
<el-avatar
shape=
"square"
size=
"small"
:src=
"require('@/assets/image/profile.jpg')"
></el-avatar>
<el-avatar
shape=
"square"
size=
"small"
:src=
"require('@/assets/image/profile.jpg')"
></el-avatar>
<div
class=
"msg"
>
<slot
name=
"text"
v-bind:text=
"message"
></slot>
</div>
</li>
<li
class=
"flex msg-li"
v-for=
"image in imageList"
:key=
"image"
>
<el-avatar
shape=
"square"
size=
"small"
:src=
"require('@/assets/image/profile.jpg')"
></el-avatar>
<el-avatar
shape=
"square"
size=
"small"
:src=
"require('@/assets/image/profile.jpg')"
></el-avatar>
<div
class=
"msg"
style=
"line-height: 0; padding: 5px"
>
<slot
name=
"image"
v-bind:image=
"image"
></slot>
</div>
</li>
</ul>
</
div
>
</
PhoneTemplate
>
</
template
>
<
style
lang=
"scss"
scoped
>
.preview
{
width
:
219px
;
height
:
361px
;
background
:
#f5f5f5
;
.time
{
font-size
:
12px
;
color
:
#aaa
;
padding
:
10px
0
5px
;
text-align
:
center
;
}
.msg-ul
{
margin
:
0
;
padding
:
0
;
max-height
:
80%
;
overflow
:
auto
;
padding
:
0
10px
;
}
.msg-li
{
margin-bottom
:
10px
;
}
.msg
{
min-height
:
28px
;
background-color
:
#fff
;
border
:
1px
solid
#e4e6e9
;
display
:
inline-block
;
position
:
relative
;
text-align
:
left
;
font-size
:
14px
;
line-height
:
22px
;
padding
:
3px
6px
;
border-radius
:
4px
;
padding
:
15px
10px
;
line-height
:
1.25
;
.top
{
font-weight
:
600
;
}
.small
{
font-size
:
10px
;
}
.time
{
font-size
:
12px
;
color
:
#aaa
;
transform
:
scale
(
0.8
);
padding
:
10px
0
5px
;
}
.msg-ul
{
margin
:
0
;
padding
:
0
;
max-height
:
80%
;
overflow
:
auto
;
}
.msg-li
{
margin-bottom
:
10px
;
}
.msg
{
min-height
:
28px
;
background-color
:
#fff
;
border
:
1px
solid
#e4e6e9
;
display
:
inline-block
;
position
:
relative
;
text-align
:
left
;
font-size
:
14px
;
line-height
:
22px
;
padding
:
3px
6px
;
border-radius
:
4px
;
max-width
:
90%
;
min-width
:
24px
;
box-sizing
:
border-box
;
word-break
:
break-all
;
white-space
:
pre-line
;
margin-left
:
10px
;
&:before
{
content
:
' '
;
display
:
block
;
position
:
absolute
;
left
:
-6px
;
border-width
:
4px
6px
;
border-left
:
0
;
width
:
0
;
border-style
:
solid
;
border-color
:
transparent
;
border-right-color
:
#fff
;
top
:
10px
;
z-index
:
888
;
}
max-width
:
90%
;
min-width
:
24px
;
box-sizing
:
border-box
;
word-break
:
break-all
;
white-space
:
pre-line
;
margin-left
:
10px
;
&:before
{
content
:
' '
;
display
:
block
;
position
:
absolute
;
left
:
-6px
;
border-width
:
4px
6px
;
border-left
:
0
;
width
:
0
;
border-style
:
solid
;
border-color
:
transparent
;
border-right-color
:
#fff
;
top
:
10px
;
z-index
:
888
;
}
}
.el-avatar
{
...
...
linkwe-pc/src/components/PhoneTemplate.vue
View file @
defbf35
// 手机端背景框组件
<
template
>
<div
class=
"preview"
>
<div
class=
"preview-title"
>
{{
title
}}
</div>
<div
class=
"preview-content"
>
<slot
/>
<div
class=
"line"
></div>
<div
class=
"preview-bar"
v-if=
"isTab"
>
<i
class=
"el-icon-arrow-left"
></i>
{{
title
}}
<i
class=
"el-icon-more"
></i>
</div>
<el-scrollbar
class=
"preview-content"
wrap-class=
"scrollbar-wrapper"
>
<template>
<slot
/>
<!--
<div
class=
"bottom"
>
看到底啦~
</div>
-->
</
template
>
</el-scrollbar>
<div
class=
"line2"
></div>
</div>
</template>
<
script
>
export
default
{
components
:
{},
props
:
{
isTab
:
{
type
:
Boolean
,
default
:
true
,
},
title
:
{
type
:
String
,
default
:
'
小微
'
,
default
:
'
LinkWeChat
'
,
},
},
data
()
{
...
...
@@ -26,32 +40,84 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.preview
{
display
:
flex
;
flex-direction
:
column
;
margin
:
0
auto
;
padding
:
0
10px
;
position
:
relative
;
width
:
375px
;
height
:
800px
;
background
:
url(../assets/drainageCode/preview-bg.png)
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
.preview-title
{
width
:
var
(
--phone-width
);
max-width
:
375px
;
min-width
:
320px
;
height
:
820px
;
border
:
15px
solid
#ddd
;
border-radius
:
40px
;
box-sizing
:
content-box
;
overflow
:
hidden
;
background
:
#fff
;
.line
{
flex
:
none
;
width
:
65px
;
height
:
6px
;
margin
:
0
auto
6px
;
border-radius
:
0
0
50px
50px
;
background
:
#eee
;
border
:
10px
solid
#333
;
box-sizing
:
content-box
;
border-width
:
13px
62px
;
}
.line2
{
position
:
absolute
;
top
:
55px
;
width
:
120px
;
height
:
5px
;
bottom
:
0
;
left
:
50%
;
margin
:
15px
auto
;
border-radius
:
10px
;
background
:
#bbb
;
transform
:
translateX
(
-50%
);
z-index
:
10
;
}
.preview-bar
{
//
position
:
absolute
;
//
top
:
40px
;
//
left
:
50%
;
//
transform
:
translateX
(
-50%
);
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
0
10px
;
height
:
40px
;
width
:
100%
;
flex
:
none
;
font-size
:
14px
;
font-weight
:
4
00
;
font-weight
:
5
00
;
color
:
#333333
;
}
.preview-content
{
position
:
relative
;
height
:
calc
(
100%
-
120px
);
overflow-y
:
auto
;
top
:
88px
;
border-bottom-left-radius
:
20px
;
border-bottom-right-radius
:
20px
;
flex
:
auto
;
overflow
:
hidden
;
top
:
0
;
//
left
:
50%
;
//
transform
:
translateX
(
-50%
);
border-radius
:
0
0
20px
20px
;
background
:
#f8f8f8
;
}
::v-deep
{
.el-scrollbar__wrap
{
overflow-x
:
hidden
;
}
.el-scrollbar__bar
{
transform
:
scale
(
1
);
}
}
.bottom
{
padding
:
15px
0
20px
;
line-height
:
1
;
color
:
#999
;
text-align
:
center
;
}
}
</
style
>
linkwe-pc/src/styles/index.scss
View file @
defbf35
...
...
@@ -12,6 +12,7 @@
}
::-webkit-scrollbar-thumb
{
visibility
:
hidden
;
/*滚动条里面小方块*/
border-radius
:
5px
;
/*深色模式*/
...
...
@@ -25,6 +26,10 @@
border-bottom-width: 2px;*/
}
:hover::-webkit-scrollbar-thumb
{
visibility
:
visible
;
}
// ::-webkit-scrollbar-track {
// /*滚动条里面轨道*/
// -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
...
...
linkwe-pc/src/views/drainageCode/smartForms/add.vue
View file @
defbf35
...
...
@@ -9,52 +9,56 @@
</el-steps>
</div>
<div
class=
"g-card tab-content form1"
v-show=
"currentActive === 1"
>
<el-row>
<el-col
:span=
"10"
>
<el-form
ref=
"baseForm"
:rules=
"baseRules"
:model=
"baseForm"
label-position=
"left"
label-width=
"150px"
>
<el-form-item
label=
"表单名称"
prop=
"surveyName"
>
<el-input
v-model=
"baseForm.surveyName"
maxlength=
"15"
show-word-limit
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"表单分组"
prop=
"groupId"
>
<el-select
v-model=
"baseForm.groupId"
>
<el-option
v-for=
"item in codeCategoryList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"表单说明"
>
<el-switch
v-model=
"ifFormDescription"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
<div
v-if=
"ifFormDescription == 1"
>
<div
class=
"sub-des"
>
开启后,表单首页或表单顶部会有说明文案
</div>
<el-input
ref=
"msgTextarea"
type=
"textarea"
v-model=
"baseForm.formDescription"
maxlength=
"200"
show-word-limit
placeholder=
"请填写表单说明"
:autosize=
"
{ minRows: 5, maxRows: 20 }"
clearable />
</div>
</el-form-item>
<el-form-item
label=
"表单logo"
>
<el-switch
v-model=
"ifFormLogo"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
<div
v-if=
"ifFormLogo == 1"
>
<div
class=
"sub-des"
>
开启后,表单首页或表单顶部会有logo图
</div>
<upload
:fileUrl
.
sync=
"baseForm.formLogo"
class=
"image-uploader"
@
update:file=
"handleUploadedHeadImage"
>
<div
slot=
"tip"
>
建议大小2M以内,仅支持png/jpg等图片类型
</div>
</upload>
</div>
</el-form-item>
<el-form-item>
<el-button
plain
@
click
.
stop=
"CancelTheNewOne"
>
取消
</el-button>
<el-button
type=
"primary"
@
click
.
stop=
"nextStep(2)"
>
下一步
</el-button>
</el-form-item>
</el-form>
</el-col>
<el-col
:span=
"7"
>
<div
class=
"fxbw"
>
<el-form
style=
"width: 30%"
ref=
"baseForm"
:rules=
"baseRules"
:model=
"baseForm"
label-position=
"left"
label-width=
"80px"
>
<el-form-item
label=
"表单名称"
prop=
"surveyName"
>
<el-input
v-model=
"baseForm.surveyName"
maxlength=
"15"
show-word-limit
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"表单分组"
prop=
"groupId"
>
<el-select
v-model=
"baseForm.groupId"
>
<el-option
v-for=
"item in codeCategoryList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"表单说明"
>
<el-switch
v-model=
"ifFormDescription"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
<div
v-if=
"ifFormDescription == 1"
>
<div
class=
"sub-des"
>
开启后,表单首页或表单顶部会有说明文案
</div>
<el-input
ref=
"msgTextarea"
type=
"textarea"
v-model=
"baseForm.formDescription"
maxlength=
"200"
show-word-limit
placeholder=
"请填写表单说明"
:autosize=
"
{ minRows: 5, maxRows: 20 }"
clearable />
</div>
</el-form-item>
<el-form-item
label=
"表单logo"
>
<el-switch
v-model=
"ifFormLogo"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
<div
v-if=
"ifFormLogo == 1"
>
<div
class=
"sub-des"
>
开启后,表单首页或表单顶部会有logo图
</div>
<upload
:fileUrl
.
sync=
"baseForm.formLogo"
class=
"image-uploader"
@
update:file=
"handleUploadedHeadImage"
>
<div
slot=
"tip"
>
建议大小2M以内,仅支持png/jpg等图片类型
</div>
</upload>
</div>
</el-form-item>
<el-form-item>
<el-button
plain
@
click
.
stop=
"CancelTheNewOne"
>
取消
</el-button>
<el-button
type=
"primary"
@
click
.
stop=
"nextStep(2)"
>
下一步
</el-button>
</el-form-item>
</el-form>
<div>
<FormsDetail
:type=
"1"
:index=
"1"
...
...
@@ -68,8 +72,8 @@
<div
style=
"display: flex; justify-content: center"
>
<el-radio
v-model=
"visibility"
label=
"0"
>
独立首页
</el-radio>
</div>
</
el-col
>
<
el-col
:span=
"7"
>
</
div
>
<
div
>
<FormsDetail
:type=
"1"
:index=
"2"
...
...
@@ -84,8 +88,8 @@
<div
style=
"display: flex; justify-content: center"
>
<el-radio
v-model=
"visibility"
label=
"1"
>
表单首页
</el-radio>
</div>
</
el-col
>
</
el-row
>
</
div
>
</
div
>
</div>
<div
class=
"g-card tab-content"
style=
"height: calc(100vh - 216px)"
v-show=
"currentActive === 2"
>
<!--
<el-form
...
...
@@ -1537,10 +1541,6 @@ export default {
}
}
.preview-wrap
{
line-height
:
26px
;
}
.tip
{
color
:
#999
;
}
...
...
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