oxy-uni-ui 2.0.0 → 2.1.1
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 +449 -271
- package/components/common/util.ts +25 -0
- package/components/composables/useDynamicVirtualScroll.ts +80 -0
- package/components/composables/useVirtualScroll.ts +40 -14
- package/components/oxy-action-sheet/index.scss +8 -8
- package/components/oxy-backtop/index.scss +3 -3
- package/components/oxy-badge/index.scss +2 -2
- package/components/oxy-button/index.scss +5 -8
- package/components/oxy-calendar/index.scss +10 -10
- package/components/oxy-calendar/oxy-calendar.vue +3 -3
- package/components/oxy-calendar-view/monthPanel/index.scss +4 -5
- package/components/oxy-calendar-view/monthPanel/month-panel.vue +72 -37
- package/components/oxy-calendar-view/monthPanel/types.ts +43 -1
- package/components/oxy-calendar-view/types.ts +1 -1
- package/components/oxy-calendar-view/utils.ts +12 -1
- package/components/oxy-calendar-view/year/index.scss +1 -1
- package/components/oxy-calendar-view/yearPanel/index.scss +3 -3
- package/components/oxy-calendar-view/yearPanel/types.ts +36 -2
- package/components/oxy-calendar-view/yearPanel/year-panel.vue +64 -45
- package/components/oxy-card/index.scss +4 -4
- package/components/oxy-cell/index.scss +2 -2
- package/components/oxy-cell-group/index.scss +2 -2
- package/components/oxy-checkbox/index.scss +75 -220
- package/components/oxy-checkbox-group/index.scss +2 -2
- package/components/oxy-col-picker/index.scss +3 -3
- package/components/oxy-collapse/index.scss +1 -1
- package/components/oxy-collapse-item/index.scss +2 -2
- package/components/oxy-corner/index.scss +4 -4
- package/components/oxy-count-to/oxy-count-to.vue +3 -3
- package/components/oxy-count-to/types.ts +1 -1
- package/components/oxy-date-strip-item/index.scss +4 -4
- package/components/oxy-datetime-picker/index.scss +5 -5
- package/components/oxy-datetime-picker/types.ts +1 -1
- package/components/oxy-datetime-picker-view/types.ts +2 -2
- package/components/oxy-drop-menu/index.scss +3 -3
- package/components/oxy-drop-menu-item/index.scss +2 -2
- package/components/oxy-fab/index.scss +1 -5
- package/components/oxy-file-list/index.scss +22 -22
- package/components/oxy-footer/index.scss +2 -2
- package/components/oxy-footer/oxy-footer.vue +2 -3
- package/components/oxy-form-item/index.scss +0 -5
- package/components/oxy-grid/oxy-grid.vue +1 -1
- package/components/oxy-grid-item/index.scss +1 -1
- package/components/oxy-guidance/index.scss +15 -15
- package/components/oxy-img/index.scss +2 -2
- package/components/oxy-img-cropper/index.scss +14 -16
- package/components/oxy-img-lazy/index.scss +0 -1
- package/components/oxy-index-anchor/index.scss +5 -5
- package/components/oxy-index-bar/index.scss +3 -3
- package/components/oxy-input/index.scss +2 -2
- package/components/oxy-input-number/index.scss +21 -3
- package/components/oxy-input-number/oxy-input-number.vue +9 -1
- package/components/oxy-keyboard/index.scss +3 -3
- package/components/oxy-link/index.scss +11 -10
- package/components/oxy-loading/index.scss +1 -1
- package/components/oxy-loadmore/index.scss +1 -1
- package/components/oxy-long-press-menu/index.scss +2 -2
- package/components/oxy-message-box/index.scss +10 -10
- package/components/oxy-message-box/oxy-message-box.vue +4 -5
- package/components/oxy-message-box/types.ts +0 -5
- package/components/oxy-navbar/index.scss +1 -1
- package/components/oxy-navbar/oxy-navbar.vue +2 -3
- package/components/oxy-pagination/index.scss +5 -4
- package/components/oxy-password-input/index.scss +4 -4
- package/components/oxy-picker/index.scss +14 -14
- package/components/oxy-picker/types.ts +1 -1
- package/components/oxy-picker-view/index.scss +2 -2
- package/components/oxy-picker-view/oxy-picker-view.vue +8 -5
- package/components/oxy-picker-view/types.ts +2 -2
- package/components/oxy-popover/index.scss +8 -8
- package/components/oxy-popup/index.scss +4 -4
- package/components/oxy-progress/index.scss +3 -3
- package/components/oxy-radio/index.scss +26 -16
- package/components/oxy-radio-group/index.scss +2 -3
- package/components/oxy-rich-text/index.scss +20 -24
- package/components/oxy-rich-text/mp-html/card/card.vue +3 -3
- package/components/oxy-rich-text/mp-html/mp-html.d.ts +2 -0
- package/components/oxy-rich-text/mp-html/mp-html.vue +6 -5
- package/components/oxy-rich-text/mp-html/node/node.vue +25 -2
- package/components/oxy-rich-text/mp-html/parser.js +6 -6
- package/components/oxy-rich-text/oxy-rich-text.vue +31 -8
- package/components/oxy-search/index.scss +6 -6
- package/components/oxy-segmented/index.scss +14 -15
- package/components/oxy-select/index.scss +117 -69
- 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 +22 -13
- package/components/oxy-skeleton/index.scss +1 -1
- package/components/oxy-slider/index.scss +8 -9
- package/components/oxy-sort-button/index.scss +3 -5
- 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 +13 -13
- package/components/oxy-stream-render/oxy-stream-render.vue +230 -4
- package/components/oxy-swiper-nav/index.scss +5 -5
- package/components/oxy-switch/index.scss +5 -5
- package/components/oxy-tab/index.scss +8 -2
- package/components/oxy-tabbar/index.scss +5 -5
- package/components/oxy-tabbar/oxy-tabbar.vue +3 -3
- package/components/oxy-table/index.scss +5 -6
- package/components/oxy-table-col/index.scss +4 -5
- package/components/oxy-tabs/index.scss +16 -14
- package/components/oxy-tag/index.scss +111 -36
- package/components/oxy-text/index.scss +1 -1
- package/components/oxy-textarea/index.scss +3 -7
- package/components/oxy-toast/index.scss +1 -1
- package/components/oxy-tooltip/index.scss +1 -1
- package/components/oxy-tree/index.scss +35 -15
- package/components/oxy-tree/oxy-tree.vue +113 -2
- package/components/oxy-tree/types.ts +1 -0
- package/components/oxy-upload/index.scss +20 -20
- package/components/oxy-video-preview/index.scss +3 -3
- package/components/oxy-virtual-scroll/index.scss +2 -2
- package/components/oxy-voice-player/index.scss +104 -75
- package/components/oxy-watermark/index.scss +1 -1
- 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
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
transform: translateY(-50%);
|
|
11
11
|
width: $-swiper-nav-btn-size;
|
|
12
12
|
height: $-swiper-nav-btn-size;
|
|
13
|
-
border-radius:
|
|
13
|
+
border-radius: $-radius-circle;
|
|
14
14
|
background: $-swiper-nav-btn-bg-color;
|
|
15
15
|
|
|
16
16
|
&::after {
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
width: $-swiper-nav-dot-size;
|
|
69
69
|
height: $-swiper-nav-dot-size;
|
|
70
70
|
background: $-swiper-nav-dot-color;
|
|
71
|
-
border-radius:
|
|
72
|
-
margin: 0
|
|
71
|
+
border-radius: $-radius-circle;
|
|
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,8 +26,8 @@
|
|
|
26
26
|
height: $-switch-circle-size;
|
|
27
27
|
top: 4rpx;
|
|
28
28
|
left: 4rpx;
|
|
29
|
-
background:
|
|
30
|
-
border-radius:
|
|
29
|
+
background: $-switch-circle-bg;
|
|
30
|
+
border-radius: $-radius-circle;
|
|
31
31
|
transition: left .3s ease-out;
|
|
32
32
|
box-shadow: 0 4rpx 8rpx 0 $-switch-inactive-shadow-color;
|
|
33
33
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
left: 50%;
|
|
41
41
|
transform: translate(-50%, -50%) scale(0.5);
|
|
42
42
|
border: 2rpx solid $-switch-border-color;
|
|
43
|
-
border-radius:
|
|
43
|
+
border-radius: $-radius-circle;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
@include when(checked) {
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
@include when(disabled) {
|
|
56
|
-
opacity:
|
|
56
|
+
opacity: $-opacity-muted;
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
}
|
|
@@ -10,17 +10,23 @@
|
|
|
10
10
|
@include e(body) {
|
|
11
11
|
@include m(inactive) {
|
|
12
12
|
height: 0;
|
|
13
|
-
transition: height
|
|
13
|
+
transition: height $-transition-duration-slow ease-in-out;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.is-fullscreen {
|
|
19
19
|
.oxy-tab {
|
|
20
|
-
height:
|
|
20
|
+
height: auto;
|
|
21
21
|
overflow: hidden;
|
|
22
22
|
.oxy-tab__body {
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
.oxy-tabs__body.is-animated {
|
|
28
|
+
.oxy-tab {
|
|
29
|
+
height: 100%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
26
32
|
}
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@include m(round) {
|
|
25
|
-
margin-left:
|
|
26
|
-
margin-right:
|
|
27
|
-
border-radius:
|
|
25
|
+
margin-left: $-spacing-32;
|
|
26
|
+
margin-right: $-spacing-32;
|
|
27
|
+
border-radius: $-tabbar-round-radius;
|
|
28
28
|
box-shadow: $-tabbar-box-shadow;
|
|
29
29
|
|
|
30
30
|
@include when(fixed) {
|
|
@@ -57,6 +57,6 @@
|
|
|
57
57
|
left: 0;
|
|
58
58
|
bottom: 0;
|
|
59
59
|
right: 0;
|
|
60
|
-
z-index:
|
|
60
|
+
z-index: $-z-index-fixed;
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
}
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
<script lang="ts" setup>
|
|
24
24
|
import { getCurrentInstance, onMounted, ref, watch, nextTick, computed, type CSSProperties } from 'vue'
|
|
25
25
|
import type { TabbarItem } from '../oxy-tabbar-item/types'
|
|
26
|
-
import { getRect, isDef, objToStyle } from '../common/util'
|
|
26
|
+
import { convertPxToRpx, getRect, isDef, objToStyle } from '../common/util'
|
|
27
27
|
import { useChildren } from '../composables/useChildren'
|
|
28
28
|
import { useWindowResize } from '../composables/useWindowResize'
|
|
29
29
|
import { TABBAR_KEY, tabbarProps } from './types'
|
|
@@ -103,9 +103,9 @@ function setPlaceholderHeight() {
|
|
|
103
103
|
.then((res) => {
|
|
104
104
|
const rectHeight = Number(res.height) || 0
|
|
105
105
|
const rectTop = Number(res.top)
|
|
106
|
-
const { windowHeight = 0
|
|
106
|
+
const { windowHeight = 0 } = uni.getSystemInfoSync()
|
|
107
107
|
const occupiedHeight = windowHeight && !Number.isNaN(rectTop) ? Math.max(windowHeight - rectTop, 0) : rectHeight
|
|
108
|
-
const occupiedHeightInRpx =
|
|
108
|
+
const occupiedHeightInRpx = convertPxToRpx(occupiedHeight)
|
|
109
109
|
|
|
110
110
|
placeholderHeight.value = occupiedHeight ? occupiedHeightInRpx : ''
|
|
111
111
|
})
|
|
@@ -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;
|
|
@@ -110,12 +110,11 @@
|
|
|
110
110
|
&::after {
|
|
111
111
|
content: ' ';
|
|
112
112
|
position: absolute;
|
|
113
|
-
height: 100%;
|
|
114
113
|
right: -30rpx;
|
|
115
114
|
top: 0;
|
|
116
115
|
width: 30rpx;
|
|
117
116
|
height: 100%;
|
|
118
|
-
background:
|
|
117
|
+
background: $-table-fixed-shadow-light;
|
|
119
118
|
}
|
|
120
119
|
}
|
|
121
120
|
|
|
@@ -160,4 +159,4 @@
|
|
|
160
159
|
@include multiEllipsis(2);
|
|
161
160
|
}
|
|
162
161
|
}
|
|
163
|
-
}
|
|
162
|
+
}
|
|
@@ -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
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
@include m(fixed) {
|
|
23
23
|
position: sticky;
|
|
24
|
-
z-index:
|
|
24
|
+
z-index: $-z-index-sticky;
|
|
25
25
|
left: 0;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
right: -30rpx;
|
|
34
34
|
top: 0;
|
|
35
35
|
width: 30rpx;
|
|
36
|
-
|
|
37
|
-
background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.04) 100%);
|
|
36
|
+
background: $-table-fixed-shadow-light;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
|
|
@@ -43,4 +42,4 @@
|
|
|
43
42
|
border-bottom: none;
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
|
-
}
|
|
45
|
+
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
color: $-dark-color3;
|
|
15
15
|
|
|
16
16
|
@include when(active) {
|
|
17
|
-
font-weight:
|
|
17
|
+
font-weight: $-fw-semibold;
|
|
18
18
|
color: $-dark-color;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -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
|
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
transition: color .3s;
|
|
104
104
|
|
|
105
105
|
@include when(active) {
|
|
106
|
-
font-weight:
|
|
106
|
+
font-weight: $-fw-semibold;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
@include when(disabled) {
|
|
@@ -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: $-spacing-24;
|
|
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
|
|