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
9497f9d6
Commit
9497f9d6
authored
Jul 09, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 我的题库组件
parent
d8a9fcb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
132 additions
and
0 deletions
+132
-0
index.vue
src/components/my-subject/index.vue
+68
-0
readme.md
src/components/my-subject/readme.md
+64
-0
No files found.
src/components/my-subject/index.vue
0 → 100644
View file @
9497f9d6
<
template
>
<view
class=
"u-flex my-details"
>
<view
class=
"u-flex u-row-between top"
>
<view>
{{
time
}}
</view>
<view>
{{
status
}}
</view>
</view>
<view
class=
"u-flex bottom"
>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"subtitle"
>
{{
subtitle
}}
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
'mySubject'
,
props
:
{
time
:
{
type
:
String
,
default
:
''
,
},
status
:
{
type
:
String
,
default
:
''
,
},
title
:
{
type
:
String
,
default
:
''
,
},
subtitle
:
{
type
:
String
,
default
:
''
,
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.my-details
{
width
:
100%
;
flex-flow
:
column
;
background
:
#fbfbfb
;
.top
{
width
:
100%
;
font-size
:
24rpx
;
color
:
#797979
;
padding
:
20rpx
;
}
.bottom
{
width
:
100%
;
flex-flow
:
column
;
padding
:
30rpx
20rpx
;
border-top
:
1px
solid
#fff
;
.title
{
flex
:
1
;
margin-right
:
auto
;
font-size
:
32rpx
;
color
:
#101010
;
}
.subtitle
{
flex
:
1
;
margin-right
:
auto
;
margin-top
:
20rpx
;
font-size
:
24rpx
;
color
:
#ff9e62
;
}
}
}
</
style
>
src/components/my-subject/readme.md
0 → 100644
View file @
9497f9d6
## 我的题库
```
我的题库组件,用于个人中心题库展示
```
## API
### Props
| 属性名 | 类型 | 默认值 | 可选值 | 说明 |
| :------: | :----: | :----: | :----: | :--------------------: |
| time | String | - | - | 绑卡成功或支付成功时间 |
| status | String | - | - | 题库状态 |
| title | String | - | - | 标题/题库名称 |
| subtitle | String | - | - | 副标题 |
## 组件用法
### 基础用法
```
html
<my-subject
v-for=
"(item, index) in lists"
:key=
"index"
:time=
"item.time"
:status=
"item.status"
:title=
"item.title"
:subtitle=
"item.subtitle"
></my-subject>
```
```
javascript
import
mySubject
from
'@/components/my-subject/index.vue'
export
default
{
components
:
{
mySubject
,
},
data
()
{
return
{
lists
:
[
{
time
:
'2021.06.25 18:06'
,
status
:
'已激活'
,
title
:
'高处安装、维护、拆除作业人员'
,
subtitle
:
'题库将于48天后到期'
,
},
{
time
:
'2021.05.25 14:05'
,
status
:
'已绑定'
,
title
:
'高处安装、维护、拆除作业人员'
,
subtitle
:
'题库将于88天后到期'
,
},
{
time
:
'2021.07.25 11:06'
,
status
:
'已失效'
,
title
:
'高处安装、维护、拆除作业人员'
,
subtitle
:
'题库已过期'
,
},
],
}
},
}
```
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