hy-app 0.5.8 → 0.5.10
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/components/hy-action-sheet/index.scss +1 -1
- package/components/hy-address-picker/index.scss +1 -1
- package/components/hy-avatar/index.scss +1 -1
- package/components/hy-back-top/index.scss +1 -1
- package/components/hy-badge/index.scss +1 -1
- package/components/hy-button/index.scss +1 -1
- package/components/hy-calendar/index.scss +1 -1
- package/components/hy-card/hy-card.vue +1 -1
- package/components/hy-card/index.scss +1 -1
- package/components/hy-cell-item/hy-cell-item.vue +1 -0
- package/components/hy-cell-item/index.scss +1 -1
- package/components/hy-check-button/hy-check-button.vue +4 -4
- package/components/hy-checkbox/index.scss +1 -1
- package/components/hy-checkbox-group/index.scss +1 -1
- package/components/hy-checkbox-item/index.scss +1 -1
- package/components/hy-code-input/hy-code-input.vue +1 -1
- package/components/hy-code-input/index.scss +1 -1
- package/components/hy-config-provider/hy-config-provider.vue +4 -2
- package/components/hy-config-provider/index.scss +1 -1
- package/components/hy-count-down/index.scss +1 -1
- package/components/hy-count-to/index.scss +1 -1
- package/components/hy-coupon/index.scss +1 -1
- package/components/hy-datetime-picker/index.scss +1 -1
- package/components/hy-divider/index.scss +1 -1
- package/components/hy-dropdown/index.scss +1 -1
- package/components/hy-dropdown-item/index.scss +1 -1
- package/components/hy-empty/index.scss +1 -1
- package/components/hy-flex/index.scss +1 -1
- package/components/hy-float-button/index.scss +1 -1
- package/components/hy-folding-panel-item/index.scss +1 -1
- package/components/hy-form-item/index.scss +1 -1
- package/components/hy-grid/index.scss +1 -1
- package/components/hy-icon/index.scss +1 -1
- package/components/hy-image/index.scss +1 -1
- package/components/hy-input/hy-input.vue +1 -1
- package/components/hy-input/index.scss +6 -1
- package/components/hy-input/props.ts +1 -1
- package/components/hy-input/typing.d.ts +4 -0
- package/components/hy-line/index.scss +1 -1
- package/components/hy-line-progress/index.scss +2 -1
- package/components/hy-list/index.scss +1 -1
- package/components/hy-loading/index.scss +1 -1
- package/components/hy-menu/index.scss +1 -1
- package/components/hy-modal/index.scss +1 -1
- package/components/hy-navbar/hy-navbar.vue +26 -23
- package/components/hy-navbar/index.scss +2 -2
- package/components/hy-notice-bar/index.scss +1 -1
- package/components/hy-notify/index.scss +1 -1
- package/components/hy-number-step/index.scss +1 -1
- package/components/hy-overlay/index.scss +1 -1
- package/components/hy-pagination/index.scss +1 -1
- package/components/hy-picker/hy-picker.vue +92 -87
- package/components/hy-picker/index.scss +2 -2
- package/components/hy-picker/props.ts +1 -1
- package/components/hy-popover/index.scss +1 -1
- package/components/hy-popup/hy-popup.vue +3 -3
- package/components/hy-popup/index.scss +2 -1
- package/components/hy-price/index.scss +1 -1
- package/components/hy-qrcode/index.scss +1 -1
- package/components/hy-radio/index.scss +1 -1
- package/components/hy-rate/index.scss +1 -1
- package/components/hy-read-more/index.scss +2 -2
- package/components/hy-rolling-num/hy-rolling-num.vue +2 -12
- package/components/hy-rolling-num/index.scss +1 -1
- package/components/hy-scroll-list/index.scss +1 -1
- package/components/hy-search/index.scss +1 -1
- package/components/hy-signature/index.scss +1 -1
- package/components/hy-slider/index.scss +1 -1
- package/components/hy-status-bar/index.scss +1 -1
- package/components/hy-steps/index.scss +1 -1
- package/components/hy-sticky/index.scss +1 -1
- package/components/hy-submit-bar/index.scss +1 -1
- package/components/hy-subsection/index.scss +1 -1
- package/components/hy-swipe-action/index.scss +1 -1
- package/components/hy-swiper/index.scss +2 -2
- package/components/hy-switch/index.scss +1 -1
- package/components/hy-tabbar/index.scss +1 -1
- package/components/hy-tabbar-group/index.scss +1 -1
- package/components/hy-tabbar-item/index.scss +1 -1
- package/components/hy-table/hy-table.vue +358 -0
- package/components/hy-table/index.scss +197 -0
- package/components/hy-table/props.ts +47 -0
- package/components/hy-table/typing.d.ts +34 -0
- package/components/hy-tabs/index.scss +1 -1
- package/components/hy-tag/index.scss +1 -1
- package/components/hy-text/hy-text.vue +1 -1
- package/components/hy-text/index.scss +1 -1
- package/components/hy-textarea/hy-textarea.vue +1 -1
- package/components/hy-textarea/index.scss +6 -1
- package/components/hy-toast/index.scss +2 -1
- package/components/hy-tooltip/index.scss +2 -2
- package/components/hy-upload/index.scss +1 -1
- package/components/hy-warn/hy-warn.vue +2 -2
- package/components/hy-warn/index.scss +1 -1
- package/components/hy-waterfall/index.scss +1 -1
- package/components/hy-watermark/index.scss +1 -1
- package/index.scss +1 -1
- package/libs/css/{mixin.scss → _mixin.scss} +27 -13
- package/libs/css/theme.scss +5 -2
- package/libs/css/vars.scss +6 -0
- package/libs/utils/inside.ts +260 -271
- package/package.json +2 -2
- package/components/hy-rolling-num/README.md +0 -137
|
@@ -47,9 +47,8 @@
|
|
|
47
47
|
:style="{ color: confirmColor }"
|
|
48
48
|
@tap="onConfirm"
|
|
49
49
|
>
|
|
50
|
-
<slot name="toolbar-right">
|
|
51
|
-
|
|
52
|
-
</slot>
|
|
50
|
+
<slot v-if="$slots['toolbar-right']" name="toolbar-right"></slot>
|
|
51
|
+
<text v-else>{{ confirmText }}</text>
|
|
53
52
|
</view>
|
|
54
53
|
</view>
|
|
55
54
|
<!-- 头部内容 -->
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
height: `${addUnit(visibleItemCount * itemHeight)}`
|
|
79
78
|
}"
|
|
80
79
|
mask-class="hy-picker--view__mask"
|
|
81
|
-
maskStyle="backgroundImage: none;"
|
|
82
80
|
@change="changeHandler"
|
|
83
81
|
>
|
|
84
82
|
<picker-view-column
|
|
@@ -143,21 +141,21 @@ const props = defineProps(pickerProps)
|
|
|
143
141
|
const emit = defineEmits<IPickerEmits>()
|
|
144
142
|
|
|
145
143
|
// 上一次选择的列索引
|
|
146
|
-
const lastIndex = ref([])
|
|
144
|
+
const lastIndex = ref<number[]>([])
|
|
147
145
|
// 索引值 ,对应picker-view的value
|
|
148
|
-
const innerIndex = ref<
|
|
146
|
+
const innerIndex = ref<number[]>([])
|
|
149
147
|
// 各列的值
|
|
150
148
|
const innerColumns = ref<any[][]>([])
|
|
151
149
|
// 上一次的变化列索引
|
|
152
150
|
const columnIndex = ref<number>(0)
|
|
153
151
|
const showByClickInput = ref<boolean>(false)
|
|
154
|
-
const currentActiveValue = ref([]) //当前用户选中,但是还没确认的值,用户没做change操作时候,点击确认可以默认选中第一个
|
|
152
|
+
const currentActiveValue = ref<number[]>([]) //当前用户选中,但是还没确认的值,用户没做change操作时候,点击确认可以默认选中第一个
|
|
155
153
|
|
|
156
154
|
/**
|
|
157
|
-
*
|
|
155
|
+
* 设置整体各列的columns的值
|
|
158
156
|
* */
|
|
159
157
|
const setColumns = (columns: any[]) => {
|
|
160
|
-
innerColumns.value =
|
|
158
|
+
innerColumns.value = columns
|
|
161
159
|
// 如果在设置各列数据时,没有被设置默认的各列索引defaultIndex,那么用0去填充它,数组长度为列的数量
|
|
162
160
|
if (innerIndex.value.length === 0) {
|
|
163
161
|
innerIndex.value = new Array(columns.length).fill(0)
|
|
@@ -165,17 +163,41 @@ const setColumns = (columns: any[]) => {
|
|
|
165
163
|
}
|
|
166
164
|
|
|
167
165
|
/**
|
|
168
|
-
*
|
|
166
|
+
* 监听默认索引的变化,重新设置对应的值
|
|
169
167
|
* */
|
|
170
168
|
watch(
|
|
171
169
|
() => props.defaultIndex,
|
|
172
170
|
(newValue) => {
|
|
173
|
-
setIndexs(newValue
|
|
174
|
-
}
|
|
171
|
+
setIndexs(newValue)
|
|
172
|
+
},
|
|
173
|
+
{ immediate: true }
|
|
175
174
|
)
|
|
176
175
|
|
|
177
176
|
/**
|
|
178
|
-
*
|
|
177
|
+
* 监听默认值,给索引赋值
|
|
178
|
+
* */
|
|
179
|
+
watch(
|
|
180
|
+
() => props.modelValue,
|
|
181
|
+
(newValue: string | unknown[]) => {
|
|
182
|
+
if (newValue) {
|
|
183
|
+
let arr
|
|
184
|
+
if (isArray(newValue)) {
|
|
185
|
+
arr = newValue.map((item, index) => {
|
|
186
|
+
return props.columns[index].findIndex((val) => item === val)
|
|
187
|
+
})
|
|
188
|
+
} else {
|
|
189
|
+
arr = newValue.split(props.separator).map((item, index) => {
|
|
190
|
+
return props.columns[index].findIndex((val) => item === val)
|
|
191
|
+
})
|
|
192
|
+
}
|
|
193
|
+
setIndexs(arr)
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{ immediate: true }
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* 监听columns参数的变化
|
|
179
201
|
* */
|
|
180
202
|
watch(
|
|
181
203
|
() => props.columns,
|
|
@@ -186,7 +208,7 @@ watch(
|
|
|
186
208
|
)
|
|
187
209
|
|
|
188
210
|
/**
|
|
189
|
-
*
|
|
211
|
+
* 已选&&已确认的值显示在input上面的文案
|
|
190
212
|
* */
|
|
191
213
|
const inputLabelValue = computed((): string => {
|
|
192
214
|
let firstItem = innerColumns.value[0] && innerColumns.value[0][0]
|
|
@@ -212,7 +234,7 @@ const inputLabelValue = computed((): string => {
|
|
|
212
234
|
})
|
|
213
235
|
|
|
214
236
|
/**
|
|
215
|
-
*
|
|
237
|
+
* 已选,待确认的值
|
|
216
238
|
* */
|
|
217
239
|
const inputValue = computed(() => {
|
|
218
240
|
let items = innerColumns.value.map((item, index) => item[innerIndex.value[index]])
|
|
@@ -233,7 +255,7 @@ const inputValue = computed(() => {
|
|
|
233
255
|
})
|
|
234
256
|
|
|
235
257
|
/**
|
|
236
|
-
*
|
|
258
|
+
* 显示
|
|
237
259
|
* */
|
|
238
260
|
const onShowByClickInput = () => {
|
|
239
261
|
if (!props.input?.disabled) {
|
|
@@ -242,7 +264,7 @@ const onShowByClickInput = () => {
|
|
|
242
264
|
}
|
|
243
265
|
|
|
244
266
|
/**
|
|
245
|
-
*
|
|
267
|
+
* 获取item需要显示的文字,判别为对象还是文本
|
|
246
268
|
* */
|
|
247
269
|
const getItemText = (item: any) => {
|
|
248
270
|
if (Object.prototype.toString.call(item) === '[object Object]' && props.keyName) {
|
|
@@ -253,7 +275,7 @@ const getItemText = (item: any) => {
|
|
|
253
275
|
}
|
|
254
276
|
|
|
255
277
|
/**
|
|
256
|
-
*
|
|
278
|
+
* 关闭选择器
|
|
257
279
|
* */
|
|
258
280
|
const closeHandler = () => {
|
|
259
281
|
if (props.closeOnClickOverlay) {
|
|
@@ -266,7 +288,7 @@ const closeHandler = () => {
|
|
|
266
288
|
}
|
|
267
289
|
|
|
268
290
|
/**
|
|
269
|
-
*
|
|
291
|
+
* 点击工具栏的取消按钮
|
|
270
292
|
* */
|
|
271
293
|
const cancel = () => {
|
|
272
294
|
if (props.hasInput) {
|
|
@@ -277,24 +299,23 @@ const cancel = () => {
|
|
|
277
299
|
}
|
|
278
300
|
|
|
279
301
|
/**
|
|
280
|
-
*
|
|
302
|
+
* 点击工具栏的确定按钮
|
|
281
303
|
* */
|
|
282
304
|
const onConfirm = () => {
|
|
283
|
-
|
|
305
|
+
//如果用户还没有触发过change
|
|
284
306
|
if (!currentActiveValue.value.length) {
|
|
285
307
|
let arr = [0]
|
|
286
308
|
//如果有默认值&&默认值的数组长度是正确的,就用默认值
|
|
287
309
|
if (
|
|
288
310
|
Array.isArray(props.defaultIndex) &&
|
|
289
|
-
props.defaultIndex.length
|
|
311
|
+
props.defaultIndex.length === innerColumns.value.length
|
|
290
312
|
) {
|
|
291
313
|
arr = [...props.defaultIndex]
|
|
292
314
|
} else {
|
|
293
315
|
//否则默认都选中第一个
|
|
294
316
|
arr = Array(innerColumns.value.length).fill(0)
|
|
295
317
|
}
|
|
296
|
-
|
|
297
|
-
setIndexs(arr)
|
|
318
|
+
setIndexs(arr, true)
|
|
298
319
|
}
|
|
299
320
|
emit('update:modelValue', inputValue.value)
|
|
300
321
|
if (props.hasInput) {
|
|
@@ -309,75 +330,78 @@ const onConfirm = () => {
|
|
|
309
330
|
}
|
|
310
331
|
|
|
311
332
|
/**
|
|
312
|
-
*
|
|
333
|
+
* 选择器某一列的数据发生变化时触发
|
|
313
334
|
* */
|
|
314
335
|
const changeHandler = (e: any) => {
|
|
315
336
|
const { value } = e.detail
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
337
|
+
// 优化:使用更高效的方式找出变化的列
|
|
338
|
+
let changedColumnIndex = -1
|
|
339
|
+
let changedItemIndex = 0
|
|
340
|
+
|
|
341
|
+
// 记录用户选中但是还没确认的值
|
|
319
342
|
currentActiveValue.value = value
|
|
320
|
-
|
|
321
|
-
for
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
index = item
|
|
329
|
-
break // 终止循环,即使少一次循环,也是性能的提升
|
|
343
|
+
|
|
344
|
+
// 优化循环:使用for...of循环更简洁,并且在找到变化后立即退出
|
|
345
|
+
for (let [i, newValue] of value.entries()) {
|
|
346
|
+
const oldValue = lastIndex.value[i] || 0
|
|
347
|
+
if (newValue !== oldValue) {
|
|
348
|
+
changedColumnIndex = i
|
|
349
|
+
changedItemIndex = newValue
|
|
350
|
+
break
|
|
330
351
|
}
|
|
331
352
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
353
|
+
|
|
354
|
+
// 如果有变化的列,才执行后续操作
|
|
355
|
+
if (changedColumnIndex !== -1) {
|
|
356
|
+
columnIndex.value = changedColumnIndex
|
|
357
|
+
|
|
358
|
+
// 移除无条件重置索引的代码,仅在数据实际变化时重置
|
|
359
|
+
|
|
360
|
+
// 优化:创建params对象时使用更简洁的方式
|
|
361
|
+
const params = {
|
|
362
|
+
value: innerColumns.value.map((item, idx) => item[value[idx]]),
|
|
363
|
+
index: changedItemIndex,
|
|
364
|
+
indexs: value,
|
|
365
|
+
values: innerColumns.value,
|
|
366
|
+
columnIndex: changedColumnIndex
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// 将当前的各项变化索引,设置为"上一次"的索引变化值
|
|
370
|
+
setIndexs(value, true)
|
|
371
|
+
|
|
372
|
+
//如果是非自带输入框才会在change时候触发v-model绑值的变化
|
|
373
|
+
if (!props.hasInput) {
|
|
374
|
+
emit('update:modelValue', inputValue.value)
|
|
375
|
+
}
|
|
376
|
+
emit('change', params)
|
|
349
377
|
}
|
|
350
|
-
emit('change', params)
|
|
351
378
|
}
|
|
352
379
|
|
|
353
380
|
/**
|
|
354
|
-
*
|
|
381
|
+
* 设置index索引,此方法可被外部调用设置
|
|
355
382
|
* */
|
|
356
|
-
|
|
357
|
-
innerIndex.value =
|
|
383
|
+
function setIndexs(index: number[], isSetLastIndex?: boolean) {
|
|
384
|
+
innerIndex.value = index
|
|
385
|
+
// 移除调试日志
|
|
358
386
|
if (isSetLastIndex) {
|
|
359
387
|
setLastIndex(index)
|
|
360
388
|
}
|
|
361
389
|
}
|
|
362
390
|
|
|
363
391
|
/**
|
|
364
|
-
*
|
|
392
|
+
* 记录上一次的各列索引位置
|
|
365
393
|
* */
|
|
366
394
|
const setLastIndex = (index: number[]) => {
|
|
367
395
|
// 当能进入此方法,意味着当前设置的各列默认索引,即为“上一次”的选中值,需要记录,是因为changeHandler中
|
|
368
396
|
// 需要拿前后的变化值进行对比,得出当前发生改变的是哪一列
|
|
369
|
-
lastIndex.value =
|
|
397
|
+
lastIndex.value = index
|
|
370
398
|
}
|
|
371
399
|
|
|
372
400
|
/**
|
|
373
|
-
*
|
|
401
|
+
* 设置对应列选项的所有值
|
|
374
402
|
* */
|
|
375
403
|
const setColumnValues = (columnI: number, values: AnyObject[]) => {
|
|
376
|
-
// 替换innerColumns数组中columnIndex索引的值为values,使用的是数组的splice方法
|
|
377
404
|
innerColumns.value.splice(columnI, 1, values)
|
|
378
|
-
// 替换完成之后将修改列之后的已选值置空
|
|
379
|
-
setLastIndex(innerIndex.value.slice(0, columnI))
|
|
380
|
-
// 拷贝一份原有的innerIndex做临时变量,将大于当前变化列的所有的列的默认索引设置为0
|
|
381
405
|
let tmpIndex = deepClone(innerIndex.value)
|
|
382
406
|
for (let i = 0; i < innerColumns.value.length; i++) {
|
|
383
407
|
if (i > columnIndex.value) {
|
|
@@ -385,11 +409,11 @@ const setColumnValues = (columnI: number, values: AnyObject[]) => {
|
|
|
385
409
|
}
|
|
386
410
|
}
|
|
387
411
|
// 一次性赋值,不能单个修改,否则无效
|
|
388
|
-
setIndexs(tmpIndex)
|
|
412
|
+
setIndexs(tmpIndex, true)
|
|
389
413
|
}
|
|
390
414
|
|
|
391
415
|
/**
|
|
392
|
-
*
|
|
416
|
+
* 获取对应列的所有选项
|
|
393
417
|
* */
|
|
394
418
|
const getColumnValues = (columnI: number) => {
|
|
395
419
|
// 进行同步阻塞,因为外部得到change事件之后,可能需要执行setColumnValues更新列的值
|
|
@@ -400,25 +424,6 @@ const getColumnValues = (columnI: number) => {
|
|
|
400
424
|
return innerColumns.value[columnI]
|
|
401
425
|
}
|
|
402
426
|
|
|
403
|
-
/**
|
|
404
|
-
* @description 获取各列选中值对应的索引
|
|
405
|
-
* */
|
|
406
|
-
const getIndexs = () => {
|
|
407
|
-
return innerIndex.value
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* @description 获取各列选中的值
|
|
412
|
-
* */
|
|
413
|
-
const getValues = () => {
|
|
414
|
-
// 进行同步阻塞,因为外部得到change事件之后,可能需要执行setColumnValues更新列的值
|
|
415
|
-
// 索引如果在外部change的回调中调用getValues的话,可能无法得到变更后的列值,这里进行一定延时,保证值的准确性
|
|
416
|
-
;(async () => {
|
|
417
|
-
await sleep()
|
|
418
|
-
})()
|
|
419
|
-
return innerColumns.value.map((item, index) => item[innerIndex.value[index]])
|
|
420
|
-
}
|
|
421
|
-
|
|
422
427
|
defineExpose({
|
|
423
428
|
setColumnValues
|
|
424
429
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use "../../libs/css/theme" as *;
|
|
2
|
-
@use "../../libs/css/mixin
|
|
2
|
+
@use "../../libs/css/mixin" as *;
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
@include b(picker) {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
@include edeep(mask) {
|
|
58
|
-
background-image:
|
|
58
|
+
background-image: $hy-background-image--mask--two-flanks;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
@include edeep(loading) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
2
|
+
<view class="hy-popup">
|
|
3
3
|
<hy-overlay
|
|
4
4
|
:show="show"
|
|
5
5
|
@click="overlayClick"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
@click="clickHandler"
|
|
19
19
|
>
|
|
20
20
|
<!-- @click.stop不能去除,去除会导致居中模式下点击内容区域触发关闭弹窗 -->
|
|
21
|
-
<view class="hy-popup__content" :style="[contentStyle]">
|
|
21
|
+
<view class="hy-popup__content" @tap.stop :style="[contentStyle, customClass]">
|
|
22
22
|
<slot></slot>
|
|
23
23
|
<view
|
|
24
24
|
v-if="closeable"
|
|
@@ -184,7 +184,7 @@ const afterEnter = () => {
|
|
|
184
184
|
emit('open')
|
|
185
185
|
}
|
|
186
186
|
const clickHandler = () => {
|
|
187
|
-
// 由于中部弹出时,其
|
|
187
|
+
// 由于中部弹出时,其transition占据了整个页面相当于遮罩,此时需要发出遮罩点击事件,是否无法通过点击遮罩关闭弹窗
|
|
188
188
|
if (props.mode === 'center') {
|
|
189
189
|
overlayClick()
|
|
190
190
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use "../../libs/css/theme" as *;
|
|
2
|
-
@use "../../libs/css/mixin
|
|
2
|
+
@use "../../libs/css/mixin" as *;
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
@include b(popup) {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
@include e(content) {
|
|
9
9
|
background-color: $hy-background--container;
|
|
10
10
|
position: relative;
|
|
11
|
+
z-index: 9999;
|
|
11
12
|
|
|
12
13
|
@include m(round) {
|
|
13
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use "../../libs/css/theme" as *;
|
|
2
|
-
@use "../../libs/css/mixin
|
|
2
|
+
@use "../../libs/css/mixin" as *;
|
|
3
3
|
|
|
4
4
|
@include b(read-more) {
|
|
5
5
|
@include e(content) {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
@include m(mask) {
|
|
18
18
|
background-image:
|
|
19
|
-
linear-gradient(-180deg, rgba(0, 0, 0, 0) 0%, $hy-background--
|
|
19
|
+
linear-gradient(-180deg, rgba(0, 0, 0, 0) 0%, $hy-background--container 80%);
|
|
20
20
|
padding-top: 100px;
|
|
21
21
|
margin-top: -100px;
|
|
22
22
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<view
|
|
30
30
|
v-else
|
|
31
31
|
class="hy-rolling-num__column--symbol"
|
|
32
|
-
:style="{ height: addUnit(height),
|
|
32
|
+
:style="[{ height: addUnit(height) }, textStyle]"
|
|
33
33
|
>
|
|
34
34
|
{{ item.val }}
|
|
35
35
|
</view>
|
|
@@ -174,23 +174,13 @@ const containerStyle = computed<CSSProperties>(() => ({
|
|
|
174
174
|
overflow: 'hidden'
|
|
175
175
|
}))
|
|
176
176
|
|
|
177
|
-
const
|
|
177
|
+
const textStyle = computed<CSSProperties>(() => ({
|
|
178
178
|
fontSize: addUnit(props.size),
|
|
179
179
|
color: props.color,
|
|
180
180
|
fontWeight: props.fontWeight,
|
|
181
181
|
lineHeight: addUnit(props.height),
|
|
182
182
|
...props.customStyle
|
|
183
183
|
}))
|
|
184
|
-
|
|
185
|
-
const textStyle = computed(() => {
|
|
186
|
-
let s = ''
|
|
187
|
-
const obj = textStyleObject.value
|
|
188
|
-
for (const key in obj) {
|
|
189
|
-
// @ts-ignore
|
|
190
|
-
s += `${key}:${obj[key]};`
|
|
191
|
-
}
|
|
192
|
-
return s
|
|
193
|
-
})
|
|
194
184
|
</script>
|
|
195
185
|
|
|
196
186
|
<style lang="scss" scoped>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use "../../libs/css/theme" as *;
|
|
2
|
-
@use "../../libs/css/mixin
|
|
2
|
+
@use "../../libs/css/mixin" as *;
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
@include b(swiper) {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
flex: 1;
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
@include m(
|
|
27
|
+
@include m(image, video){
|
|
28
28
|
flex: 1;
|
|
29
29
|
}
|
|
30
30
|
|