Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Codet
mini-vote
提交
4c099ce1
M
mini-vote
项目概览
Codet
/
mini-vote
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mini-vote
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4c099ce1
编写于
9月 10, 2020
作者:
N
nenyah
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(detail.vue): add style
上级
94c79731
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
139 addition
and
13 deletion
+139
-13
src/components/detail-video/detail-video.vue
src/components/detail-video/detail-video.vue
+33
-0
src/components/rank-item/rank-item.vue
src/components/rank-item/rank-item.vue
+1
-1
src/components/stats/stats.vue
src/components/stats/stats.vue
+3
-2
src/components/sub-title/sub-title.vue
src/components/sub-title/sub-title.vue
+31
-0
src/components/vote-list/vote-list.vue
src/components/vote-list/vote-list.vue
+2
-2
src/mock/store.ts
src/mock/store.ts
+3
-3
src/pages/detail/detail.vue
src/pages/detail/detail.vue
+66
-5
未找到文件。
src/components/detail-video/detail-video.vue
0 → 100644
浏览文件 @
4c099ce1
<!--
* @Description: 视频
* @Author: Steven
* @Date: 2020-09-10 15:15:21
* @LastEditors: Steven
* @LastEditTime: 2020-09-10 16:26:37
-->
<
template
>
<view>
<view
class=
"uni-padding-wrap uni-common-mt"
>
<view>
<video
id=
"myVideo"
src=
"#"
controls
></video>
</view>
</view>
</view>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
"
vue
"
export
default
Vue
.
extend
({
data
()
{
return
{
src
:
""
,
}
},
})
</
script
>
<
style
></
style
>
src/components/rank-item/rank-item.vue
浏览文件 @
4c099ce1
...
...
@@ -3,7 +3,7 @@
* @Author: Steven
* @Date: 2020-09-08 15:49:57
* @LastEditors: Steven
* @LastEditTime: 2020-09-10
09:29:01
* @LastEditTime: 2020-09-10
16:38:55
-->
<
template
>
<view>
...
...
src/components/stats/stats.vue
浏览文件 @
4c099ce1
...
...
@@ -3,7 +3,7 @@
* @Author: Steven
* @Date: 2020-09-08 09:22:09
* @LastEditors: Steven
* @LastEditTime: 2020-09-10 1
1:29:31
* @LastEditTime: 2020-09-10 1
3:08:22
-->
<
template
>
<view
class=
"px-4 pt-2"
>
...
...
@@ -13,7 +13,7 @@
<view
class=
"flex"
>
<view
class=
"flex-1"
v-for=
"(item, index) in content"
:key=
"index"
>
<view
class=
"text-gray-100 text-center text-xl"
>
{{
item
.
value
}}
{{
item
.
value
}}
{{
isDetail
?
'
票
'
:
''
}}
</view>
<view
class=
"text-yellow-900 text-center"
>
{{
item
.
name
}}
...
...
@@ -34,6 +34,7 @@ export default Vue.extend({
},
props
:
{
content
:
Array
,
isDetail
:
Boolean
,
},
onLoad
()
{},
methods
:
{},
...
...
src/components/sub-title/sub-title.vue
0 → 100644
浏览文件 @
4c099ce1
<!--
* @Description:
* @Author: Steven
* @Date: 2020-09-10 14:57:59
* @LastEditors: Steven
* @LastEditTime: 2020-09-10 15:02:14
-->
<
template
>
<view
class=
"text-gray-100 flex w-full text-center justify-center content-center my-2 py-1"
>
<view
class=
"fa fa-chevron-right"
></view>
<view
class=
"fa fa-chevron-right"
></view>
<view
class=
"fa fa-chevron-right"
></view>
<view
class=
"mx-2"
>
{{
content
}}
</view>
<view
class=
"fa fa-chevron-left"
></view>
<view
class=
"fa fa-chevron-left"
></view>
<view
class=
"fa fa-chevron-left"
></view>
</view>
</
template
>
<
script
lang=
"ts"
>
import
Vue
from
'
vue
'
export
default
Vue
.
extend
({
props
:{
content
:
String
}
})
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/components/vote-list/vote-list.vue
浏览文件 @
4c099ce1
...
...
@@ -3,7 +3,7 @@
* @Author: Steven
* @Date: 2020-09-08 09:24:10
* @LastEditors: Steven
* @LastEditTime: 2020-09-
08 16:26:59
* @LastEditTime: 2020-09-
10 16:42:04
-->
<
template
>
<view
class=
"text-gray-100"
>
...
...
@@ -16,7 +16,7 @@
</view>
</view>
<block
v-for=
"(item, index) in items"
:key=
"item.id"
>
<view
v-if=
"isIndex"
>
<view
class=
""
v-if=
"isIndex"
>
<vote-item
:item=
"item"
></vote-item>
</view>
<view
v-else
>
...
...
src/mock/store.ts
浏览文件 @
4c099ce1
...
...
@@ -3,7 +3,7 @@
* @Author: Steven
* @Date: 2020-09-07 17:00:45
* @LastEditors: Steven
* @LastEditTime: 2020-09-10 1
1:00:59
* @LastEditTime: 2020-09-10 1
3:04:26
*/
export
interface
Iitem
{
id
:
Number
...
...
@@ -16,8 +16,8 @@ export interface Iitem {
diffLast
:
Number
}
export
interface
Iinfo
{
name
:
s
tring
value
:
n
umber
name
:
S
tring
value
:
N
umber
}
export
const
items
:
Array
<
Iitem
>
=
[
{
...
...
src/pages/detail/detail.vue
浏览文件 @
4c099ce1
...
...
@@ -3,12 +3,29 @@
* @Author: Steven
* @Date: 2020-09-08 08:48:06
* @LastEditors: Steven
* @LastEditTime: 2020-09-10 1
0:46:49
* @LastEditTime: 2020-09-10 1
5:58:28
-->
<
template
>
<view
class=
"bg-purple"
>
<!-- 标题 -->
<title></title>
<stats></stats>
<!-- 统计票数 -->
<stats
:content=
"getStats"
:isDetail=
"true"
>
<view
class=
"text-2xl text-gray-100 font-bold w-full text-center mt-4"
>
投票
</view
>
</stats>
<!-- 选手详情 -->
<sub-title
:content=
"title1"
></sub-title>
<!-- 选手图片 -->
<vote-item
:item=
"item"
></vote-item>
<!-- 风采展示 -->
<sub-title
:content=
"title2"
></sub-title>
<detail-video></detail-video>
<!-- 选手简介 -->
<sub-title
:content=
"title3"
></sub-title>
<!-- 脚注 -->
<vote-footer></vote-footer>
</view>
</
template
>
...
...
@@ -16,13 +33,57 @@
import
Vue
from
"
vue
"
import
title
from
"
@/components/title/title.vue
"
import
stats
from
"
@/components/stats/stats.vue
"
import
voteItem
from
"
@/components/vote-item/vote-item.vue
"
import
voteFooter
from
"
@/components/footer/footer.vue
"
import
subTitle
from
"
@/components/sub-title/sub-title.vue
"
import
detailVideo
from
"
@/components/detail-video/detail-video.vue
"
import
{
items
,
Iinfo
,
Iitem
}
from
"
@/mock/store
"
export
default
Vue
.
extend
({
data
()
{
return
{}
return
{
items
,
id
:
0
,
item
:
{},
title1
:
"
选手详情
"
,
title2
:
"
选手风采
"
,
title3
:
"
选手简介
"
,
}
},
onLoad
(
query
)
{
console
.
log
(
query
)
this
.
id
=
+
query
?.
id
let
[
item
]
=
this
.
items
.
filter
((
el
)
=>
el
.
id
===
this
.
id
)
this
.
item
=
item
},
components
:
{
title
,
stats
,
title
,
stats
,
voteItem
,
voteFooter
,
subTitle
,
detailVideo
,
},
computed
:
{
getStats
():
Array
<
Iinfo
>
{
let
[
item
]
=
this
.
items
.
filter
((
el
)
=>
el
.
id
===
this
.
id
)
console
.
log
(
"
item:
"
,
item
)
return
[
{
name
:
"
当前票数
"
,
value
:
item
?.
vote
,
},
{
name
:
"
排名
"
,
value
:
item
?.
rank
,
},
{
name
:
"
距上一名
"
,
value
:
item
?.
diffLast
,
},
]
},
},
})
</
script
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录