Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Damon
study
Commits
e4daab1b
Commit
e4daab1b
authored
Jul 12, 2021
by
Facius
Committed by
Damon
Jul 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:题库选择页面样式修改
parent
0c581937
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
195 additions
and
0 deletions
+195
-0
addExam.vue
src/pages/learn/addExam.vue
+195
-0
No files found.
src/pages/learn/addExam.vue
0 → 100644
View file @
e4daab1b
<
template
>
<view
class=
"select-category"
>
<u-navbar
back-icon-color=
"#333333"
background=
"transparent"
title=
"选择题库"
titleColor=
"#191C27"
:border-bottom=
"false"
title-bold
></u-navbar>
<!-- 类别 -->
<view>
<view
class=
"category-view"
>
<text>
{{
category
.
name
}}
</text>
</view>
</view>
<view
class=
"label-title"
>
<view>
题库列表
</view>
</view>
<view
class=
"add-exam-content"
>
<view
class=
"label-content"
>
<view
v-for=
"(label, index) in list"
:key=
"index"
class=
"label-item"
>
<!-- 选中为蓝底,非选中状态为白底 -->
<view
class=
"label-normal"
>
<view>
{{
label
.
name
}}
</view>
<view
class=
"label-text"
>
共
<text
class=
"label-blue"
>
{{
label
.
quantity
}}
</text>
道精编试题,通过率
<text
class=
"label-blue"
>
{{
label
.
pass
}}
</text>
</view>
</view>
<u-button
:customStyle=
"buttonStyle"
@
click=
"handleClick(index)"
>
<u-icon
name=
"plus"
></u-icon>
添加
</u-button>
</view>
</view>
<!-- 标签加载中 -->
<view
class=
"tag-loading-view"
v-if=
"loading"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<!-- 无供应商、无品牌 -->
<view
class=
"tag-loading-view"
v-else-if=
"list.length
<
=
0
"
>
暂无数据
</view>
</view>
</view>
</
template
>
<
script
>
import
uButton
from
'../../uview-ui/components/u-button/u-button.vue'
import
UIcon
from
'../../uview-ui/components/u-icon/u-icon.vue'
export
default
{
components
:
{
uButton
,
UIcon
},
data
()
{
return
{
category
:
{},
list
:
[],
// 题库列表
loading
:
true
,
}
},
computed
:
{
buttonStyle
()
{
return
{
width
:
'120rpx'
,
height
:
'64rpx'
,
backgroundColor
:
'#2953FF'
,
color
:
'#FFFFFF'
,
fontSize
:
'26rpx'
,
borderRadius
:
'12rpx'
,
}
},
},
onLoad
(
e
)
{
if
(
e
&&
e
.
name
)
{
this
.
category
.
name
=
decodeURIComponent
(
e
.
name
)
}
if
(
e
&&
e
.
id
)
{
this
.
category
.
id
=
e
.
id
}
this
.
loadList
()
// 获取题库列表
},
methods
:
{
// 点击了添加按钮
handleClick
(
index
)
{
this
.
selected
[
key
]
=
label
},
// 获取题库列表
loadList
()
{
// async loadList() {
// this.loading = true;
// let res = await this.$u.api.fileLabel({categoryId: this.category.id});
// this.loading = false
// if (res && res.code == 200) {
// this.list = res.data || [];
for
(
var
i
=
0
;
i
<
10
;
i
++
)
{
// 测试模拟多条数据
this
.
list
.
push
({
name
:
'登高架设作业'
,
quantity
:
'80000'
,
pass
:
'98%'
,
})
}
// }
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
::-webkit-scrollbar
{
width
:
0
;
height
:
0
;
color
:
transparent
;
display
:
none
;
}
.select-category
{
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
background-color
:
#f8fafd
;
background-image
:
linear-gradient
(
to
top
,
#f8fafd
0%
,
#e9f3ff
50%
);
background-size
:
100%
520rpx
;
background-repeat
:
no-repeat
;
padding
:
0
24rpx
0rpx
24rpx
;
.category-view
{
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
text-align
:
center
;
border-radius
:
12rpx
;
font-size
:
36rpx
;
font-weight
:
bold
;
background-color
:
#ffffff
;
color
:
#2953ff
;
height
:
160rpx
;
padding
:
0
60rpx
;
}
.label-title
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#9ea5bb
;
margin-bottom
:
30rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-top
:
40rpx
;
}
.add-exam-content
{
height
:
100%
;
overflow
:
auto
;
.label-content
{
margin-bottom
:
44rpx
;
.label-item
{
padding
:
40rpx
24rpx
40rpx
30rpx
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
margin-bottom
:
24rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.label-normal
{
width
:
470rpx
;
font-size
:
36rpx
;
color
:
#191c27
;
font-weight
:
bold
;
word-break
:
break-all
;
.label-text
{
margin-top
:
24rpx
;
font-size
:
26rpx
;
color
:
#5a6073
;
.label-blue
{
color
:
#2953ff
;
}
}
}
}
}
}
.tag-loading-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-top
:
400rpx
;
color
:
#999999
;
text-align
:
center
;
position
:
absolute
;
width
:
100%
;
padding-right
:
11rpx
;
}
}
</
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