@10yun/cv-mobile-ui 0.5.11 → 0.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,256 +0,0 @@
1
- <template>
2
- <view class="cv-row">
3
- <view class="cv-row-box">
4
- <view class="cv-row-main" :class="sublabel && 'cv-row-main-big'" @tap="jump">
5
- <view class="cv-row-main-left">
6
- <view class="cv-row-main-left-icon" v-if="image || $slots.before">
7
- <image class="cv-row-main-left-icon-image" :src="image" mode="aspectFit" v-if="image" />
8
- <slot name="before" v-else />
9
- </view>
10
- <view class="cv-row-main-left-text" :class="!image && !$slots.before ? 'cv-row-main-left-text-noimage' : ''">
11
- <view class="cv-row-main-left-text-intact" v-if="!sublabel">
12
- {{ label }}
13
- </view>
14
- <view class="cv-row-main-left-text-double" v-else>
15
- <view class="cv-row-main-left-text-label">
16
- {{ label }}
17
- </view>
18
- <view class="cv-row-main-left-text-sublabel">
19
- {{ sublabel }}
20
- </view>
21
- </view>
22
- </view>
23
- </view>
24
- <view class="cv-row-main-center" :class="url == '' && !$attrs.click ? 'cv-row-main-center-nourl' : ''">
25
- <view class="cv-row-main-center-intact" v-if="!subexplain">
26
- {{ explain }}
27
- </view>
28
- <view class="cv-row-main-center-double" v-else>
29
- <view class="cv-row-main-center-explain">
30
- {{ explain }}
31
- </view>
32
- <view class="cv-row-main-center-subexplain">
33
- {{ subexplain }}
34
- </view>
35
- </view>
36
- </view>
37
- <view class="cv-row-main-more" v-if="url || $attrs.click">
38
- <view class="cv-row-main-more-top"></view>
39
- <view class="cv-row-main-more-bottom"></view>
40
- </view>
41
- </view>
42
- <view class="cv-row-message" v-if="message">
43
- {{ message }}
44
- </view>
45
- </view>
46
- </view>
47
- </template>
48
-
49
- <script>
50
- export default {
51
- emits: ['click'],
52
- name: 'cvNavRow',
53
- options: {
54
- addGlobalClass: true
55
- },
56
- props: {
57
- url: {
58
- type: String,
59
- default: ''
60
- },
61
- urlType: {
62
- type: String,
63
- default() {
64
- return 'navigateTo';
65
- }
66
- },
67
- label: {
68
- type: String,
69
- default: ''
70
- },
71
- sublabel: {
72
- type: String,
73
- default: ''
74
- },
75
- explain: {
76
- type: String,
77
- default: ''
78
- },
79
- subexplain: {
80
- type: String,
81
- default: ''
82
- },
83
- image: {
84
- type: String,
85
- default: ''
86
- },
87
- message: {
88
- type: String,
89
- default: ''
90
- }
91
- },
92
- watch: {
93
- dataLists(newVal) {
94
- this._dealDataLists();
95
- }
96
- },
97
- data() {
98
- return {};
99
- },
100
- created() {
101
- // console.log(this.$slots);
102
- },
103
- methods: {
104
- jump() {
105
- if (typeof this.url == 'string' && this.url) {
106
- const url = this.url;
107
- switch (this.urlType) {
108
- case 'redirectTo': //关闭当前页面,跳转到应用内的某个页面。
109
- uni.redirectTo({
110
- url: this.url
111
- });
112
- break;
113
- case 'reLaunch': //关闭所有页面,打开到应用内的某个页面。
114
- uni.reLaunch({
115
- url: this.url
116
- });
117
- break;
118
- case 'switchTab': //跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。
119
- uni.switchTab({
120
- url: this.url
121
- });
122
- break;
123
- default: //默认【navigateTo】 保留当前页面,跳转到应用内的某个页面
124
- uni.navigateTo({
125
- url: this.url
126
- });
127
- }
128
- } else {
129
- this.$emit('click');
130
- }
131
- }
132
- }
133
- };
134
- </script>
135
- <style>
136
- /* #ifndef MP-WEIXIN */
137
- .cv-row:last-child .cv-row-main {
138
- border-bottom: none;
139
- }
140
- /* #endif */
141
- /* #ifdef MP-WEIXIN */
142
- cv-row:last-child .cv-row-main {
143
- border-bottom: none;
144
- }
145
- /* #endif */
146
- .cv-row-box {
147
- height: auto;
148
- background-color: #ffffff;
149
- padding-left: 15px;
150
- }
151
- .cv-row-main {
152
- padding: 5px 15px 5px 0;
153
- border-bottom: solid 1px #f1f1f1;
154
- display: flex;
155
- }
156
- .cv-row-main-big {
157
- padding: 9px 15px 9px 0;
158
- }
159
- .cv-row-main-left {
160
- width: 200px;
161
- display: flex;
162
- }
163
- .cv-row-main-left-icon {
164
- width: 20px;
165
- height: 40px;
166
- line-height: 40px;
167
- }
168
- .cv-row-main-left-icon-image {
169
- width: 20px;
170
- height: 40px;
171
- }
172
- .cv-row-main-left-text {
173
- width: calc(100% - 20px);
174
- padding-left: 10px;
175
- }
176
- .cv-row-main-left-text-noimage {
177
- width: 100%;
178
- padding-left: 0px;
179
- }
180
- .cv-row-main-left-text-intact {
181
- font-size: 15px;
182
- height: 40px;
183
- line-height: 40px;
184
- overflow: hidden;
185
- }
186
- .cv-row-main-left-text-label {
187
- font-size: 15px;
188
- line-height: 22px;
189
- height: 22px;
190
- overflow: hidden;
191
- }
192
- .cv-row-main-left-text-sublabel {
193
- font-size: 12px;
194
- color: #999999;
195
- line-height: 18px;
196
- height: 18px;
197
- overflow: hidden;
198
- }
199
- .cv-row-main-center {
200
- width: calc(100% - 200px - 20px);
201
- display: table;
202
- height: 40px;
203
- padding-left: 10px;
204
- }
205
- .cv-row-main-center-explain,
206
- .cv-row-main-center-subexplain {
207
- font-size: 14px;
208
- color: #999999;
209
- line-height: 20px;
210
- height: 20px;
211
- overflow: hidden;
212
- text-align: right;
213
- }
214
-
215
- .cv-row-main-center-nourl {
216
- width: calc(100% - 200px);
217
- }
218
- .cv-row-main-center-intact {
219
- font-size: 14px;
220
- color: #999999;
221
- display: table-row;
222
- vertical-align: middle;
223
- line-height: 20px;
224
- height: 40px;
225
- overflow: hidden;
226
- max-height: 40px;
227
- text-align: right;
228
- }
229
-
230
- .cv-row-main-more {
231
- height: 40px;
232
- width: 20px;
233
- }
234
- .cv-row-main-more-top,
235
- .cv-row-main-more-bottom {
236
- width: 10px;
237
- height: 2px;
238
- background-color: #c1c1c1;
239
- position: relative;
240
- left: 10px;
241
- }
242
- .cv-row-main-more-top {
243
- transform: rotate(45deg);
244
- top: 16px;
245
- }
246
- .cv-row-main-more-bottom {
247
- transform: rotate(-45deg);
248
- top: 20px;
249
- }
250
- .cv-row-message {
251
- font-size: 13px;
252
- color: #999999;
253
- line-height: 1.5em;
254
- padding: 5px 15px 5px 0;
255
- }
256
- </style>