Repository navigation
Expand file tree
/
Copy pathlist.nvue
More file actions
155 lines (138 loc) · 3.59 KB
/
Copy pathlist.nvue
File metadata and controls
155 lines (138 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<template>
<view>
<text class="example-info">列表组件可以在其中使用图标、略缩图或放置任何你想放的元素,使用场景如:导航菜单、列表、设置中心排版等</text>
<uni-section title="基础用法" type="line"></uni-section>
<uni-list>
<uni-list-item :show-arrow="false" title="列表文字" />
<uni-list-item :show-arrow="false" title="列表文字" note="列表描述信息" />
<uni-list-item :disabled="true" :show-arrow="false" title="列表禁用状态" />
</uni-list>
<uni-section title="菜单列表" type="line"></uni-section>
<uni-list>
<uni-list-item title="列表右侧带箭头" rightText="右侧文字" />
<uni-list-item title="右侧插槽" :showArrow="false">
<template v-slot:right="">
<image style="width: 40px;height: 40px;" src="/static/logo.png" mode="widthFix"></image>
</template>
</uni-list-item>
<uni-list-item :show-badge="true" title="列表右侧带箭头 + 角标" badge-text="12" />
<uni-list-item title="列表左侧带略缩图" thumb="https://img-cdn-qiniu.dcloud.net.cn/new-page/uni.png" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" title="列表左侧带扩展图标" />
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" :show-switch="true" title="列表右侧带 switch" @switchChange="switchChange" />
<uni-list-item :disabled="true" :show-extra-icon="true" :extra-icon="extraIcon2" :show-switch="true" :switch-checked="true" title="禁用状态" @switchChange="switchChange" />
</uni-list>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
extraIcon1: {
color: '#007aff',
size: '22',
type: 'gear-filled'
},
extraIcon2: {
color: '#4cd964',
size: '22',
type: 'image'
}
}
},
methods: {
switchChange(e) {
uni.showToast({
title: 'change:' + e.value,
icon: 'none'
})
}
}
}
</script>
<style>
/* 头条小程序组件内不能引入字体 */
/* #ifdef MP-TOUTIAO */
@font-face {
font-family: uniicons;
font-weight: normal;
font-style: normal;
src: url('~@/static/uni.ttf') format('truetype');
}
/* #endif */
/* #ifndef APP-NVUE */
page {
display: flex;
flex-direction: column;
box-sizing: border-box;
background-color: #efeff4;
min-height: 100%;
height: auto;
}
view {
font-size: 14px;
line-height: inherit;
}
.example {
padding: 0 15px 15px;
}
.example-info {
padding: 15px;
color: #3b4144;
background: #ffffff;
}
.example-body {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
padding: 0;
font-size: 14px;
background-color: #ffffff;
}
/* #endif */
.example {
padding: 0 15px;
}
.example-info {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
padding: 15px;
color: #3b4144;
background-color: #ffffff;
font-size: 14px;
line-height: 20px;
}
.example-info-text {
font-size: 14px;
line-height: 20px;
color: #3b4144;
}
.example-body {
flex-direction: column;
padding: 15px;
background-color: #ffffff;
}
.word-btn-white {
font-size: 18px;
color: #FFFFFF;
}
.word-btn {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
border-radius: 6px;
height: 48px;
margin: 15px;
background-color: #007AFF;
}
.word-btn--hover {
background-color: #4ca2ff;
}
</style>