oxy-uni-ui 2.0.0 → 2.1.0
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/attributes.json +1 -1
- package/components/common/abstracts/variable.scss +338 -194
- package/components/composables/useVirtualScroll.ts +40 -14
- package/components/oxy-action-sheet/index.scss +3 -3
- package/components/oxy-backtop/index.scss +2 -2
- package/components/oxy-button/index.scss +2 -2
- package/components/oxy-calendar/index.scss +9 -9
- package/components/oxy-calendar-view/monthPanel/index.scss +4 -5
- package/components/oxy-calendar-view/year/index.scss +1 -1
- package/components/oxy-calendar-view/yearPanel/index.scss +3 -3
- package/components/oxy-cell/index.scss +1 -1
- package/components/oxy-checkbox/index.scss +9 -9
- package/components/oxy-checkbox-group/index.scss +2 -2
- package/components/oxy-col-picker/index.scss +3 -3
- package/components/oxy-corner/index.scss +1 -1
- package/components/oxy-datetime-picker/index.scss +5 -5
- package/components/oxy-drop-menu/index.scss +3 -3
- package/components/oxy-drop-menu-item/index.scss +2 -2
- package/components/oxy-file-list/index.scss +20 -20
- package/components/oxy-guidance/index.scss +13 -13
- package/components/oxy-img-cropper/index.scss +14 -14
- package/components/oxy-index-anchor/index.scss +2 -2
- package/components/oxy-index-bar/index.scss +3 -3
- package/components/oxy-input/index.scss +1 -1
- package/components/oxy-keyboard/index.scss +2 -2
- package/components/oxy-long-press-menu/index.scss +2 -2
- package/components/oxy-message-box/index.scss +7 -7
- package/components/oxy-message-box/oxy-message-box.vue +4 -5
- package/components/oxy-message-box/types.ts +0 -5
- package/components/oxy-pagination/index.scss +5 -4
- package/components/oxy-picker/index.scss +14 -14
- package/components/oxy-picker-view/index.scss +2 -2
- package/components/oxy-popover/index.scss +8 -8
- package/components/oxy-popup/index.scss +4 -4
- package/components/oxy-progress/index.scss +1 -1
- package/components/oxy-radio/index.scss +20 -14
- package/components/oxy-radio-group/index.scss +2 -2
- package/components/oxy-rich-text/index.scss +18 -18
- package/components/oxy-rich-text/mp-html/card/card.vue +3 -3
- package/components/oxy-rich-text/mp-html/mp-html.vue +4 -4
- package/components/oxy-rich-text/mp-html/node/node.vue +2 -2
- package/components/oxy-rich-text/oxy-rich-text.vue +8 -8
- package/components/oxy-search/index.scss +5 -5
- package/components/oxy-segmented/index.scss +13 -10
- package/components/oxy-select/index.scss +116 -68
- package/components/oxy-select/oxy-select.vue +24 -11
- package/components/oxy-select-picker/index.scss +2 -2
- package/components/oxy-sidebar-item/index.scss +2 -2
- package/components/oxy-skeleton/index.scss +1 -1
- package/components/oxy-slider/index.scss +4 -4
- package/components/oxy-splitter/index.scss +19 -0
- package/components/oxy-splitter/oxy-splitter.vue +409 -0
- package/components/oxy-splitter/types.ts +75 -0
- package/components/oxy-splitter-panel/index.scss +366 -0
- package/components/oxy-splitter-panel/oxy-splitter-panel.vue +432 -0
- package/components/oxy-splitter-panel/types.ts +63 -0
- package/components/oxy-step/index.scss +5 -5
- package/components/oxy-stream-render/oxy-stream-render.vue +230 -4
- package/components/oxy-swiper-nav/index.scss +3 -3
- package/components/oxy-switch/index.scss +2 -2
- package/components/oxy-tabbar/index.scss +2 -2
- package/components/oxy-table/index.scss +5 -5
- package/components/oxy-table-col/index.scss +3 -3
- package/components/oxy-tabs/index.scss +14 -12
- package/components/oxy-tag/index.scss +111 -36
- package/components/oxy-textarea/index.scss +3 -3
- package/components/oxy-tooltip/index.scss +1 -1
- package/components/oxy-tree/index.scss +4 -4
- package/components/oxy-upload/index.scss +17 -17
- package/components/oxy-virtual-scroll/index.scss +1 -1
- package/components/oxy-voice-player/index.scss +68 -39
- package/global.d.ts +2 -0
- package/package.json +1 -1
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -20,7 +20,10 @@ export default {
|
|
|
20
20
|
},
|
|
21
21
|
data() {
|
|
22
22
|
return {
|
|
23
|
-
requestTask: null
|
|
23
|
+
requestTask: null,
|
|
24
|
+
mpTextDecoder: null,
|
|
25
|
+
mpUtf8Pending: null,
|
|
26
|
+
pendingText: ''
|
|
24
27
|
}
|
|
25
28
|
},
|
|
26
29
|
watch: {
|
|
@@ -34,10 +37,224 @@ export default {
|
|
|
34
37
|
}
|
|
35
38
|
},
|
|
36
39
|
methods: {
|
|
40
|
+
stripSseFields(input) {
|
|
41
|
+
return input
|
|
42
|
+
.replace(/\r/g, '')
|
|
43
|
+
.split('\n')
|
|
44
|
+
.map((line) => {
|
|
45
|
+
if (line.startsWith('data:')) return line.slice(5).trimStart()
|
|
46
|
+
return line
|
|
47
|
+
})
|
|
48
|
+
.join('\n')
|
|
49
|
+
},
|
|
50
|
+
extractJsonObjects(input) {
|
|
51
|
+
const texts = []
|
|
52
|
+
let start = -1
|
|
53
|
+
let depth = 0
|
|
54
|
+
let inString = false
|
|
55
|
+
let escape = false
|
|
56
|
+
|
|
57
|
+
for (let i = 0; i < input.length; i++) {
|
|
58
|
+
const ch = input[i]
|
|
59
|
+
if (escape) {
|
|
60
|
+
escape = false
|
|
61
|
+
continue
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (inString) {
|
|
65
|
+
if (ch === '\\') escape = true
|
|
66
|
+
else if (ch === '"') inString = false
|
|
67
|
+
continue
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (ch === '"') {
|
|
71
|
+
inString = true
|
|
72
|
+
continue
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (ch === '{') {
|
|
76
|
+
if (depth === 0) start = i
|
|
77
|
+
depth++
|
|
78
|
+
continue
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (ch === '}') {
|
|
82
|
+
if (depth > 0) depth--
|
|
83
|
+
if (depth === 0 && start !== -1) {
|
|
84
|
+
texts.push(input.slice(start, i + 1))
|
|
85
|
+
start = -1
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const rest = start !== -1 ? input.slice(start) : ''
|
|
91
|
+
return { texts, rest }
|
|
92
|
+
},
|
|
93
|
+
emitParsedStreamData({ chunk, finished }) {
|
|
94
|
+
if (finished) {
|
|
95
|
+
if (this.pendingText) {
|
|
96
|
+
const normalized = this.stripSseFields(this.pendingText)
|
|
97
|
+
const { texts, rest } = this.extractJsonObjects(normalized)
|
|
98
|
+
texts.forEach((text) => {
|
|
99
|
+
this.$emit('stream-data', { chunk: text, finished: false })
|
|
100
|
+
})
|
|
101
|
+
this.pendingText = rest
|
|
102
|
+
}
|
|
103
|
+
this.pendingText = ''
|
|
104
|
+
this.$emit('stream-data', { chunk: null, finished: true })
|
|
105
|
+
return
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (!chunk) return
|
|
109
|
+
|
|
110
|
+
this.pendingText += chunk
|
|
111
|
+
const normalized = this.stripSseFields(this.pendingText)
|
|
112
|
+
const { texts, rest } = this.extractJsonObjects(normalized)
|
|
113
|
+
texts.forEach((text) => {
|
|
114
|
+
this.$emit('stream-data', { chunk: text, finished: false })
|
|
115
|
+
})
|
|
116
|
+
this.pendingText = rest
|
|
117
|
+
},
|
|
118
|
+
mergeUint8Array(a, b) {
|
|
119
|
+
const merged = new Uint8Array(a.length + b.length)
|
|
120
|
+
merged.set(a, 0)
|
|
121
|
+
merged.set(b, a.length)
|
|
122
|
+
return merged
|
|
123
|
+
},
|
|
124
|
+
splitIncompleteUtf8(bytes) {
|
|
125
|
+
const len = bytes.length
|
|
126
|
+
if (len === 0) {
|
|
127
|
+
return { complete: bytes, pending: null }
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
let i = len
|
|
131
|
+
let cont = 0
|
|
132
|
+
while (i > 0 && cont < 3 && (bytes[i - 1] & 0xc0) === 0x80) {
|
|
133
|
+
cont++
|
|
134
|
+
i--
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const leadIndex = i - 1
|
|
138
|
+
if (leadIndex < 0) {
|
|
139
|
+
return { complete: new Uint8Array(0), pending: bytes }
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const lead = bytes[leadIndex]
|
|
143
|
+
let expected = 1
|
|
144
|
+
if ((lead & 0x80) === 0x00) expected = 1
|
|
145
|
+
else if ((lead & 0xe0) === 0xc0) expected = 2
|
|
146
|
+
else if ((lead & 0xf0) === 0xe0) expected = 3
|
|
147
|
+
else if ((lead & 0xf8) === 0xf0) expected = 4
|
|
148
|
+
else expected = 1
|
|
149
|
+
|
|
150
|
+
const actual = len - leadIndex
|
|
151
|
+
if (expected > actual) {
|
|
152
|
+
return {
|
|
153
|
+
complete: bytes.slice(0, leadIndex),
|
|
154
|
+
pending: bytes.slice(leadIndex)
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return { complete: bytes, pending: null }
|
|
159
|
+
},
|
|
160
|
+
utf8Decode(bytes) {
|
|
161
|
+
let out = ''
|
|
162
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
163
|
+
const b0 = bytes[i]
|
|
164
|
+
if (b0 < 0x80) {
|
|
165
|
+
out += String.fromCharCode(b0)
|
|
166
|
+
continue
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if ((b0 & 0xe0) === 0xc0) {
|
|
170
|
+
if (i + 1 >= bytes.length) {
|
|
171
|
+
out += '\uFFFD'
|
|
172
|
+
break
|
|
173
|
+
}
|
|
174
|
+
const b1 = bytes[++i]
|
|
175
|
+
if ((b1 & 0xc0) !== 0x80) {
|
|
176
|
+
out += '\uFFFD'
|
|
177
|
+
continue
|
|
178
|
+
}
|
|
179
|
+
const code = ((b0 & 0x1f) << 6) | (b1 & 0x3f)
|
|
180
|
+
out += String.fromCharCode(code)
|
|
181
|
+
continue
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if ((b0 & 0xf0) === 0xe0) {
|
|
185
|
+
if (i + 2 >= bytes.length) {
|
|
186
|
+
out += '\uFFFD'
|
|
187
|
+
break
|
|
188
|
+
}
|
|
189
|
+
const b1 = bytes[++i]
|
|
190
|
+
const b2 = bytes[++i]
|
|
191
|
+
if ((b1 & 0xc0) !== 0x80 || (b2 & 0xc0) !== 0x80) {
|
|
192
|
+
out += '\uFFFD'
|
|
193
|
+
continue
|
|
194
|
+
}
|
|
195
|
+
const code = ((b0 & 0x0f) << 12) | ((b1 & 0x3f) << 6) | (b2 & 0x3f)
|
|
196
|
+
out += String.fromCharCode(code)
|
|
197
|
+
continue
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
if ((b0 & 0xf8) === 0xf0) {
|
|
201
|
+
if (i + 3 >= bytes.length) {
|
|
202
|
+
out += '\uFFFD'
|
|
203
|
+
break
|
|
204
|
+
}
|
|
205
|
+
const b1 = bytes[++i]
|
|
206
|
+
const b2 = bytes[++i]
|
|
207
|
+
const b3 = bytes[++i]
|
|
208
|
+
if ((b1 & 0xc0) !== 0x80 || (b2 & 0xc0) !== 0x80 || (b3 & 0xc0) !== 0x80) {
|
|
209
|
+
out += '\uFFFD'
|
|
210
|
+
continue
|
|
211
|
+
}
|
|
212
|
+
let codePoint = ((b0 & 0x07) << 18) | ((b1 & 0x3f) << 12) | ((b2 & 0x3f) << 6) | (b3 & 0x3f)
|
|
213
|
+
codePoint -= 0x10000
|
|
214
|
+
out += String.fromCharCode(0xd800 + (codePoint >> 10), 0xdc00 + (codePoint & 0x3ff))
|
|
215
|
+
continue
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
out += '\uFFFD'
|
|
219
|
+
}
|
|
220
|
+
return out
|
|
221
|
+
},
|
|
222
|
+
decodeMpChunk(data, finished) {
|
|
223
|
+
if (finished) {
|
|
224
|
+
let tail = null
|
|
225
|
+
if (this.mpTextDecoder) {
|
|
226
|
+
try {
|
|
227
|
+
tail = this.mpTextDecoder.decode()
|
|
228
|
+
} catch (e) {
|
|
229
|
+
tail = null
|
|
230
|
+
}
|
|
231
|
+
} else if (this.mpUtf8Pending && this.mpUtf8Pending.length) {
|
|
232
|
+
tail = this.utf8Decode(this.mpUtf8Pending)
|
|
233
|
+
}
|
|
234
|
+
this.mpTextDecoder = null
|
|
235
|
+
this.mpUtf8Pending = null
|
|
236
|
+
return tail && tail.length ? tail : null
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
let bytes
|
|
240
|
+
if (data instanceof Uint8Array) bytes = data
|
|
241
|
+
else if (data instanceof ArrayBuffer) bytes = new Uint8Array(data)
|
|
242
|
+
else bytes = new Uint8Array(data)
|
|
243
|
+
|
|
244
|
+
if (this.mpUtf8Pending && this.mpUtf8Pending.length) {
|
|
245
|
+
bytes = this.mergeUint8Array(this.mpUtf8Pending, bytes)
|
|
246
|
+
this.mpUtf8Pending = null
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const { complete, pending } = this.splitIncompleteUtf8(bytes)
|
|
250
|
+
this.mpUtf8Pending = pending
|
|
251
|
+
return this.utf8Decode(complete)
|
|
252
|
+
},
|
|
37
253
|
handleAppStreamData({ chunk, finished }) {
|
|
38
|
-
this
|
|
254
|
+
this.emitParsedStreamData({ chunk, finished })
|
|
39
255
|
},
|
|
40
256
|
handleAppStreamError({ message, type }) {
|
|
257
|
+
this.pendingText = ''
|
|
41
258
|
this.$emit('stream-error', { message, type })
|
|
42
259
|
},
|
|
43
260
|
// #ifndef H5 || APP-PLUS
|
|
@@ -47,6 +264,7 @@ export default {
|
|
|
47
264
|
this.requestTask.abort()
|
|
48
265
|
this.requestTask = null
|
|
49
266
|
}
|
|
267
|
+
this.decodeMpChunk(new Uint8Array(0), true)
|
|
50
268
|
this.handleAppStreamData({
|
|
51
269
|
chunk: null,
|
|
52
270
|
finished: true
|
|
@@ -62,6 +280,7 @@ export default {
|
|
|
62
280
|
this.requestTask.abort()
|
|
63
281
|
this.requestTask = null
|
|
64
282
|
}
|
|
283
|
+
this.decodeMpChunk(new Uint8Array(0), true)
|
|
65
284
|
|
|
66
285
|
const { url, method, headers, body } = newVal
|
|
67
286
|
|
|
@@ -72,6 +291,13 @@ export default {
|
|
|
72
291
|
data: body,
|
|
73
292
|
enableChunked: true,
|
|
74
293
|
success: (res) => {
|
|
294
|
+
const tail = this.decodeMpChunk(new Uint8Array(0), true)
|
|
295
|
+
if (tail) {
|
|
296
|
+
this.handleAppStreamData({
|
|
297
|
+
chunk: tail,
|
|
298
|
+
finished: false
|
|
299
|
+
})
|
|
300
|
+
}
|
|
75
301
|
this.handleAppStreamData({
|
|
76
302
|
chunk: null,
|
|
77
303
|
finished: true
|
|
@@ -79,6 +305,7 @@ export default {
|
|
|
79
305
|
this.requestTask = null
|
|
80
306
|
},
|
|
81
307
|
fail: (err) => {
|
|
308
|
+
this.decodeMpChunk(new Uint8Array(0), true)
|
|
82
309
|
this.handleAppStreamError({
|
|
83
310
|
message: err.errMsg || 'Request failed',
|
|
84
311
|
type: err.errMsg === 'request:fail abort' ? 'AbortError' : 'Error'
|
|
@@ -88,8 +315,7 @@ export default {
|
|
|
88
315
|
})
|
|
89
316
|
// 这里监听消息
|
|
90
317
|
this.requestTask.onChunkReceived((res) => {
|
|
91
|
-
|
|
92
|
-
let chunk = decoder.decode(new Uint8Array(res.data))
|
|
318
|
+
const chunk = this.decodeMpChunk(res.data, false)
|
|
93
319
|
this.handleAppStreamData({
|
|
94
320
|
chunk,
|
|
95
321
|
finished: false
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
height: $-swiper-nav-dot-size;
|
|
70
70
|
background: $-swiper-nav-dot-color;
|
|
71
71
|
border-radius: 50%;
|
|
72
|
-
margin: 0
|
|
72
|
+
margin: 0 12rpx;
|
|
73
73
|
transition: all 0.4s ease-in;
|
|
74
74
|
|
|
75
75
|
@include when(vertical) {
|
|
76
|
-
margin:
|
|
76
|
+
margin: 12rpx 0;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
@include when(active) {
|
|
@@ -156,4 +156,4 @@
|
|
|
156
156
|
flex-direction: column;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
}
|
|
159
|
+
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
height: $-switch-circle-size;
|
|
27
27
|
top: 4rpx;
|
|
28
28
|
left: 4rpx;
|
|
29
|
-
background:
|
|
29
|
+
background: $-switch-circle-bg;
|
|
30
30
|
border-radius: 50%;
|
|
31
31
|
transition: left .3s ease-out;
|
|
32
32
|
box-shadow: 0 4rpx 8rpx 0 $-switch-inactive-shadow-color;
|
|
@@ -55,4 +55,4 @@
|
|
|
55
55
|
@include when(disabled) {
|
|
56
56
|
opacity: 0.5;
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
@include m(round) {
|
|
25
25
|
margin-left: 32rpx;
|
|
26
26
|
margin-right: 32rpx;
|
|
27
|
-
border-radius:
|
|
27
|
+
border-radius: $-tabbar-round-radius;
|
|
28
28
|
box-shadow: $-tabbar-box-shadow;
|
|
29
29
|
|
|
30
30
|
@include when(fixed) {
|
|
@@ -59,4 +59,4 @@
|
|
|
59
59
|
right: 0;
|
|
60
60
|
z-index: 500;
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
@include when(shadow) {
|
|
26
26
|
&::after {
|
|
27
|
-
background:
|
|
27
|
+
background: $-table-fixed-shadow-dark;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
background: $-table-bg;
|
|
87
87
|
width: 200rpx;
|
|
88
88
|
min-height: 100rpx;
|
|
89
|
-
padding:
|
|
89
|
+
padding: 20rpx 24rpx;
|
|
90
90
|
font-size: $-table-font-size;
|
|
91
91
|
color: $-table-color;
|
|
92
|
-
--oxy-sort-button-height:
|
|
92
|
+
--oxy-sort-button-height: 64rpx;
|
|
93
93
|
|
|
94
94
|
@include when(border) {
|
|
95
95
|
border-right: 1px solid $-table-border-color;
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
top: 0;
|
|
116
116
|
width: 30rpx;
|
|
117
117
|
height: 100%;
|
|
118
|
-
background:
|
|
118
|
+
background: $-table-fixed-shadow-light;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -160,4 +160,4 @@
|
|
|
160
160
|
@include multiEllipsis(2);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
}
|
|
163
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
@include b(table-col) {
|
|
8
8
|
@include when(shadow) {
|
|
9
9
|
&::after {
|
|
10
|
-
background:
|
|
10
|
+
background: $-table-fixed-shadow-dark;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
top: 0;
|
|
35
35
|
width: 30rpx;
|
|
36
36
|
height: 100%;
|
|
37
|
-
background:
|
|
37
|
+
background: $-table-fixed-shadow-light;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
border-bottom: none;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
@include when(disabled) {
|
|
38
38
|
color: $-dark-color-gray;
|
|
39
|
-
border-color:
|
|
39
|
+
border-color: $-tabs-nav-map-disabled-border-color;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
|
|
64
64
|
@include b(tabs) {
|
|
65
65
|
position: relative;
|
|
66
|
-
background:
|
|
66
|
+
background: $-tabs-nav-bg;
|
|
67
67
|
width: 100%;
|
|
68
68
|
|
|
69
69
|
@include e(nav) {
|
|
70
70
|
left: 0;
|
|
71
71
|
right: 0;
|
|
72
72
|
height: $-tabs-nav-height;
|
|
73
|
-
background-color:
|
|
73
|
+
background-color: $-tabs-nav-bg;
|
|
74
74
|
width: 100%;
|
|
75
75
|
position: relative;
|
|
76
76
|
|
|
@@ -216,13 +216,13 @@
|
|
|
216
216
|
|
|
217
217
|
@include e(map-header) {
|
|
218
218
|
position: relative;
|
|
219
|
-
padding-left:
|
|
219
|
+
padding-left: 36rpx;
|
|
220
220
|
height: $-tabs-nav-height;
|
|
221
221
|
line-height: $-tabs-nav-height;
|
|
222
222
|
font-size: $-tabs-nav-map-fs;
|
|
223
223
|
color: $-tabs-nav-map-color;
|
|
224
224
|
transition: opacity .3s;
|
|
225
|
-
background:
|
|
225
|
+
background: $-tabs-nav-bg;
|
|
226
226
|
opacity: 0;
|
|
227
227
|
|
|
228
228
|
@include halfPixelBorder;
|
|
@@ -235,8 +235,8 @@
|
|
|
235
235
|
@include e(map-body) {
|
|
236
236
|
display: flex;
|
|
237
237
|
flex-wrap: wrap;
|
|
238
|
-
padding: 40rpx
|
|
239
|
-
background:
|
|
238
|
+
padding: 40rpx 32rpx 24rpx;
|
|
239
|
+
background: $-tabs-nav-bg;
|
|
240
240
|
transition: transform .3s;
|
|
241
241
|
transform: scaleY(0);
|
|
242
242
|
transform-origin: center top;
|
|
@@ -261,13 +261,15 @@
|
|
|
261
261
|
@include e(map-nav-btn) {
|
|
262
262
|
@include buttonClear;
|
|
263
263
|
@include lineEllipsis;
|
|
264
|
-
display: inline-
|
|
264
|
+
display: inline-flex;
|
|
265
|
+
align-items: center;
|
|
266
|
+
justify-content: center;
|
|
265
267
|
width: 214rpx;
|
|
266
268
|
height: 64rpx;
|
|
267
|
-
line-height:
|
|
269
|
+
line-height: 1.2;
|
|
268
270
|
background-color: $-tabs-nav-map-button-back-color;
|
|
269
271
|
border-color: transparent;
|
|
270
|
-
margin-bottom:
|
|
272
|
+
margin-bottom: 24rpx;
|
|
271
273
|
border-radius: $-tabs-nav-map-button-radius;
|
|
272
274
|
color: $-tabs-nav-map-color;
|
|
273
275
|
font-size: $-tabs-nav-map-fs;
|
|
@@ -282,7 +284,7 @@
|
|
|
282
284
|
|
|
283
285
|
@include when(disabled) {
|
|
284
286
|
color: $-tabs-nav-disabled-color;
|
|
285
|
-
border-color:
|
|
287
|
+
border-color: $-tabs-nav-map-disabled-border-color;
|
|
286
288
|
}
|
|
287
289
|
}
|
|
288
290
|
|
|
@@ -300,7 +302,7 @@
|
|
|
300
302
|
@include when(slide) {
|
|
301
303
|
.oxy-tabs__nav-item {
|
|
302
304
|
flex: 0 0 auto;
|
|
303
|
-
padding: 0
|
|
305
|
+
padding: 0 36rpx;
|
|
304
306
|
}
|
|
305
307
|
}
|
|
306
308
|
|
|
@@ -1,30 +1,53 @@
|
|
|
1
1
|
@import '../common/abstracts/variable';
|
|
2
2
|
@import '../common/abstracts/mixin';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
.oxy-theme-dark {
|
|
5
|
+
@include b(tag) {
|
|
6
|
+
@include when(default) {
|
|
7
|
+
background: $-dark-background4;
|
|
8
|
+
color: $-dark-color3;
|
|
9
|
+
|
|
10
|
+
@include when(plain) {
|
|
11
|
+
background: transparent;
|
|
12
|
+
border-color: $-dark-background7;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@include when(round) {
|
|
16
|
+
color: $-dark-color3;
|
|
17
|
+
border-color: $-dark-background7;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@include when(dynamic-input) {
|
|
22
|
+
border-color: $-dark-background7;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin tag-type-style($normalColor, $normalBg) {
|
|
5
28
|
background: $normalBg;
|
|
6
29
|
|
|
7
30
|
@include when(plain) {
|
|
8
31
|
background: transparent;
|
|
9
32
|
color: $normalColor;
|
|
10
|
-
border:
|
|
11
|
-
padding:
|
|
33
|
+
border-color: $normalColor;
|
|
34
|
+
padding: 12rpx 20rpx;
|
|
12
35
|
}
|
|
36
|
+
|
|
13
37
|
@include when(round) {
|
|
14
|
-
|
|
15
|
-
font-size: $-tag-fs;
|
|
16
|
-
padding: 8rpx 22rpx;
|
|
38
|
+
padding: 12rpx 24rpx;
|
|
17
39
|
background: transparent;
|
|
18
40
|
color: if($normalColor != $-tag-info-color, $normalColor, $-tag-round-color);
|
|
19
|
-
border:
|
|
41
|
+
border-color: if($normalColor != $-tag-info-color, $normalColor, $-tag-round-border-color);
|
|
20
42
|
border-radius: $-tag-round-radius;
|
|
21
43
|
}
|
|
44
|
+
|
|
22
45
|
@include when(mark) {
|
|
23
|
-
padding:
|
|
46
|
+
padding: 12rpx 20rpx;
|
|
24
47
|
border-radius: $-tag-mark-radius;
|
|
25
48
|
|
|
26
49
|
@include when(plain) {
|
|
27
|
-
padding:
|
|
50
|
+
padding: 8rpx 20rpx;
|
|
28
51
|
}
|
|
29
52
|
}
|
|
30
53
|
@include when(active) {
|
|
@@ -32,15 +55,24 @@
|
|
|
32
55
|
border-color: $-tag-primary-color;
|
|
33
56
|
}
|
|
34
57
|
}
|
|
58
|
+
|
|
35
59
|
@include b(tag) {
|
|
36
|
-
|
|
37
|
-
|
|
60
|
+
position: relative;
|
|
61
|
+
font-size: $-tag-fs;
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
align-items: center;
|
|
65
|
+
max-width: 100%;
|
|
66
|
+
box-sizing: border-box;
|
|
38
67
|
color: $-tag-color;
|
|
39
|
-
padding:
|
|
40
|
-
|
|
41
|
-
|
|
68
|
+
padding: 12rpx 20rpx;
|
|
69
|
+
min-height: 64rpx;
|
|
70
|
+
border: 1px solid transparent;
|
|
71
|
+
border-radius: $-tag-radius;
|
|
72
|
+
transition: opacity .2s, color .2s, border-color .2s, background-color .2s;
|
|
42
73
|
vertical-align: middle;
|
|
43
|
-
line-height:
|
|
74
|
+
line-height: 1.4;
|
|
75
|
+
white-space: nowrap;
|
|
44
76
|
|
|
45
77
|
@include when(default) {
|
|
46
78
|
@include tag-type-style($-tag-info-color, $-tag-info-bg);
|
|
@@ -58,58 +90,101 @@
|
|
|
58
90
|
@include tag-type-style($-tag-success-color, $-tag-success-bg);
|
|
59
91
|
}
|
|
60
92
|
@include when(icon) {
|
|
61
|
-
|
|
62
|
-
line-height: 1.2;
|
|
63
|
-
padding: 4rpx 10rpx;
|
|
93
|
+
padding: 12rpx 20rpx;
|
|
64
94
|
}
|
|
95
|
+
|
|
65
96
|
@include when(dynamic) {
|
|
66
97
|
box-sizing: border-box;
|
|
67
|
-
width:
|
|
68
|
-
|
|
98
|
+
width: auto;
|
|
99
|
+
min-width: 176rpx;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
transition: color .3s, border-color .3s, background-color .3s;
|
|
102
|
+
|
|
103
|
+
.oxy-tag__text {
|
|
104
|
+
display: inline-flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
line-height: inherit;
|
|
108
|
+
|
|
109
|
+
:deep(text) {
|
|
110
|
+
display: inline-block;
|
|
111
|
+
line-height: inherit;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
69
114
|
|
|
70
115
|
&:active {
|
|
71
116
|
color: $-tag-primary-color;
|
|
72
117
|
border-color: $-tag-primary-color;
|
|
73
118
|
}
|
|
74
119
|
}
|
|
120
|
+
|
|
75
121
|
@include when(dynamic-input) {
|
|
76
122
|
border-color: $-tag-primary-color;
|
|
123
|
+
justify-content: flex-start;
|
|
77
124
|
}
|
|
125
|
+
|
|
78
126
|
@include edeep(icon) {
|
|
79
|
-
display: inline-
|
|
80
|
-
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
margin-right: 12rpx;
|
|
81
131
|
font-size: $-tag-fs;
|
|
82
|
-
line-height: 1
|
|
83
|
-
vertical-align:
|
|
132
|
+
line-height: 1;
|
|
133
|
+
vertical-align: middle;
|
|
84
134
|
}
|
|
135
|
+
|
|
85
136
|
@include e(text) {
|
|
86
137
|
display: inline-block;
|
|
87
|
-
|
|
138
|
+
max-width: 100%;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
text-overflow: ellipsis;
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
vertical-align: middle;
|
|
88
143
|
}
|
|
144
|
+
|
|
89
145
|
@include e(add-text) {
|
|
90
|
-
width:
|
|
91
|
-
|
|
92
|
-
|
|
146
|
+
width: 100%;
|
|
147
|
+
min-width: 0;
|
|
148
|
+
height: 56rpx;
|
|
149
|
+
min-height: 56rpx;
|
|
93
150
|
display: inline-block;
|
|
94
151
|
font-size: $-tag-fs;
|
|
152
|
+
line-height: 56rpx;
|
|
95
153
|
vertical-align: middle;
|
|
154
|
+
color: inherit;
|
|
96
155
|
padding: 0;
|
|
156
|
+
border: none;
|
|
157
|
+
background: transparent;
|
|
158
|
+
text-align: left;
|
|
159
|
+
|
|
160
|
+
&::placeholder {
|
|
161
|
+
color: $-font-gray-3;
|
|
162
|
+
}
|
|
97
163
|
}
|
|
164
|
+
|
|
98
165
|
@include e(close) {
|
|
99
|
-
display: inline-
|
|
100
|
-
|
|
101
|
-
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
justify-content: center;
|
|
169
|
+
margin-left: 16rpx;
|
|
170
|
+
margin-right: 0;
|
|
102
171
|
font-size: $-tag-close-size;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
172
|
+
width: $-tag-close-size;
|
|
173
|
+
height: $-tag-close-size;
|
|
174
|
+
line-height: 1;
|
|
175
|
+
vertical-align: middle;
|
|
106
176
|
color: $-tag-close-color;
|
|
177
|
+
opacity: 0.7;
|
|
178
|
+
transition: opacity .2s, color .2s;
|
|
107
179
|
|
|
108
180
|
&:active {
|
|
181
|
+
opacity: 1;
|
|
109
182
|
color: $-tag-close-active-color;
|
|
110
183
|
}
|
|
111
184
|
}
|
|
185
|
+
|
|
112
186
|
@include edeep(add) {
|
|
113
|
-
vertical-align:
|
|
187
|
+
vertical-align: middle;
|
|
188
|
+
line-height: 1;
|
|
114
189
|
}
|
|
115
|
-
}
|
|
190
|
+
}
|