@10yun/cv-mobile-ui 0.5.62 → 0.5.63
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 +1 -1
- package/plugins/uni-extend.js +10 -10
- package/ui-fireui/components/u-action-sheet/u-action-sheet.vue +46 -16
- package/ui-fireui/components/u-alert/u-alert.vue +11 -5
- package/ui-fireui/components/u-badge/u-badge.vue +52 -69
- package/ui-fireui/components/u-bottom-navigation/u-bottom-navigation.vue +28 -20
- package/ui-fireui/components/u-bottom-popup/u-bottom-popup.vue +40 -11
- package/ui-fireui/components/u-bubble-popup/u-bubble-popup.vue +3 -6
- package/ui-fireui/components/u-button/u-button.vue +262 -259
- package/ui-fireui/components/u-calendar/u-calendar.vue +227 -44
- package/ui-fireui/components/u-calendar/u-calendar2.js +562 -0
- package/ui-fireui/components/u-card/u-card.vue +50 -32
- package/ui-fireui/components/u-cascade-selection/u-cascade-selection.vue +197 -74
- package/ui-fireui/components/u-circular-progress/u-circular-progress.vue +324 -0
- package/ui-fireui/components/u-clipboard2/tui-clipboard.js +53 -0
- package/ui-fireui/components/u-collapse/u-collapse.vue +8 -8
- package/ui-fireui/components/u-config/index.js +129 -0
- package/ui-fireui/components/u-count-down/u-count-down.vue +124 -19
- package/ui-fireui/components/u-datetime/u-datetime.vue +416 -176
- package/ui-fireui/components/u-divider/u-divider.vue +3 -3
- package/ui-fireui/components/u-drawer/u-drawer.vue +55 -12
- package/ui-fireui/components/u-dropdown-list/u-dropdown-list.vue +103 -0
- package/ui-fireui/components/u-fab/u-fab.vue +344 -0
- package/ui-fireui/components/u-footer/u-footer.vue +148 -0
- package/ui-fireui/components/u-grid/u-grid.vue +2 -8
- package/ui-fireui/components/u-grid-item/u-grid-item.vue +22 -5
- package/ui-fireui/components/u-icon/u-icon-new.js +190 -0
- package/ui-fireui/components/u-icon/u-icon-new.vue +100 -0
- package/ui-fireui/components/u-image-cropper/u-image-cropper.vue +1144 -0
- package/ui-fireui/components/u-image-group/u-image-group.vue +164 -0
- package/ui-fireui/components/u-keyboard/u-keyboard.vue +3 -2
- package/ui-fireui/components/u-keyboard-input/u-keyboard-input.vue +1 -1
- package/ui-fireui/components/u-list-cell/u-list-cell.vue +82 -72
- package/ui-fireui/components/u-list-view/u-list-view.vue +33 -8
- package/ui-fireui/components/u-loading/u-loading.vue +107 -27
- package/ui-fireui/components/u-loadmore/u-loadmore.vue +21 -3
- package/ui-fireui/components/u-modal/u-modal.vue +140 -176
- package/ui-fireui/components/u-navigation-bar/u-navigation-bar.vue +121 -28
- package/ui-fireui/components/u-no-data/u-no-data.vue +58 -20
- package/ui-fireui/components/u-nomore/u-nomore.vue +5 -4
- package/ui-fireui/components/u-numberbox/u-numberbox.vue +88 -45
- package/ui-fireui/components/u-picture-cropper/u-picture-cropper.vue +94 -36
- package/ui-fireui/components/u-picture-cropper/u-picture-cropper.wxs +27 -17
- package/ui-fireui/components/u-rate/u-rate.vue +197 -0
- package/ui-fireui/components/u-round-progress/u-round-progress.vue +62 -42
- package/ui-fireui/components/u-scroll-top/u-scroll-top.vue +4 -3
- package/ui-fireui/components/u-section/u-section.vue +149 -0
- package/ui-fireui/components/u-skeleton/u-skeleton.vue +37 -6
- package/ui-fireui/components/u-steps/u-steps.vue +110 -27
- package/ui-fireui/components/u-sticky/u-sticky.vue +35 -21
- package/ui-fireui/components/u-sticky-wxs/u-sticky-wxs.vue +7 -4
- package/ui-fireui/components/u-sticky-wxs/u-sticky.wxs +39 -36
- package/ui-fireui/components/u-swipe-action/u-swipe-action.vue +76 -19
- package/ui-fireui/components/u-tabbar/u-tabbar.vue +71 -38
- package/ui-fireui/components/u-tabs/u-tabs.vue +133 -51
- package/ui-fireui/components/u-tag/u-tag.vue +109 -226
- package/ui-fireui/components/u-time-axis/u-time-axis.vue +1 -1
- package/ui-fireui/components/u-timeaxis-item/u-timeaxis-item.vue +1 -1
- package/ui-fireui/components/u-tips/u-tips.vue +35 -15
- package/ui-fireui/components/u-toast/u-toast.vue +9 -5
- package/ui-fireui/components/u-top-dropdown/u-top-dropdown.vue +8 -6
- package/ui-fireui/components/u-upload/u-upload-old.vue +462 -0
- package/ui-fireui/components/u-upload/u-upload.vue +648 -446
- package/ui-fireui/components/u-white-space/u-white-space.vue +68 -0
- package/ui-fireui/components/u-wing-blank/u-wing-blank.vue +100 -0
- package/uview-plus/libs/ctocode/index.js +1 -0
- package/uview-plus/libs/ctocode/richText.js +0 -1
|
@@ -9,16 +9,31 @@
|
|
|
9
9
|
getClassName(shape, plain),
|
|
10
10
|
getTypeClass(type, plain)
|
|
11
11
|
]"
|
|
12
|
-
:style="{
|
|
12
|
+
:style="{
|
|
13
|
+
transform: `scale(${scaleMultiple})`,
|
|
14
|
+
padding: padding,
|
|
15
|
+
margin: margin,
|
|
16
|
+
fontSize: size,
|
|
17
|
+
lineHeight: size,
|
|
18
|
+
background: getBgColor(type, plain),
|
|
19
|
+
color: getColor(type, plain)
|
|
20
|
+
}"
|
|
13
21
|
@tap="handleClick"
|
|
14
22
|
>
|
|
15
23
|
<slot></slot>
|
|
24
|
+
<view
|
|
25
|
+
class="up-tag__border"
|
|
26
|
+
:class="[getClassName(shape, plain)]"
|
|
27
|
+
:style="{ borderColor: getBgColor(type) }"
|
|
28
|
+
v-if="plain"
|
|
29
|
+
></view>
|
|
16
30
|
</view>
|
|
17
31
|
</template>
|
|
18
32
|
|
|
19
33
|
<script>
|
|
20
34
|
export default {
|
|
21
|
-
name: '
|
|
35
|
+
name: 'tuiTag',
|
|
36
|
+
emits: ['click'],
|
|
22
37
|
props: {
|
|
23
38
|
type: {
|
|
24
39
|
type: String,
|
|
@@ -73,12 +88,87 @@ export default {
|
|
|
73
88
|
},
|
|
74
89
|
methods: {
|
|
75
90
|
handleClick() {
|
|
76
|
-
this.$emit('click', {
|
|
91
|
+
this.$emit('click', {
|
|
92
|
+
index: this.index
|
|
93
|
+
});
|
|
77
94
|
},
|
|
78
|
-
|
|
95
|
+
hexToRGB(hex) {
|
|
96
|
+
if (hex.length === 4) {
|
|
97
|
+
let text = hex.substring(1, 4);
|
|
98
|
+
hex = '#' + text + text;
|
|
99
|
+
}
|
|
100
|
+
let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
101
|
+
return result
|
|
102
|
+
? {
|
|
103
|
+
r: parseInt(result[1], 16),
|
|
104
|
+
g: parseInt(result[2], 16),
|
|
105
|
+
b: parseInt(result[3], 16)
|
|
106
|
+
}
|
|
107
|
+
: {};
|
|
108
|
+
},
|
|
109
|
+
getColorByType(type, isText, plain) {
|
|
110
|
+
//primary, white, danger, warning, green, gray,black,light-blue,light-brownish,light-orange,light-green
|
|
111
|
+
const global = uni && uni.$tui && uni.$tui.color;
|
|
112
|
+
let color = '';
|
|
113
|
+
const _primary = this.hexToRGB((global && global.primary) || '#5677fc');
|
|
114
|
+
const _blue = this.hexToRGB((global && global.blue) || '#007aff');
|
|
115
|
+
const _warning = this.hexToRGB((global && global.warning) || '#ff7900');
|
|
116
|
+
const _danger = this.hexToRGB((global && global.danger) || '#EB0909');
|
|
117
|
+
const _green = this.hexToRGB((global && global.success) || '#07c160');
|
|
118
|
+
const colors = {
|
|
119
|
+
primary: (global && global.primary) || '#5677fc',
|
|
120
|
+
white: '#fff',
|
|
121
|
+
danger: (global && global.danger) || '#EB0909',
|
|
122
|
+
red: (global && global.pink) || '#f74d54',
|
|
123
|
+
pink: (global && global.pink) || '#f74d54',
|
|
124
|
+
warning: (global && global.warning) || '#ff7900',
|
|
125
|
+
orange: (global && global.warning) || '#ff7900',
|
|
126
|
+
green: (global && global.success) || '#07c160',
|
|
127
|
+
blue: (global && global.blue) || '#007aff',
|
|
128
|
+
gray: '#ededed',
|
|
129
|
+
'btn-gray': '#ededed',
|
|
130
|
+
black: '#000',
|
|
131
|
+
'light-primary': `rgba(${_primary.r}, ${_primary.g}, ${_primary.b}, 0.08)`,
|
|
132
|
+
'light-blue': `rgba(${_blue.r}, ${_blue.g}, ${_blue.b}, 0.08)`,
|
|
133
|
+
brownish: '#8a5966',
|
|
134
|
+
'light-brownish': '#fcebef',
|
|
135
|
+
'light-danger': `rgba(${_danger.r}, ${_danger.g}, ${_danger.b}, 0.08)`,
|
|
136
|
+
'light-orange': `rgba(${_warning.r}, ${_warning.g}, ${_warning.b}, 0.08)`,
|
|
137
|
+
'light-warning': `rgba(${_warning.r}, ${_warning.g}, ${_warning.b}, 0.08)`,
|
|
138
|
+
'light-green': `rgba(${_green.r}, ${_green.g}, ${_green.b}, 0.08)`,
|
|
139
|
+
'light-black': '#333',
|
|
140
|
+
translucent: 'rgba(0, 0, 0, 0.7)'
|
|
141
|
+
};
|
|
142
|
+
if (isText) {
|
|
143
|
+
if (type && ~type.indexOf('light-') && type !== 'light-black') {
|
|
144
|
+
const tp = type.replace('light-', '');
|
|
145
|
+
color = colors[tp];
|
|
146
|
+
} else if (type === 'white') {
|
|
147
|
+
color = plain ? '#fff' : '#333';
|
|
148
|
+
} else if (type === 'btn-gray' || type === 'gray') {
|
|
149
|
+
color = '#999';
|
|
150
|
+
} else {
|
|
151
|
+
if (plain) {
|
|
152
|
+
color = colors[type];
|
|
153
|
+
} else {
|
|
154
|
+
color = '#fff';
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
} else {
|
|
158
|
+
color = colors[type] || colors.primary;
|
|
159
|
+
}
|
|
160
|
+
return color;
|
|
161
|
+
},
|
|
162
|
+
getBgColor(type, plain) {
|
|
163
|
+
return plain ? 'transparent' : this.getColorByType(type);
|
|
164
|
+
},
|
|
165
|
+
getColor(type, plain) {
|
|
166
|
+
return this.getColorByType(type, true, plain);
|
|
167
|
+
},
|
|
168
|
+
getTypeClass: function (type, plain) {
|
|
79
169
|
return plain ? 'up-' + type + '-outline' : 'up-' + type;
|
|
80
170
|
},
|
|
81
|
-
getClassName(shape, plain) {
|
|
171
|
+
getClassName: function (shape, plain) {
|
|
82
172
|
//circle, square,circleLeft,circleRight
|
|
83
173
|
var className = plain ? 'up-tag-outline ' : '';
|
|
84
174
|
if (shape != 'square') {
|
|
@@ -97,255 +187,46 @@ export default {
|
|
|
97
187
|
</script>
|
|
98
188
|
|
|
99
189
|
<style scoped>
|
|
100
|
-
/* color start*/
|
|
101
|
-
|
|
102
|
-
.up-primary {
|
|
103
|
-
background-color: #5677fc !important;
|
|
104
|
-
color: #fff;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.up-light-primary {
|
|
108
|
-
background-color: #5c8dff !important;
|
|
109
|
-
color: #fff;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.up-dark-primary {
|
|
113
|
-
background-color: #4a67d6 !important;
|
|
114
|
-
color: #fff;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.up-dLight-primary {
|
|
118
|
-
background-color: #4e77d9 !important;
|
|
119
|
-
color: #fff;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.up-danger {
|
|
123
|
-
background-color: #ed3f14 !important;
|
|
124
|
-
color: #fff;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.up-red {
|
|
128
|
-
background-color: #ff201f !important;
|
|
129
|
-
color: #fff;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.up-warning {
|
|
133
|
-
background-color: #ff7900 !important;
|
|
134
|
-
color: #fff;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.up-green {
|
|
138
|
-
background-color: #19be6b !important;
|
|
139
|
-
color: #fff;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.up-high-green {
|
|
143
|
-
background-color: #52dcae !important;
|
|
144
|
-
color: #52dcae;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.up-black {
|
|
148
|
-
background-color: #000 !important;
|
|
149
|
-
color: #fff;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.up-white {
|
|
153
|
-
background-color: #fff !important;
|
|
154
|
-
color: #333 !important;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.up-translucent {
|
|
158
|
-
background-color: rgba(0, 0, 0, 0.7);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.up-light-black {
|
|
162
|
-
background-color: #333 !important;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.up-gray {
|
|
166
|
-
background-color: #ededed !important;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.up-phcolor-gray {
|
|
170
|
-
background-color: #ccc !important;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.up-divider-gray {
|
|
174
|
-
background-color: #eaeef1 !important;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.up-btn-gray {
|
|
178
|
-
background-color: #ededed !important;
|
|
179
|
-
color: #999 !important;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.up-hover-gray {
|
|
183
|
-
background-color: #f7f7f9 !important;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.up-bg-gray {
|
|
187
|
-
background-color: #fafafa !important;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.up-light-blue {
|
|
191
|
-
background-color: #ecf6fd;
|
|
192
|
-
color: #4dabeb !important;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.up-light-brownish {
|
|
196
|
-
background-color: #fcebef;
|
|
197
|
-
color: #8a5966 !important;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.up-light-orange {
|
|
201
|
-
background-color: #fef5eb;
|
|
202
|
-
color: #faa851 !important;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.up-light-green {
|
|
206
|
-
background-color: #e8f6e8;
|
|
207
|
-
color: #44cf85 !important;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.up-primary-outline::after {
|
|
211
|
-
border: 1px solid #5677fc !important;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.up-primary-outline {
|
|
215
|
-
color: #5677fc !important;
|
|
216
|
-
background-color: none;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.up-danger-outline {
|
|
220
|
-
color: #ed3f14 !important;
|
|
221
|
-
background-color: none;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.up-danger-outline::after {
|
|
225
|
-
border: 1px solid #ed3f14 !important;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.up-red-outline {
|
|
229
|
-
color: #ff201f !important;
|
|
230
|
-
background-color: none;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.up-red-outline::after {
|
|
234
|
-
border: 1px solid #ff201f !important;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.up-warning-outline {
|
|
238
|
-
color: #ff7900 !important;
|
|
239
|
-
background-color: none;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.up-warning-outline::after {
|
|
243
|
-
border: 1px solid #ff7900 !important;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.up-green-outline {
|
|
247
|
-
color: #44cf85 !important;
|
|
248
|
-
background-color: none;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.up-green-outline::after {
|
|
252
|
-
border: 1px solid #44cf85 !important;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.up-high-green-outline {
|
|
256
|
-
color: #52dcae !important;
|
|
257
|
-
background-color: none;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.up-high-green-outline::after {
|
|
261
|
-
border: 1px solid #52dcae !important;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.up-gray-outline {
|
|
265
|
-
color: #999 !important;
|
|
266
|
-
background-color: none;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.up-gray-outline::after {
|
|
270
|
-
border: 1px solid #ccc !important;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.up-black-outline {
|
|
274
|
-
color: #333 !important;
|
|
275
|
-
background-color: none;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.up-black-outline::after {
|
|
279
|
-
border: 1px solid #333 !important;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.up-white-outline {
|
|
283
|
-
color: #fff !important;
|
|
284
|
-
background-color: none;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.up-white-outline::after {
|
|
288
|
-
border: 1px solid #fff !important;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/* color end*/
|
|
292
|
-
|
|
293
|
-
/* tag start*/
|
|
294
|
-
|
|
295
190
|
.up-tag {
|
|
296
|
-
display: flex;
|
|
191
|
+
display: inline-flex;
|
|
297
192
|
align-items: center;
|
|
298
193
|
justify-content: center;
|
|
299
194
|
border-radius: 6rpx;
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
.up-tag-outline {
|
|
195
|
+
flex-shrink: 0;
|
|
303
196
|
position: relative;
|
|
304
|
-
background-color: none;
|
|
305
|
-
color: #5677fc;
|
|
306
197
|
}
|
|
307
198
|
|
|
308
|
-
.up-
|
|
309
|
-
content: '';
|
|
199
|
+
.up-tag__border {
|
|
310
200
|
position: absolute;
|
|
311
201
|
width: 200%;
|
|
312
202
|
height: 200%;
|
|
313
|
-
|
|
203
|
+
transform: scale(0.5) translateZ(0);
|
|
314
204
|
transform-origin: 0 0;
|
|
315
|
-
-webkit-transform: scale(0.5, 0.5);
|
|
316
|
-
transform: scale(0.5, 0.5);
|
|
317
|
-
-webkit-box-sizing: border-box;
|
|
318
205
|
box-sizing: border-box;
|
|
319
206
|
left: 0;
|
|
320
207
|
top: 0;
|
|
321
208
|
border-radius: 12rpx;
|
|
209
|
+
border: 1px solid;
|
|
210
|
+
pointer-events: none;
|
|
322
211
|
}
|
|
323
212
|
|
|
324
213
|
.up-tag-fillet {
|
|
325
|
-
border-radius:
|
|
214
|
+
border-radius: 100rpx;
|
|
326
215
|
}
|
|
327
216
|
|
|
328
|
-
.up-white.up-tag-fillet
|
|
329
|
-
border-radius:
|
|
217
|
+
.up-white.up-tag-fillet {
|
|
218
|
+
border-radius: 160rpx;
|
|
330
219
|
}
|
|
331
220
|
|
|
332
|
-
.up-tag-outline-fillet
|
|
333
|
-
border-radius:
|
|
221
|
+
.up-tag-outline-fillet {
|
|
222
|
+
border-radius: 160rpx;
|
|
334
223
|
}
|
|
335
224
|
|
|
336
225
|
.up-tag-fillet-left {
|
|
337
|
-
border-radius: 50rpx 0 0 50rpx;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.up-tag-fillet-right {
|
|
341
|
-
border-radius: 0 50rpx 50rpx 0;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.up-tag-fillet-left.up-tag-outline::after {
|
|
345
226
|
border-radius: 100rpx 0 0 100rpx;
|
|
346
227
|
}
|
|
347
228
|
|
|
348
|
-
.up-tag-fillet-right
|
|
229
|
+
.up-tag-fillet-right {
|
|
349
230
|
border-radius: 0 100rpx 100rpx 0;
|
|
350
231
|
}
|
|
351
232
|
|
|
@@ -353,9 +234,11 @@ export default {
|
|
|
353
234
|
.up-origin-left {
|
|
354
235
|
transform-origin: 0 center;
|
|
355
236
|
}
|
|
237
|
+
|
|
356
238
|
.up-origin-right {
|
|
357
239
|
transform-origin: 100% center;
|
|
358
240
|
}
|
|
241
|
+
|
|
359
242
|
.up-tag-opcity {
|
|
360
243
|
opacity: 0.5;
|
|
361
244
|
}
|
|
@@ -1,27 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<view
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<block v-if="position == 'top'">
|
|
3
|
+
<view
|
|
4
|
+
class="up-tips-class up-toptips"
|
|
5
|
+
:class="['up-' + type, show ? 'up-top-show' : '']"
|
|
6
|
+
:style="{ backgroundColor: backgroundColor, color: color, fontSize: size + 'rpx' }"
|
|
7
|
+
>
|
|
8
|
+
{{ msg }}
|
|
9
|
+
</view>
|
|
10
|
+
</block>
|
|
11
|
+
<block v-else>
|
|
6
12
|
<view
|
|
7
13
|
class="up-tips-class up-toast"
|
|
8
14
|
:class="[position == 'center' ? 'up-centertips' : 'up-bottomtips', show ? 'up-toast-show' : '']"
|
|
9
15
|
>
|
|
10
|
-
<view
|
|
16
|
+
<view
|
|
17
|
+
class="up-tips-content"
|
|
18
|
+
:class="['up-' + type]"
|
|
19
|
+
:style="{ backgroundColor: backgroundColor, color: color, fontSize: size + 'rpx' }"
|
|
20
|
+
>
|
|
11
21
|
{{ msg }}
|
|
12
22
|
</view>
|
|
13
23
|
</view>
|
|
14
|
-
</
|
|
24
|
+
</block>
|
|
15
25
|
</template>
|
|
16
26
|
|
|
17
27
|
<script>
|
|
18
28
|
export default {
|
|
19
|
-
name: '
|
|
29
|
+
name: 'tuiTips',
|
|
20
30
|
props: {
|
|
21
31
|
//top bottom center
|
|
22
32
|
position: {
|
|
23
33
|
type: String,
|
|
24
34
|
default: 'top'
|
|
35
|
+
},
|
|
36
|
+
backgroundColor: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'rgba(0, 0, 0, 0.7)'
|
|
39
|
+
},
|
|
40
|
+
color: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: '#fff'
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 30
|
|
25
47
|
}
|
|
26
48
|
},
|
|
27
49
|
data() {
|
|
@@ -34,7 +56,7 @@ export default {
|
|
|
34
56
|
};
|
|
35
57
|
},
|
|
36
58
|
methods: {
|
|
37
|
-
showTips(options) {
|
|
59
|
+
showTips: function (options) {
|
|
38
60
|
const { type = 'translucent', duration = 2000 } = options;
|
|
39
61
|
clearTimeout(this.timer);
|
|
40
62
|
this.show = true;
|
|
@@ -59,8 +81,6 @@ export default {
|
|
|
59
81
|
box-sizing: border-box;
|
|
60
82
|
position: fixed;
|
|
61
83
|
z-index: 9999;
|
|
62
|
-
color: #fff;
|
|
63
|
-
font-size: 30rpx;
|
|
64
84
|
left: 0;
|
|
65
85
|
top: 0;
|
|
66
86
|
display: flex;
|
|
@@ -136,23 +156,23 @@ export default {
|
|
|
136
156
|
/*背景颜色 start*/
|
|
137
157
|
|
|
138
158
|
.up-primary {
|
|
139
|
-
background
|
|
159
|
+
background: #5677fc;
|
|
140
160
|
}
|
|
141
161
|
|
|
142
162
|
.up-green {
|
|
143
|
-
background
|
|
163
|
+
background: #19be6b;
|
|
144
164
|
}
|
|
145
165
|
|
|
146
166
|
.up-warning {
|
|
147
|
-
background
|
|
167
|
+
background: #ff7900;
|
|
148
168
|
}
|
|
149
169
|
|
|
150
170
|
.up-danger {
|
|
151
|
-
background
|
|
171
|
+
background: #ed3f14;
|
|
152
172
|
}
|
|
153
173
|
|
|
154
174
|
.up-translucent {
|
|
155
|
-
background
|
|
175
|
+
background: rgba(0, 0, 0, 0.7);
|
|
156
176
|
}
|
|
157
177
|
|
|
158
178
|
/*背景颜色 end*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view
|
|
3
3
|
class="up-toast"
|
|
4
4
|
:class="[visible ? 'up-toast-show' : '', content ? 'up-toast-padding' : '', icon ? '' : 'up-unicon-padding']"
|
|
5
|
-
:style="{ width: getWidth(icon, content) }"
|
|
5
|
+
:style="{ width: getWidth(icon, content), zIndex: zIndex }"
|
|
6
6
|
>
|
|
7
7
|
<image :src="imgUrl" class="up-toast-img" v-if="icon"></image>
|
|
8
8
|
<view class="up-toast-text" :class="[icon ? '' : 'up-unicon']">{{ title }}</view>
|
|
@@ -12,8 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
<script>
|
|
14
14
|
export default {
|
|
15
|
-
name: '
|
|
16
|
-
props: {
|
|
15
|
+
name: 'tuiToast',
|
|
16
|
+
props: {
|
|
17
|
+
zIndex: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 99999
|
|
20
|
+
}
|
|
21
|
+
},
|
|
17
22
|
data() {
|
|
18
23
|
return {
|
|
19
24
|
timer: null,
|
|
@@ -29,7 +34,7 @@ export default {
|
|
|
29
34
|
};
|
|
30
35
|
},
|
|
31
36
|
methods: {
|
|
32
|
-
show(options) {
|
|
37
|
+
show: function (options) {
|
|
33
38
|
let { duration = 2000, icon = false } = options;
|
|
34
39
|
clearTimeout(this.timer);
|
|
35
40
|
this.visible = true;
|
|
@@ -69,7 +74,6 @@ export default {
|
|
|
69
74
|
transform: translate(-50%, -50%);
|
|
70
75
|
transition: 0.3s ease-in-out;
|
|
71
76
|
transition-property: opacity, visibility;
|
|
72
|
-
z-index: 9999;
|
|
73
77
|
display: flex;
|
|
74
78
|
align-items: center;
|
|
75
79
|
justify-content: center;
|
|
@@ -27,12 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
<script>
|
|
29
29
|
export default {
|
|
30
|
-
name: '
|
|
31
|
-
|
|
32
|
-
return {
|
|
33
|
-
left: 0
|
|
34
|
-
};
|
|
35
|
-
},
|
|
30
|
+
name: 'tuiTopDropdown',
|
|
31
|
+
emits: ['close'],
|
|
36
32
|
props: {
|
|
37
33
|
//是否需要mask
|
|
38
34
|
mask: {
|
|
@@ -74,6 +70,11 @@ export default {
|
|
|
74
70
|
default: 0
|
|
75
71
|
}
|
|
76
72
|
},
|
|
73
|
+
data() {
|
|
74
|
+
return {
|
|
75
|
+
left: 0
|
|
76
|
+
};
|
|
77
|
+
},
|
|
77
78
|
created() {
|
|
78
79
|
this.left = (100 - this.width) / 2;
|
|
79
80
|
},
|
|
@@ -93,6 +94,7 @@ export default {
|
|
|
93
94
|
|
|
94
95
|
<style scoped>
|
|
95
96
|
.up-dropdown-box {
|
|
97
|
+
width: 100%;
|
|
96
98
|
position: fixed;
|
|
97
99
|
box-sizing: border-box;
|
|
98
100
|
border-bottom-right-radius: 24rpx;
|