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
48b8d2cf
Commit
48b8d2cf
authored
Mar 13, 2020
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评论l列表组件封装
parent
e69cba05
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
126 additions
and
14 deletions
+126
-14
src/components/livedModel/livedControls.vue
+5
-1
src/components/livedModel/livedExplainGoods.vue
+16
-13
src/components/livedModel/livedIsMsg.vue
+105
-0
No files found.
src/components/livedModel/livedControls.vue
View file @
48b8d2cf
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
<div
class=
"livedControls"
>
<div
class=
"livedControls"
>
<!-- 公告层 -->
<!-- 公告层 -->
<livedAnnouncement></livedAnnouncement>
<livedAnnouncement></livedAnnouncement>
<!-- 评论层 -->
<livedIsMsg></livedIsMsg>
<!-- 底部控制层 -->
<!-- 底部控制层 -->
<div
class=
"control flex"
>
<div
class=
"control flex"
>
<div
class=
"goodsImg"
>
<div
class=
"goodsImg"
>
...
@@ -24,13 +26,15 @@
...
@@ -24,13 +26,15 @@
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
import
livedAnnouncement
from
"@/components/livedModel/livedAnnouncement"
;
import
livedAnnouncement
from
"@/components/livedModel/livedAnnouncement"
;
import
livedIsMsg
from
"@/components/livedModel/livedIsMsg"
;
export
default
{
export
default
{
name
:
""
,
name
:
""
,
data
()
{
data
()
{
return
{}
return
{}
},
},
components
:
{
components
:
{
livedAnnouncement
livedAnnouncement
,
livedIsMsg
},
},
computed
:
{},
computed
:
{},
created
()
{},
created
()
{},
...
...
src/components/livedModel/lived
Comment
.vue
→
src/components/livedModel/lived
ExplainGoods
.vue
View file @
48b8d2cf
<
template
>
<
template
>
<div
class=
"livedComment"
>
<!-- 讲解商品模块 -->
<div
class=
"livedExplainGoods"
>
</div>
</div>
</
template
>
</
template
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
export
default
{
name
:
""
,
name
:
""
,
data
()
{
data
()
{
return
{}
return
{};
},
},
components
:
{},
components
:
{},
computed
:
{},
computed
:
{},
created
()
{},
created
()
{},
mounted
()
{},
mounted
()
{},
methods
:
{}
methods
:
{}
}
}
;
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.livedExplainGoods
{
}
</
style
>
</
style
>
src/components/livedModel/livedIsMsg.vue
0 → 100644
View file @
48b8d2cf
<
template
>
<!-- 评论模块 -->
<div
class=
"livedIsMsg"
>
<div
class=
"list"
>
<scroll-view
:style=
"
{'height': '24vh','width':'52vw;'}" :scroll-y="true" :scroll-top="scrollTop" @scrolltolower="scrolltolower">
<div
class=
"item flex"
v-for=
"(item,index) in list"
:key=
"index"
>
<div
class=
"user"
>
<p
class=
"live"
></p>
<div
class=
"name"
>
<span
class=
"user"
>
用户
{{
index
}}
:
</span><span
class=
"test"
>
{{
item
.
val
}}
</span>
</div>
</div>
</div>
</scroll-view>
</div>
</div>
</
template
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
name
:
""
,
data
()
{
return
{
list
:
[
{
val
:
"测试测试测试测"
},
{
val
:
"评论了直播"
},
{
val
:
"测试测试测试测评论了直播"
},
{
val
:
"测试测试测评论了直播试测试"
},
{
val
:
"测试测试测试测试测试测试"
},
{
val
:
"测试测试测试测试测试测试"
}
],
scrollTop
:
0
,
};
},
components
:
{},
computed
:
{},
created
()
{},
onLoad
(){
setInterval
(()
=>
{
this
.
list
.
push
({
val
:
'测试'
+
Math
.
random
(),
})
this
.
scrollTop
=
this
.
list
.
length
*
1000
;
},
2000
);
},
mounted
()
{},
methods
:
{
scrolltolower
(){
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
/* 一行否则出现省略号 */
.line-clamp1
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
1
;
-webkit-box-orient
:
vertical
;
}
.livedIsMsg
{
margin-left
:
12px
;
padding
:
8px
;
margin-bottom
:
10px
;
position
:
relative
;
.list
{
width
:
50vw
;
max-height
:
24vh
;
overflow
:
hidden
;
bottom
:
0
;
.item
{
width
:
50vw
;
padding
:
4px
0
;
display
:
flex
;
align-items
:
flex-start
;
.user
{
.name
{
color
:
#f9a93c
;
font-size
:
14px
;
}
}
.test
{
font-size
:
14px
;
color
:
#f1f1f1
;
word-break
:
break-all
;
}
}
}
}
</
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