Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-file-upload
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 ca35899b
authored
Feb 22, 2022
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改上传资料页面展示三个的样式
1 parent
c77c2fa8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
src/views/upload/index.vue
src/views/upload/index.vue
View file @
ca35899
...
...
@@ -7,8 +7,8 @@
<span>
{{
item
.
attachmentName
}}
</span>
</div>
<div
class=
"main_pannel"
@
click=
"toClickUpoload(item)"
>
<van-uploader
v-if=
"loadingFinish"
:before-delete=
"beforeDelete"
:after-read=
"afterRread"
preview-size=
"102px
"
v-model=
"fileURL[item.attachmentCode]"
max-count=
"4"
>
<div
class=
"box_wrap flex_ccc"
style=
"width:102px;height:102px
"
>
<van-uploader
v-if=
"loadingFinish"
:before-delete=
"beforeDelete"
:after-read=
"afterRread"
:preview-size=
"size
"
v-model=
"fileURL[item.attachmentCode]"
max-count=
"4"
>
<div
class=
"box_wrap flex_ccc"
:style=
"
{width:size,height:size}
">
<van-icon
name=
"add-o"
size=
"20px"
color=
"#999999"
/>
<p>
添加
</p>
</div>
...
...
@@ -33,10 +33,14 @@ export default {
],
uploadList
:
[],
fileURL
:
{},
loadingFinish
:
false
loadingFinish
:
false
,
size
:
'102px'
}
},
created
()
{},
created
()
{
// console.log(window.screen.width);
this
.
computedWidth
()
},
mounted
()
{
const
packageCode
=
this
.
$route
.
params
.
packageCode
const
contractNo
=
this
.
$route
.
params
.
contractNo
...
...
@@ -45,6 +49,12 @@ export default {
this
.
packageCode
=
packageCode
},
methods
:
{
// 根据手机屏幕宽度计算图片宽度
computedWidth
(){
const
screen
=
window
.
screen
.
width
const
imageW
=
(
screen
-
(
16
*
2
+
10
*
2
+
6.8256
*
3
))
/
3
this
.
size
=
`
${
imageW
}
px`
},
// 获取附件信息
getFileInof
(
packageCode
,
contractNo
)
{
upload
.
fileInfoApi
({
packageCode
}).
then
(
res
=>
{
...
...
@@ -165,7 +175,7 @@ export default {
}
.main_pannel
{
box-sizing
:
border-box
;
padding
:
0
0px
0
10px
;
padding
:
0
10px
;
display
:
flex
;
flex-wrap
:
wrap
;
.box_wrap
{
...
...
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