uview-plus 3.8.49 → 3.8.86
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/changelog.md +2043 -1827
- package/components/u-action-sheet/props.js +3 -1
- package/components/u-action-sheet/u-action-sheet.vue +1 -0
- package/components/u-album/props.js +3 -1
- package/components/u-alert/props.js +4 -2
- package/components/u-avatar/props.js +4 -1
- package/components/u-avatar-group/props.js +4 -1
- package/components/u-back-top/props.js +4 -1
- package/components/u-badge/props.js +4 -1
- package/components/u-barcode/u-barcode.vue +46 -15
- package/components/u-box/props.js +5 -2
- package/components/u-button/props.js +4 -1
- package/components/u-button/vue.scss +3 -3
- package/components/u-calendar/calendar.js +14 -2
- package/components/u-calendar/month.vue +41 -6
- package/components/u-calendar/props.js +63 -1
- package/components/u-calendar/u-calendar.vue +311 -2
- package/components/u-calendar-strip/props.js +3 -1
- package/components/u-canvas/u-canvas.vue +734 -423
- package/components/u-car-keyboard/props.js +3 -1
- package/components/u-card/props.js +3 -1
- package/components/u-cell/props.js +4 -1
- package/components/u-cell/u-cell.vue +1 -1
- package/components/u-cell-group/props.js +4 -1
- package/components/u-checkbox/props.js +4 -1
- package/components/u-checkbox/u-checkbox.vue +7 -3
- package/components/u-checkbox-group/props.js +3 -1
- package/components/u-circle-progress/props.js +4 -1
- package/components/u-code/props.js +4 -1
- package/components/u-code-input/props.js +4 -1
- package/components/u-col/props.js +4 -1
- package/components/u-collapse/props.js +4 -1
- package/components/u-collapse-item/props.js +4 -1
- package/components/u-color-picker/u-color-picker.vue +1 -0
- package/components/u-column-notice/props.js +4 -1
- package/components/u-count-down/props.js +4 -1
- package/components/u-count-to/props.js +4 -1
- package/components/u-cropper/u-cropper.vue +95 -51
- package/components/u-datetime-picker/props.js +4 -1
- package/components/u-divider/props.js +4 -1
- package/components/u-dragsort/u-dragsort.vue +2 -1
- package/components/u-dropdown/props.js +3 -1
- package/components/u-dropdown-item/props.js +3 -1
- package/components/u-empty/props.js +4 -1
- package/components/u-form/props.js +4 -1
- package/components/u-form-item/props.js +4 -1
- package/components/u-gap/props.js +4 -1
- package/components/u-grid/props.js +4 -1
- package/components/u-grid-item/props.js +4 -1
- package/components/u-guide/props.js +3 -1
- package/components/u-icon/props.js +4 -1
- package/components/u-icon/u-icon.vue +2 -2
- package/components/u-icon/upicon.ttf +0 -0
- package/components/u-icon/util.js +29 -7
- package/components/u-image/props.js +4 -1
- package/components/u-image/u-image.vue +280 -267
- package/components/u-index-anchor/props.js +4 -1
- package/components/u-index-item/props.js +2 -1
- package/components/u-index-list/props.js +4 -1
- package/components/u-input/props.js +3 -1
- package/components/u-input/u-input.vue +10 -1
- package/components/u-keyboard/props.js +4 -1
- package/components/u-line/props.js +4 -1
- package/components/u-line-progress/props.js +6 -3
- package/components/u-link/props.js +4 -1
- package/components/u-list/props.js +4 -1
- package/components/u-list-item/props.js +4 -1
- package/components/u-loading-icon/props.js +4 -1
- package/components/u-loading-page/props.js +3 -1
- package/components/u-loadmore/props.js +4 -1
- package/components/u-markdown/u-markdown.vue +45 -3
- package/components/u-modal/props.js +4 -1
- package/components/u-navbar/props.js +4 -2
- package/components/u-navbar/u-navbar.vue +15 -9
- package/components/u-no-network/props.js +4 -1
- package/components/u-notice-bar/props.js +4 -1
- package/components/u-notify/props.js +4 -1
- package/components/u-number-box/props.js +4 -1
- package/components/u-number-box/u-number-box.vue +2 -2
- package/components/u-number-keyboard/props.js +4 -1
- package/components/u-overlay/props.js +4 -1
- package/components/u-pagination/u-pagination.vue +60 -39
- package/components/u-parse/props.js +4 -1
- package/components/u-picker/props.js +4 -1
- package/components/u-picker/u-picker.vue +15 -0
- package/components/u-picker-column/props.js +3 -1
- package/components/u-popover/props.js +2 -1
- package/components/u-popup/props.js +4 -1
- package/components/u-poster/u-poster.vue +29 -14
- package/components/u-qrcode/qrcode.js +88 -87
- package/components/u-qrcode/u-qrcode.vue +138 -256
- package/components/u-radio/props.js +4 -1
- package/components/u-radio/u-radio.vue +7 -3
- package/components/u-radio-group/props.js +4 -1
- package/components/u-rate/props.js +4 -1
- package/components/u-read-more/props.js +4 -1
- package/components/u-row/props.js +4 -1
- package/components/u-row-notice/props.js +4 -1
- package/components/u-safe-bottom/props.js +2 -1
- package/components/u-scroll-list/props.js +4 -1
- package/components/u-search/props.js +3 -1
- package/components/u-skeleton/props.js +4 -1
- package/components/u-slider/props.js +3 -1
- package/components/u-slider/u-slider.vue +70 -28
- package/components/u-status-bar/props.js +4 -1
- package/components/u-steps/props.js +4 -1
- package/components/u-steps-item/props.js +4 -1
- package/components/u-sticky/props.js +4 -1
- package/components/u-sticky/u-sticky.vue +11 -0
- package/components/u-subsection/props.js +3 -1
- package/components/u-swipe-action/props.js +4 -1
- package/components/u-swipe-action-item/props.js +4 -1
- package/components/u-swipe-action-item/u-swipe-action-item.vue +14 -0
- package/components/u-swiper/props.js +9 -1
- package/components/u-swiper/swiper.js +1 -0
- package/components/u-swiper/u-swiper.vue +2 -0
- package/components/u-swiper-indicator/props.js +4 -1
- package/components/u-switch/props.js +4 -1
- package/components/u-tabbar/props.js +3 -1
- package/components/u-tabbar-item/props.js +4 -1
- package/components/u-table/props.js +3 -1
- package/components/u-table2/tableRow.vue +155 -69
- package/components/u-table2/u-table2.vue +328 -140
- package/components/u-tabs/props.js +4 -1
- package/components/u-tabs-item/props.js +3 -1
- package/components/u-tag/props.js +4 -1
- package/components/u-td/props.js +3 -1
- package/components/u-text/props.js +4 -1
- package/components/u-textarea/props.js +3 -1
- package/components/u-textarea/u-textarea.vue +16 -5
- package/components/u-th/props.js +3 -1
- package/components/u-toolbar/props.js +4 -1
- package/components/u-tooltip/props.js +10 -2
- package/components/u-tooltip/tooltip.js +2 -1
- package/components/u-tooltip/u-tooltip.vue +31 -3
- package/components/u-tr/props.js +3 -1
- package/components/u-transition/nvue-ani-map.js +75 -68
- package/components/u-transition/props.js +4 -1
- package/components/u-transition/transitionMixin.js +164 -163
- package/components/u-upload/props.js +4 -1
- package/components/u-upload/u-upload.vue +47 -40
- package/components/u-waterfall/u-waterfall.vue +50 -51
- package/index.js +65 -8
- package/libs/config/props.js +179 -204
- package/libs/css/components.scss +3 -0
- package/libs/function/uni-api-shims.js +29 -0
- package/libs/i18n/index.js +71 -36
- package/libs/i18n/locale-packs.js +11 -0
- package/libs/i18n/locales/all.js +23 -0
- package/libs/i18n/locales/{de.json → de.js} +1 -1
- package/libs/i18n/locales/{en.json → en.js} +2 -2
- package/libs/i18n/locales/{es.json → es.js} +1 -1
- package/libs/i18n/locales/{fr.json → fr.js} +2 -2
- package/libs/i18n/locales/{ja.json → ja.js} +1 -1
- package/libs/i18n/locales/{ko.json → ko.js} +1 -1
- package/libs/i18n/locales/{ru.json → ru.js} +1 -1
- package/libs/i18n/locales/{th.json → th.js} +1 -1
- package/libs/i18n/locales/{zh-Hans.json → zh-Hans.js} +1 -1
- package/libs/i18n/locales/{zh-Hant.json → zh-Hant.js} +1 -1
- package/libs/mixin/mixin.js +14 -4
- package/libs/util/gcanvas/bridge/bridge-weex.js +10 -5
- package/package.json +4 -5
- package/tsconfig.json +18 -0
- package/types/comps/calendar.d.ts +57 -0
- package/types/comps/checkbox.d.ts +12 -0
- package/types/comps/lineProgress.d.ts +5 -0
- package/types/comps/navbar.d.ts +3 -3
- package/types/comps/swiper.d.ts +5 -0
- package/types/comps/tooltip.d.ts +36 -1
- /package/components/u-markdown/{marked.esm.js → marked.esm.mjs} +0 -0
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
import { mpMixin } from '../../libs/mixin/mpMixin'
|
|
102
102
|
import { mixin } from '../../libs/mixin/mixin'
|
|
103
103
|
import { addUnit, addStyle, getPx, sleep } from '../../libs/function/index.js'
|
|
104
|
+
import { digitLength, strip } from '../../libs/function/digit.js'
|
|
104
105
|
// #ifdef APP-NVUE
|
|
105
106
|
const dom = uni.requireNativePlugin('dom')
|
|
106
107
|
// #endif
|
|
@@ -326,16 +327,18 @@
|
|
|
326
327
|
clientX = touches.screenX;
|
|
327
328
|
clientY = touches.screenY;
|
|
328
329
|
// #endif
|
|
330
|
+
const min = this.toSliderNumber(this.min)
|
|
331
|
+
const max = this.toSliderNumber(this.max, 100)
|
|
329
332
|
if (this.vertical) {
|
|
330
333
|
this.distanceY = clientY - this.sliderRect.top;
|
|
331
334
|
// 获得移动距离对整个滑块的值,此为带有多位小数的值,不能用此更新视图
|
|
332
335
|
// 否则造成通信阻塞,需要每改变一个step值时修改一次视图
|
|
333
|
-
this.newValue = ((this.distanceY / this.sliderRect.height) * (
|
|
336
|
+
this.newValue = ((this.distanceY / this.sliderRect.height) * (max - min)) + min;
|
|
334
337
|
} else {
|
|
335
338
|
this.distanceX = clientX - this.sliderRect.left;
|
|
336
339
|
// 获得移动距离对整个滑块的值,此为带有多位小数的值,不能用此更新视图
|
|
337
340
|
// 否则造成通信阻塞,需要每改变一个step值时修改一次视图
|
|
338
|
-
this.newValue = ((this.distanceX / this.sliderRect.width) * (
|
|
341
|
+
this.newValue = ((this.distanceX / this.sliderRect.width) * (max - min)) + min;
|
|
339
342
|
}
|
|
340
343
|
|
|
341
344
|
this.status = 'moving';
|
|
@@ -361,16 +364,18 @@
|
|
|
361
364
|
clientX = touches.screenX;
|
|
362
365
|
clientY = touches.screenY;
|
|
363
366
|
// #endif
|
|
367
|
+
const min = this.toSliderNumber(this.min)
|
|
368
|
+
const max = this.toSliderNumber(this.max, 100)
|
|
364
369
|
if (this.vertical) {
|
|
365
370
|
this.distanceY = clientY - this.sliderRect.top;
|
|
366
371
|
// 获得移动距离对整个滑块的值,此为带有多位小数的值,不能用此更新视图
|
|
367
372
|
// 否则造成通信阻塞,需要每改变一个step值时修改一次视图
|
|
368
|
-
this.newValue = ((this.distanceY / this.sliderRect.height) * (
|
|
373
|
+
this.newValue = ((this.distanceY / this.sliderRect.height) * (max - min)) + min;
|
|
369
374
|
} else {
|
|
370
375
|
this.distanceX = clientX - this.sliderRect.left;
|
|
371
376
|
// 获得移动距离对整个滑块的值,此为带有多位小数的值,不能用此更新视图
|
|
372
377
|
// 否则造成通信阻塞,需要每改变一个step值时修改一次视图
|
|
373
|
-
this.newValue = ((this.distanceX / this.sliderRect.width) * (
|
|
378
|
+
this.newValue = ((this.distanceX / this.sliderRect.width) * (max - min)) + min;
|
|
374
379
|
}
|
|
375
380
|
this.status = 'moving';
|
|
376
381
|
// 发出moving事件
|
|
@@ -407,35 +412,42 @@
|
|
|
407
412
|
// console.log('click', event)
|
|
408
413
|
// #ifndef APP-NVUE
|
|
409
414
|
// nvue下暂时无法获取坐标
|
|
415
|
+
const min = this.toSliderNumber(this.min)
|
|
416
|
+
const max = this.toSliderNumber(this.max, 100)
|
|
410
417
|
if (this.vertical) {
|
|
411
418
|
let clientY = event.detail.y - this.sliderRect.top
|
|
412
419
|
// console.log(this.sliderRect.top, event.detail.y)
|
|
413
|
-
this.newValue = ((clientY / this.sliderRect.height) * (
|
|
420
|
+
this.newValue = ((clientY / this.sliderRect.height) * (max - min)) + min
|
|
414
421
|
this.updateValue(this.newValue, false, 1)
|
|
415
422
|
} else {
|
|
416
423
|
let clientX = event.detail.x - this.sliderRect.left
|
|
417
|
-
this.newValue = ((clientX / this.sliderRect.width) * (
|
|
424
|
+
this.newValue = ((clientX / this.sliderRect.width) * (max - min)) + min
|
|
418
425
|
this.updateValue(this.newValue, false, 1)
|
|
419
426
|
}
|
|
420
427
|
// #endif
|
|
421
428
|
},
|
|
422
429
|
updateValue(value, drag, index = 1) {
|
|
423
|
-
// 去掉小数部分,同时也是对step步进的处理
|
|
424
430
|
let valueFormat = this.format(value, index)
|
|
431
|
+
const min = this.toSliderNumber(this.min)
|
|
432
|
+
const max = this.toSliderNumber(this.max, 100)
|
|
433
|
+
const range = max - min
|
|
425
434
|
// 不允许滑动的值超过max最大值
|
|
426
|
-
if(valueFormat >
|
|
427
|
-
valueFormat =
|
|
435
|
+
if(valueFormat > max ) {
|
|
436
|
+
valueFormat = max
|
|
437
|
+
}
|
|
438
|
+
if(valueFormat < min ) {
|
|
439
|
+
valueFormat = min
|
|
428
440
|
}
|
|
429
441
|
// 设置移动的距离,不能用百分比,因为NVUE不支持。
|
|
430
442
|
let sliderLength = 0
|
|
431
443
|
let barStyle = {}
|
|
432
444
|
if (this.vertical) {
|
|
433
|
-
sliderLength = Math.min((valueFormat -
|
|
445
|
+
sliderLength = range === 0 ? 0 : Math.min((valueFormat - min) / range * this.sliderRect.height, this.sliderRect.height)
|
|
434
446
|
barStyle['height'] = addUnit(sliderLength)
|
|
435
447
|
barStyle['width'] = addUnit(this.sizeLocal)
|
|
436
448
|
barStyle['marginLeft'] = '-' + getPx(this.sizeLocal, true)
|
|
437
449
|
} else {
|
|
438
|
-
sliderLength = Math.min((valueFormat -
|
|
450
|
+
sliderLength = range === 0 ? 0 : Math.min((valueFormat - min) / range * this.sliderRect.width, this.sliderRect.width)
|
|
439
451
|
barStyle['width'] = addUnit(sliderLength)
|
|
440
452
|
barStyle['height'] = addUnit(this.sizeLocal)
|
|
441
453
|
barStyle['marginTop'] = '-' + getPx(this.sizeLocal, true)
|
|
@@ -477,31 +489,61 @@
|
|
|
477
489
|
return valueFormat
|
|
478
490
|
}
|
|
479
491
|
},
|
|
492
|
+
toSliderNumber(value, fallback = 0) {
|
|
493
|
+
const number = Number(value)
|
|
494
|
+
return Number.isFinite(number) ? number : fallback
|
|
495
|
+
},
|
|
496
|
+
getSliderStep() {
|
|
497
|
+
const step = this.toSliderNumber(this.step, 1)
|
|
498
|
+
return step > 0 ? step : 1
|
|
499
|
+
},
|
|
500
|
+
normalizeSliderValue(value, ...refs) {
|
|
501
|
+
const precision = Math.min(
|
|
502
|
+
15,
|
|
503
|
+
Math.max(
|
|
504
|
+
digitLength(value),
|
|
505
|
+
digitLength(this.toSliderNumber(this.min)),
|
|
506
|
+
digitLength(this.toSliderNumber(this.max, 100)),
|
|
507
|
+
digitLength(this.getSliderStep()),
|
|
508
|
+
...refs.map(item => digitLength(this.toSliderNumber(item)))
|
|
509
|
+
)
|
|
510
|
+
)
|
|
511
|
+
return Number(strip(value).toFixed(precision))
|
|
512
|
+
},
|
|
513
|
+
formatByStep(value, lowerLimit, upperLimit) {
|
|
514
|
+
const min = this.toSliderNumber(this.min)
|
|
515
|
+
const max = this.toSliderNumber(this.max, 100)
|
|
516
|
+
const step = this.getSliderStep()
|
|
517
|
+
const lower = Math.min(Math.max(this.toSliderNumber(lowerLimit, min), min), max)
|
|
518
|
+
const upper = Math.max(Math.min(this.toSliderNumber(upperLimit, max), max), lower)
|
|
519
|
+
const boundedValue = Math.max(lower, Math.min(this.toSliderNumber(value, min), upper))
|
|
520
|
+
const steps = Math.round((boundedValue - min) / step)
|
|
521
|
+
const valueFormat = this.normalizeSliderValue(min + steps * step, boundedValue)
|
|
522
|
+
return this.normalizeSliderValue(Math.max(lower, Math.min(valueFormat, upper)), boundedValue)
|
|
523
|
+
},
|
|
480
524
|
format(value, index = 1) {
|
|
481
|
-
// 将小数变成整数,为了减少对视图的更新,造成视图层与逻辑层的阻塞
|
|
482
525
|
if (this.isRange) {
|
|
526
|
+
const min = this.toSliderNumber(this.min)
|
|
527
|
+
const max = this.toSliderNumber(this.max, 100)
|
|
528
|
+
const step = this.getSliderStep()
|
|
483
529
|
switch (index) {
|
|
484
530
|
case 0:
|
|
485
|
-
return
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
531
|
+
return this.formatByStep(
|
|
532
|
+
value,
|
|
533
|
+
min,
|
|
534
|
+
this.normalizeSliderValue(this.toSliderNumber(this.rangeValue[1], max) - step)
|
|
535
|
+
)
|
|
490
536
|
case 1:
|
|
491
|
-
return
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
537
|
+
return this.formatByStep(
|
|
538
|
+
value,
|
|
539
|
+
this.normalizeSliderValue(this.toSliderNumber(this.rangeValue[0], min) + step),
|
|
540
|
+
max
|
|
541
|
+
)
|
|
496
542
|
default:
|
|
497
|
-
|
|
543
|
+
return this.formatByStep(value, min, max)
|
|
498
544
|
}
|
|
499
|
-
} else {
|
|
500
|
-
return Math.round(
|
|
501
|
-
Math.max(this.min, Math.min(value, this.max))
|
|
502
|
-
/ parseInt(this.step)
|
|
503
|
-
) * parseInt(this.step);
|
|
504
545
|
}
|
|
546
|
+
return this.formatByStep(value, this.min, this.max)
|
|
505
547
|
}
|
|
506
548
|
}
|
|
507
549
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import StatusBarDefaultProps from './statusBar'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(StatusBarDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
bgColor: {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import StepsDefaultProps from './steps'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(StepsDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 排列方向
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import StepsItemDefaultProps from './stepsItem'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(StepsItemDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 标题
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import StickyDefaultProps from './sticky'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(StickyDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
|
|
@@ -159,6 +159,17 @@
|
|
|
159
159
|
this.cssSticky = true
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
// 鸿蒙系统现代 WebView 支持 css sticky;显式判断以避免静态检查告警
|
|
163
|
+
// platform 可能为 harmony / harmonyos / ohos
|
|
164
|
+
const platformName = os()
|
|
165
|
+
if (
|
|
166
|
+
platformName === 'harmony' ||
|
|
167
|
+
platformName === 'harmonyos' ||
|
|
168
|
+
platformName === 'ohos'
|
|
169
|
+
) {
|
|
170
|
+
this.cssSticky = true
|
|
171
|
+
}
|
|
172
|
+
|
|
162
173
|
// APP-Vue和微信平台,通过computedStyle判断是否支持css sticky
|
|
163
174
|
// #ifdef APP-VUE || MP-WEIXIN || MP-TOUTIAO
|
|
164
175
|
this.cssSticky = await this.checkComputedStyle()
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {defineMixin} from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import SubsectionDefaultProps from './subsection'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
4
|
|
|
5
|
+
const defProps = registerComponentProps(SubsectionDefaultProps)
|
|
4
6
|
export const props = defineMixin({
|
|
5
7
|
props: {
|
|
6
8
|
// tab的数据
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import SwipeActionDefaultProps from './swipeAction'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(SwipeActionDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 是否自动关闭其他swipe按钮组
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import SwipeActionItemDefaultProps from './swipeActionItem'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(SwipeActionItemDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 控制打开或者关闭
|
|
@@ -214,11 +214,23 @@
|
|
|
214
214
|
/* #ifndef APP-NVUE || MP-WEIXIN */
|
|
215
215
|
touch-action: pan-y;
|
|
216
216
|
/* #endif */
|
|
217
|
+
/* #ifndef APP-NVUE */
|
|
218
|
+
// 触发独立合成层,避免 H5 下 overflow 裁剪失效导致右侧按钮露边
|
|
219
|
+
transform: translateZ(0);
|
|
220
|
+
/* #endif */
|
|
217
221
|
|
|
218
222
|
&__content {
|
|
223
|
+
position: relative;
|
|
224
|
+
// 保证内容层始终铺满整行,避免关闭态右侧露出删除按钮底色
|
|
225
|
+
width: 100%;
|
|
219
226
|
transform: translateX(0px); // 修复某些情况下默认右侧按钮是展开的问题
|
|
220
227
|
background-color: var(--up-card-bg-color, #FFFFFF);
|
|
221
228
|
z-index: 10;
|
|
229
|
+
/* #ifndef APP-NVUE */
|
|
230
|
+
// 覆盖 H5 亚像素渲染时内容层与容器之间的 1px 缝隙
|
|
231
|
+
box-shadow: 1px 0 0 var(--up-card-bg-color, #FFFFFF);
|
|
232
|
+
box-sizing: border-box;
|
|
233
|
+
/* #endif */
|
|
222
234
|
}
|
|
223
235
|
|
|
224
236
|
&__right {
|
|
@@ -226,6 +238,8 @@
|
|
|
226
238
|
top: 0;
|
|
227
239
|
bottom: 0;
|
|
228
240
|
right: 0;
|
|
241
|
+
height: 100%;
|
|
242
|
+
z-index: 1;
|
|
229
243
|
@include flex;
|
|
230
244
|
|
|
231
245
|
&__button {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import SwiperDefaultProps from './swiper'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(SwiperDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
|
|
@@ -62,6 +65,11 @@ export const props = defineMixin({
|
|
|
62
65
|
type: Boolean,
|
|
63
66
|
default: () => defProps.swiper.circular
|
|
64
67
|
},
|
|
68
|
+
// 滑动方向是否为纵向
|
|
69
|
+
vertical: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: () => defProps.swiper.vertical
|
|
72
|
+
},
|
|
65
73
|
// 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持
|
|
66
74
|
previousMargin: {
|
|
67
75
|
type: [String, Number],
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
:autoplay="autoplay"
|
|
28
28
|
:current="current"
|
|
29
29
|
:currentItemId="currentItemId"
|
|
30
|
+
:vertical="vertical"
|
|
30
31
|
:previousMargin="addUnit(previousMargin)"
|
|
31
32
|
:nextMargin="addUnit(nextMargin)"
|
|
32
33
|
:acceleration="acceleration"
|
|
@@ -113,6 +114,7 @@
|
|
|
113
114
|
* @property {String | Number} interval 滑块自动切换时间间隔(ms)(默认 3000 )
|
|
114
115
|
* @property {String | Number} duration 滑块切换过程所需时间(ms)(默认 300 )
|
|
115
116
|
* @property {Boolean} circular 播放到末尾后是否重新回到开头(默认 false )
|
|
117
|
+
* @property {Boolean} vertical 滑动方向是否为纵向(默认 false )
|
|
116
118
|
* @property {String | Number} previousMargin 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持(默认 0 )
|
|
117
119
|
* @property {String | Number} nextMargin 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持(默认 0 )
|
|
118
120
|
* @property {Boolean} acceleration 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持(默认 false )
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import SwiperIndicatorDefaultProps from './swipterIndicator'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(SwiperIndicatorDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 轮播的长度
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import SwitchDefaultProps from './switch'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(SwitchDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 是否为加载中状态
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import TabbarDefaultProps from './tabbar'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
4
|
|
|
5
|
+
const defProps = registerComponentProps(TabbarDefaultProps)
|
|
4
6
|
export const props = defineMixin({
|
|
5
7
|
props: {
|
|
6
8
|
// 当前匹配项的name
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import TabbarItemDefaultProps from './tabbarItem'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(TabbarItemDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// item标签的名称,作为与u-tabbar的value参数匹配的标识符
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
|
+
|
|
4
|
+
const defProps = registerComponentProps({ table: {} })
|
|
3
5
|
export const props = defineMixin({
|
|
4
6
|
props: {
|
|
5
7
|
|