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

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.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@10yun/cv-mobile-ui",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "description": "十云cvjs移动端ui,适用uniapp",
5
- "author": "",
5
+ "author": "10yun",
6
6
  "license": "Apache-2.0",
7
7
  "homepage": "https://cvjs.cn/cv-mobile-ui/",
8
8
  "publishConfig": {
@@ -0,0 +1,223 @@
1
+ <template>
2
+ <view class="cv-cell-box">
3
+ <view class="cv-cell-main-box" :class="isBottom && 'cv-cell-main-big'" @tap="bingClick">
4
+ <view class="cv-cell-left-box">
5
+ <view class="cv-cell-left-icon" v-if="leftIcon || $slots.leftIcon">
6
+ <slot name="leftIcon">
7
+ <image class="cv-cell-left-image" :src="leftIcon" mode="aspectFit" />
8
+ </slot>
9
+ </view>
10
+ <view class="cv-cell-left-content">
11
+ <view class="cv-cell-left-content-top" v-if="leftTop || $slots.leftTop">
12
+ <slot name="leftBottom">{{ leftTop }}</slot>
13
+ </view>
14
+ <view class="cv-cell-left-content-bottom" v-if="leftBottom || $slots.leftBottom">
15
+ <slot name="leftBottom">{{ leftBottom }}</slot>
16
+ </view>
17
+ </view>
18
+ </view>
19
+ <view class="cv-cell-right-box">
20
+ <view class="cv-cell-right-content">
21
+ <view class="cv-cell-right-content-top" v-if="rightTop || $slots.rightTop">
22
+ <slot name="rightBottom">{{ rightTop }}</slot>
23
+ </view>
24
+ <view class="cv-cell-right-content-bottom" v-if="rightBottom || $slots.rightBottom">
25
+ <slot name="rightBottom">{{ rightBottom }}</slot>
26
+ </view>
27
+ </view>
28
+ <view class="cv-cell-right-icon" v-if="rightIcon || $slots.rightIcon">
29
+ <slot name="rightIcon">
30
+ <view class="cv-cell-right-icon-top"></view>
31
+ <view class="cv-cell-right-icon-bottom"></view>
32
+ </slot>
33
+ </view>
34
+ </view>
35
+ </view>
36
+ </view>
37
+ </template>
38
+
39
+ <script>
40
+ export default {
41
+ emits: ['click'],
42
+ name: 'cvCell',
43
+ options: {
44
+ addGlobalClass: true
45
+ },
46
+ props: {
47
+ leftIcon: {
48
+ type: String,
49
+ default: ''
50
+ },
51
+ leftTop: {
52
+ type: String,
53
+ default: ''
54
+ },
55
+ leftBottom: {
56
+ type: String,
57
+ default: ''
58
+ },
59
+ rightTop: {
60
+ type: String,
61
+ default: ''
62
+ },
63
+ rightBottom: {
64
+ type: String,
65
+ default: ''
66
+ },
67
+ rightIcon: {
68
+ type: Boolean,
69
+ default: false
70
+ }
71
+ },
72
+ computed: {
73
+ isBottom() {
74
+ return this.leftBottom || this.rightBottom || this.$slots.leftBottom || this.$slots.rightBottom;
75
+ }
76
+ },
77
+ data() {
78
+ return {};
79
+ },
80
+ created() {
81
+ // console.log(this.$slots);
82
+ },
83
+ methods: {
84
+ bingClick() {
85
+ this.$emit('click');
86
+ }
87
+ }
88
+ };
89
+ </script>
90
+ <style>
91
+ .cv-cell-box {
92
+ height: auto;
93
+ background-color: #ffffff;
94
+ padding-left: 10px;
95
+ }
96
+ .cv-cell-main-box {
97
+ padding: 5px 10px 5px 0;
98
+ border-bottom: solid 1px #f1f1f1;
99
+ display: flex;
100
+ flex-direction: row;
101
+ justify-content: space-between;
102
+ }
103
+ /* #ifndef MP-WEIXIN */
104
+ .cv-cell-box:last-child .cv-cell-main-box {
105
+ border-bottom: none;
106
+ }
107
+ /* #endif */
108
+ /* #ifdef MP-WEIXIN */
109
+ .cv-cell-box:last-child .cv-cell-main-box {
110
+ border-bottom: none;
111
+ }
112
+ /* #endif */
113
+ .cv-cell-main-big {
114
+ padding: 9px 10px 9px 0;
115
+ }
116
+ .cv-cell-left-box {
117
+ width: 50%;
118
+ display: flex;
119
+ flex-direction: row;
120
+ align-items: center;
121
+ }
122
+ .cv-cell-left-icon {
123
+ width: 20px;
124
+ height: 40px;
125
+ line-height: 40px;
126
+ padding-right: 10px;
127
+ }
128
+ .cv-cell-left-image {
129
+ width: 20px;
130
+ height: 40px;
131
+ }
132
+ .cv-cell-left-content {
133
+ padding-left: 0px;
134
+ width: 100%;
135
+ display: flex;
136
+ flex-direction: column;
137
+ justify-content: center;
138
+ align-items: flex-start;
139
+ }
140
+ .cv-cell-left-content-top {
141
+ font-size: 15px;
142
+ height: 40px;
143
+ line-height: 40px;
144
+ overflow: hidden;
145
+ font-size: 15px;
146
+ line-height: 22px;
147
+ height: 22px;
148
+ overflow: hidden;
149
+ }
150
+ .cv-cell-left-content-bottom {
151
+ font-size: 12px;
152
+ color: #999999;
153
+ line-height: 18px;
154
+ height: 18px;
155
+ overflow: hidden;
156
+ }
157
+ /**右边 */
158
+ .cv-cell-right-box {
159
+ width: 50%;
160
+ display: table;
161
+ height: 40px;
162
+ padding-left: 10px;
163
+ display: flex;
164
+ flex-direction: row;
165
+ align-items: center;
166
+ }
167
+ .cv-cell-right-content {
168
+ width: calc(100% - 20px);
169
+ display: flex;
170
+ flex-direction: column;
171
+ justify-content: center;
172
+ align-items: flex-end;
173
+ }
174
+ .cv-cell-right-content-top {
175
+ font-size: 14px;
176
+ color: #666666;
177
+ line-height: 20px;
178
+ height: 20px;
179
+ overflow: hidden;
180
+ text-align: right;
181
+ }
182
+ .cv-cell-right-content-bottom {
183
+ font-size: 14px;
184
+ color: #999999;
185
+ line-height: 20px;
186
+ height: 20px;
187
+ overflow: hidden;
188
+ text-align: right;
189
+ }
190
+
191
+ .cv-cell-main-right-intact {
192
+ font-size: 14px;
193
+ color: #999999;
194
+ display: table-cell;
195
+ vertical-align: middle;
196
+ line-height: 20px;
197
+ height: 40px;
198
+ overflow: hidden;
199
+ max-height: 40px;
200
+ text-align: right;
201
+ }
202
+
203
+ .cv-cell-right-icon {
204
+ height: 40px;
205
+ width: 20px;
206
+ }
207
+ .cv-cell-right-icon-top,
208
+ .cv-cell-right-icon-bottom {
209
+ width: 10px;
210
+ height: 2px;
211
+ background-color: #c1c1c1;
212
+ position: relative;
213
+ left: 10px;
214
+ }
215
+ .cv-cell-right-icon-top {
216
+ transform: rotate(45deg);
217
+ top: 16px;
218
+ }
219
+ .cv-cell-right-icon-bottom {
220
+ transform: rotate(-45deg);
221
+ top: 20px;
222
+ }
223
+ </style>
@@ -7,7 +7,7 @@
7
7
  <view class="cv-form-item__inner" :class="['is-direction-' + labelPos]">
8
8
  <view class="cv-form-item__label" :style="{ width: labelWid, justifyContent: justifyContent }">
9
9
  <slot name="left">
10
- <uni-icons v-if="leftIcon" class="label-icon" size="16" :type="leftIcon" :color="iconColor" />
10
+ <cv-icons v-if="leftIcon" class="label-icon" size="16" :type="leftIcon" :color="iconColor" />
11
11
  <text v-if="required" class="is-required">*</text>
12
12
  <text class="label-text">{{ label }}</text>
13
13
  <view v-if="label" class="label-seat"></view>
@@ -17,14 +17,14 @@
17
17
  <!-- 清空 -->
18
18
  <view class="cv-input__clear" @click="onEmpty" v-if="clearable == true && localVal != ''">X</view>
19
19
  <!-- 眼睛-->
20
- <uni-icons
20
+ <cv-icons
21
21
  class="cv-input__eyes"
22
22
  v-if="localVal != '' && passwordIcon"
23
- :type="showPassword ? 'eye-slash-filled' : 'eye-filled'"
23
+ :type="showPassword ? 'base-eyeslash-fill' : 'base-eye-fill'"
24
24
  :size="18"
25
25
  color="rgba(0, 0, 0, 0.4)"
26
26
  @click="onEyes"
27
- ></uni-icons>
27
+ ></cv-icons>
28
28
  </view>
29
29
  </view>
30
30
  </template>
@@ -1,256 +0,0 @@
1
- <template>
2
- <view class="cv-cell">
3
- <view class="cv-cell-box">
4
- <view class="cv-cell-main" :class="sublabel && 'cv-cell-main-big'" @tap="jump">
5
- <view class="cv-cell-main-left">
6
- <view class="cv-cell-main-left-icon" v-if="image || $slots.before">
7
- <image class="cv-cell-main-left-icon-image" :src="image" mode="aspectFit" v-if="image" />
8
- <slot name="before" v-else />
9
- </view>
10
- <view class="cv-cell-main-left-text" :class="!image && !$slots.before ? 'cv-cell-main-left-text-noimage' : ''">
11
- <view class="cv-cell-main-left-text-intact" v-if="!sublabel">
12
- {{ label }}
13
- </view>
14
- <view class="cv-cell-main-left-text-double" v-else>
15
- <view class="cv-cell-main-left-text-label">
16
- {{ label }}
17
- </view>
18
- <view class="cv-cell-main-left-text-sublabel">
19
- {{ sublabel }}
20
- </view>
21
- </view>
22
- </view>
23
- </view>
24
- <view class="cv-cell-main-center" :class="url == '' && !$attrs.click ? 'cv-cell-main-center-nourl' : ''">
25
- <view class="cv-cell-main-center-intact" v-if="!subexplain">
26
- {{ explain }}
27
- </view>
28
- <view class="cv-cell-main-center-double" v-else>
29
- <view class="cv-cell-main-center-explain">
30
- {{ explain }}
31
- </view>
32
- <view class="cv-cell-main-center-subexplain">
33
- {{ subexplain }}
34
- </view>
35
- </view>
36
- </view>
37
- <view class="cv-cell-main-more" v-if="url || $attrs.click">
38
- <view class="cv-cell-main-more-top"></view>
39
- <view class="cv-cell-main-more-bottom"></view>
40
- </view>
41
- </view>
42
- <view class="cv-cell-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: 'cvCell',
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-cell:last-child .cv-cell-main {
138
- border-bottom: none;
139
- }
140
- /* #endif */
141
- /* #ifdef MP-WEIXIN */
142
- cv-cell:last-child .cv-cell-main {
143
- border-bottom: none;
144
- }
145
- /* #endif */
146
- .cv-cell-box {
147
- height: auto;
148
- background-color: #ffffff;
149
- padding-left: 15px;
150
- }
151
- .cv-cell-main {
152
- padding: 5px 15px 5px 0;
153
- border-bottom: solid 1px #f1f1f1;
154
- display: flex;
155
- }
156
- .cv-cell-main-big {
157
- padding: 9px 15px 9px 0;
158
- }
159
- .cv-cell-main-left {
160
- width: 200px;
161
- display: flex;
162
- }
163
- .cv-cell-main-left-icon {
164
- width: 20px;
165
- height: 40px;
166
- line-height: 40px;
167
- }
168
- .cv-cell-main-left-icon-image {
169
- width: 20px;
170
- height: 40px;
171
- }
172
- .cv-cell-main-left-text {
173
- width: calc(100% - 20px);
174
- padding-left: 10px;
175
- }
176
- .cv-cell-main-left-text-noimage {
177
- width: 100%;
178
- padding-left: 0px;
179
- }
180
- .cv-cell-main-left-text-intact {
181
- font-size: 15px;
182
- height: 40px;
183
- line-height: 40px;
184
- overflow: hidden;
185
- }
186
- .cv-cell-main-left-text-label {
187
- font-size: 15px;
188
- line-height: 22px;
189
- height: 22px;
190
- overflow: hidden;
191
- }
192
- .cv-cell-main-left-text-sublabel {
193
- font-size: 12px;
194
- color: #999999;
195
- line-height: 18px;
196
- height: 18px;
197
- overflow: hidden;
198
- }
199
- .cv-cell-main-center {
200
- width: calc(100% - 200px - 20px);
201
- display: table;
202
- height: 40px;
203
- padding-left: 10px;
204
- }
205
- .cv-cell-main-center-explain,
206
- .cv-cell-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-cell-main-center-nourl {
216
- width: calc(100% - 200px);
217
- }
218
- .cv-cell-main-center-intact {
219
- font-size: 14px;
220
- color: #999999;
221
- display: table-cell;
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-cell-main-more {
231
- height: 40px;
232
- width: 20px;
233
- }
234
- .cv-cell-main-more-top,
235
- .cv-cell-main-more-bottom {
236
- width: 10px;
237
- height: 2px;
238
- background-color: #c1c1c1;
239
- position: relative;
240
- left: 10px;
241
- }
242
- .cv-cell-main-more-top {
243
- transform: rotate(45deg);
244
- top: 16px;
245
- }
246
- .cv-cell-main-more-bottom {
247
- transform: rotate(-45deg);
248
- top: 20px;
249
- }
250
- .cv-cell-message {
251
- font-size: 13px;
252
- color: #999999;
253
- line-height: 1.5em;
254
- padding: 5px 15px 5px 0;
255
- }
256
- </style>
@@ -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>