Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
2a417b4e
Commit
2a417b4e
authored
Aug 18, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文章组件优化
parent
4c2cfcc7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
16 deletions
+37
-16
src/components/content/information/articleItem.vue
+7
-4
src/components/content/information/index.vue
+30
-12
No files found.
src/components/content/information/articleItem.vue
View file @
2a417b4e
...
@@ -149,7 +149,6 @@ img {
...
@@ -149,7 +149,6 @@ img {
padding-bottom
:
0.84em
;
padding-bottom
:
0.84em
;
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
overflow
:
hidden
;
width
:
100%
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.img
{
.img
{
width
:
100%
;
width
:
100%
;
...
@@ -235,7 +234,7 @@ img {
...
@@ -235,7 +234,7 @@ img {
}
}
//
大图模式
//
大图模式
.articleItem1
{
.articleItem1
{
margin
-top
:
10px
;
margin
:
10px
10px
0
;
.img
{
.img
{
height
:
140px
;
height
:
140px
;
}
}
...
@@ -260,9 +259,11 @@ img {
...
@@ -260,9 +259,11 @@ img {
.articleItem3
{
.articleItem3
{
display
:
inline-block
;
display
:
inline-block
;
margin-top
:
0
;
margin-top
:
0
;
width
:
49%
;
width
:
calc
(
50%
-
15px
);
box-sizing
:
border-box
;
vertical-align
:
top
;
vertical-align
:
top
;
white-space
:
normal
;
white-space
:
normal
;
margin-left
:
10px
;
.img
{
.img
{
height
:
140px
;
height
:
140px
;
}
}
...
@@ -281,7 +282,7 @@ img {
...
@@ -281,7 +282,7 @@ img {
}
}
}
}
.articleItem3
:nth-child
(
2n
)
{
.articleItem3
:nth-child
(
2n
)
{
margin-left
:
2%
;
margin-left
:
10px
;
}
}
.articleItem3
:not
(
:nth-child
(
-1n
+
2
))
{
.articleItem3
:not
(
:nth-child
(
-1n
+
2
))
{
margin-top
:
10px
;
margin-top
:
10px
;
...
@@ -293,6 +294,7 @@ img {
...
@@ -293,6 +294,7 @@ img {
width
:
42%
;
width
:
42%
;
vertical-align
:
top
;
vertical-align
:
top
;
white-space
:
normal
;
white-space
:
normal
;
margin-left
:
10px
;
.img
{
.img
{
height
:
140px
;
height
:
140px
;
}
}
...
@@ -312,6 +314,7 @@ img {
...
@@ -312,6 +314,7 @@ img {
}
}
.articleItem4
:not
(
:first-of-type
)
{
.articleItem4
:not
(
:first-of-type
)
{
margin-left
:
2%
;
margin-left
:
2%
;
margin-right
:
10px
;
}
}
//
一大多小
//
一大多小
.articleItem5
{
.articleItem5
{
...
...
src/components/content/information/index.vue
View file @
2a417b4e
...
@@ -21,15 +21,6 @@
...
@@ -21,15 +21,6 @@
<div
<div
class=
"articleList clearfix"
class=
"articleList clearfix"
:class=
"[cartStyle==2&&listStyle==5?'my-hairline--all':'',listStyle==4?'articleList-wibkit':'',listStyle==4?'articleListNowrap':'']"
:class=
"[cartStyle==2&&listStyle==5?'my-hairline--all':'',listStyle==4?'articleList-wibkit':'',listStyle==4?'articleListNowrap':'']"
:style=
"
{'box-shadow':cartStyle==1
&&
listStyle==5?'0px 0px 5px 0px #ccc':'',
'--border_color':'#D8D8D8',
'border-radius':cartRadius==1
&&
listStyle==5?'8px':'',
'--border_radius':cartRadius==1
&&
listStyle==5?'8px':'',
'background':listStyle==5?bgColor:'',
'overflow':listStyle==5?'hidden':'',
'position':listStyle==2?'relative':''}
"
>
>
<div
v-if=
"listStyle==4"
>
<div
v-if=
"listStyle==4"
>
<div
class=
"prev-btn"
v-if=
"loading"
>
<div
class=
"prev-btn"
v-if=
"loading"
>
...
@@ -39,7 +30,15 @@
...
@@ -39,7 +30,15 @@
<i
class=
"ant-fanhui-line"
></i>
<i
class=
"ant-fanhui-line"
></i>
</div>
</div>
</div>
</div>
<div
v-if=
"listStyle!=2"
>
<div
v-if=
"listStyle!=2"
:class=
"['articleList'+listStyle]"
:style=
"
{'box-shadow':cartStyle==1
&&
listStyle==5?'0px 0px 5px 0px #ccc':'',
'--border_color':'#D8D8D8',
'border-radius':cartRadius==1
&&
listStyle==5?'8px':'',
'--border_radius':cartRadius==1
&&
listStyle==5?'8px':'',
'background':listStyle==5?bgColor:'',
'overflow':listStyle==5?'hidden':'',
'position':listStyle==2?'relative':''}
">
<articleItem
<articleItem
v-for=
"(item,index) in articityList"
v-for=
"(item,index) in articityList"
:key=
"index"
:key=
"index"
...
@@ -68,6 +67,7 @@
...
@@ -68,6 +67,7 @@
></articleItem>
></articleItem>
</div>
</div>
</div>
</div>
<div
class=
"center"
></div>
<div
class=
"right"
>
<div
class=
"right"
>
<div
v-for=
"(item,index) in articityList"
:key=
"index"
>
<div
v-for=
"(item,index) in articityList"
:key=
"index"
>
<articleItem
<articleItem
...
@@ -519,7 +519,6 @@ export default {
...
@@ -519,7 +519,6 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.information
{
.information
{
padding
:
10px
;
font-size
:
12px
;
font-size
:
12px
;
}
}
...
@@ -580,6 +579,7 @@ export default {
...
@@ -580,6 +579,7 @@ export default {
.articleList
{
.articleList
{
width
:
100%
;
width
:
100%
;
margin-top
:
10px
;
margin-top
:
10px
;
box-sizing
:
border-box
;
.prev-btn,
.prev-btn,
.next-btn
{
.next-btn
{
position
:
absolute
;
position
:
absolute
;
...
@@ -614,13 +614,31 @@ export default {
...
@@ -614,13 +614,31 @@ export default {
.articleList-wibkit
::-webkit-scrollbar
{
.articleList-wibkit
::-webkit-scrollbar
{
display
:
none
;
display
:
none
;
}
}
//
一行两个
.articleList3
{
display
:
flex
;
flex-wrap
:
wrap
;
box-sizing
:
border-box
;
}
//
一大多小、详细列表
.articleList5
,
.articleList6
{
margin
:
0
10px
;
}
//
瀑布流
//
瀑布流
.waterfallFlow
{
.waterfallFlow
{
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
.left,.right{
.left,.right{
width
:
49%
;
width
:
49%
;
}
}
.center
{
width
:
10px
;
}
.left
{
padding-left
:
10px
;
}
.right
{
padding-right
:
10px
;
}
}
}
}
}
</
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