uview-plus 3.0.3
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/LICENSE +21 -0
- package/README.md +64 -0
- package/changelog.md +8 -0
- package/components/u--form/u--form.vue +78 -0
- package/components/u--image/u--image.vue +47 -0
- package/components/u--input/u--input.vue +73 -0
- package/components/u--text/u--text.vue +44 -0
- package/components/u--textarea/u--textarea.vue +48 -0
- package/components/u-action-sheet/props.js +54 -0
- package/components/u-action-sheet/u-action-sheet.vue +278 -0
- package/components/u-album/props.js +59 -0
- package/components/u-album/u-album.vue +259 -0
- package/components/u-alert/props.js +44 -0
- package/components/u-alert/u-alert.vue +243 -0
- package/components/u-avatar/props.js +78 -0
- package/components/u-avatar/u-avatar.vue +172 -0
- package/components/u-avatar-group/props.js +52 -0
- package/components/u-avatar-group/u-avatar-group.vue +103 -0
- package/components/u-back-top/props.js +54 -0
- package/components/u-back-top/u-back-top.vue +129 -0
- package/components/u-badge/props.js +72 -0
- package/components/u-badge/u-badge.vue +171 -0
- package/components/u-button/nvue.scss +46 -0
- package/components/u-button/props.js +161 -0
- package/components/u-button/u-button.vue +490 -0
- package/components/u-button/vue.scss +80 -0
- package/components/u-calendar/header.vue +99 -0
- package/components/u-calendar/month.vue +580 -0
- package/components/u-calendar/props.js +144 -0
- package/components/u-calendar/u-calendar.vue +384 -0
- package/components/u-calendar/util.js +85 -0
- package/components/u-car-keyboard/props.js +14 -0
- package/components/u-car-keyboard/u-car-keyboard.vue +311 -0
- package/components/u-cell/props.js +110 -0
- package/components/u-cell/u-cell.vue +229 -0
- package/components/u-cell-group/props.js +14 -0
- package/components/u-cell-group/u-cell-group.vue +61 -0
- package/components/u-checkbox/props.js +69 -0
- package/components/u-checkbox/u-checkbox.vue +344 -0
- package/components/u-checkbox-group/props.js +82 -0
- package/components/u-checkbox-group/u-checkbox-group.vue +103 -0
- package/components/u-circle-progress/props.js +8 -0
- package/components/u-circle-progress/u-circle-progress.vue +198 -0
- package/components/u-code/props.js +34 -0
- package/components/u-code/u-code.vue +129 -0
- package/components/u-code-input/props.js +79 -0
- package/components/u-code-input/u-code-input.vue +252 -0
- package/components/u-col/props.js +29 -0
- package/components/u-col/u-col.vue +162 -0
- package/components/u-collapse/props.js +19 -0
- package/components/u-collapse/u-collapse.vue +90 -0
- package/components/u-collapse-item/props.js +59 -0
- package/components/u-collapse-item/u-collapse-item.vue +225 -0
- package/components/u-column-notice/props.js +55 -0
- package/components/u-column-notice/u-column-notice.vue +160 -0
- package/components/u-count-down/props.js +24 -0
- package/components/u-count-down/u-count-down.vue +163 -0
- package/components/u-count-down/utils.js +62 -0
- package/components/u-count-to/props.js +59 -0
- package/components/u-count-to/u-count-to.vue +184 -0
- package/components/u-datetime-picker/props.js +116 -0
- package/components/u-datetime-picker/u-datetime-picker.vue +362 -0
- package/components/u-divider/props.js +44 -0
- package/components/u-divider/u-divider.vue +116 -0
- package/components/u-dropdown/props.js +65 -0
- package/components/u-dropdown/u-dropdown.vue +127 -0
- package/components/u-dropdown-item/props.js +36 -0
- package/components/u-dropdown-item/u-dropdown-item.vue +146 -0
- package/components/u-empty/props.js +59 -0
- package/components/u-empty/u-empty.vue +128 -0
- package/components/u-form/props.js +45 -0
- package/components/u-form/u-form.vue +214 -0
- package/components/u-form-item/props.js +43 -0
- package/components/u-form-item/u-form-item.vue +235 -0
- package/components/u-gap/props.js +24 -0
- package/components/u-gap/u-gap.vue +38 -0
- package/components/u-grid/props.js +19 -0
- package/components/u-grid/u-grid.vue +97 -0
- package/components/u-grid-item/props.js +14 -0
- package/components/u-grid-item/u-grid-item.vue +209 -0
- package/components/u-icon/icons.js +214 -0
- package/components/u-icon/props.js +89 -0
- package/components/u-icon/u-icon.vue +234 -0
- package/components/u-image/props.js +84 -0
- package/components/u-image/u-image.vue +232 -0
- package/components/u-index-anchor/props.js +29 -0
- package/components/u-index-anchor/u-index-anchor.vue +91 -0
- package/components/u-index-item/props.js +5 -0
- package/components/u-index-item/u-index-item.vue +87 -0
- package/components/u-index-list/props.js +29 -0
- package/components/u-index-list/u-index-list.vue +440 -0
- package/components/u-input/props.js +187 -0
- package/components/u-input/u-input.vue +354 -0
- package/components/u-keyboard/props.js +84 -0
- package/components/u-keyboard/u-keyboard.vue +164 -0
- package/components/u-line/props.js +33 -0
- package/components/u-line/u-line.vue +62 -0
- package/components/u-line-progress/props.js +28 -0
- package/components/u-line-progress/u-line-progress.vue +144 -0
- package/components/u-link/props.js +39 -0
- package/components/u-link/u-link.vue +83 -0
- package/components/u-list/props.js +76 -0
- package/components/u-list/u-list.vue +157 -0
- package/components/u-list-item/props.js +9 -0
- package/components/u-list-item/u-list-item.vue +116 -0
- package/components/u-loading-icon/props.js +59 -0
- package/components/u-loading-icon/u-loading-icon.vue +343 -0
- package/components/u-loading-page/props.js +49 -0
- package/components/u-loading-page/u-loading-page.vue +115 -0
- package/components/u-loadmore/props.js +94 -0
- package/components/u-loadmore/u-loadmore.vue +150 -0
- package/components/u-modal/props.js +84 -0
- package/components/u-modal/u-modal.vue +227 -0
- package/components/u-navbar/props.js +84 -0
- package/components/u-navbar/u-navbar.vue +186 -0
- package/components/u-no-network/props.js +19 -0
- package/components/u-no-network/u-no-network.vue +220 -0
- package/components/u-notice-bar/props.js +70 -0
- package/components/u-notice-bar/u-notice-bar.vue +101 -0
- package/components/u-notify/props.js +49 -0
- package/components/u-notify/u-notify.vue +211 -0
- package/components/u-number-box/props.js +109 -0
- package/components/u-number-box/u-number-box.vue +416 -0
- package/components/u-number-keyboard/props.js +19 -0
- package/components/u-number-keyboard/u-number-keyboard.vue +196 -0
- package/components/u-overlay/props.js +24 -0
- package/components/u-overlay/u-overlay.vue +68 -0
- package/components/u-parse/node/node.vue +499 -0
- package/components/u-parse/parser.js +1075 -0
- package/components/u-parse/props.js +45 -0
- package/components/u-parse/u-parse.vue +366 -0
- package/components/u-picker/props.js +79 -0
- package/components/u-picker/u-picker.vue +283 -0
- package/components/u-picker-column/props.js +5 -0
- package/components/u-picker-column/u-picker-column.vue +27 -0
- package/components/u-popup/props.js +79 -0
- package/components/u-popup/u-popup.vue +304 -0
- package/components/u-radio/props.js +64 -0
- package/components/u-radio/u-radio.vue +337 -0
- package/components/u-radio-group/props.js +85 -0
- package/components/u-radio-group/u-radio-group.vue +108 -0
- package/components/u-rate/props.js +69 -0
- package/components/u-rate/u-rate.vue +304 -0
- package/components/u-read-more/props.js +61 -0
- package/components/u-read-more/u-read-more.vue +157 -0
- package/components/u-row/props.js +19 -0
- package/components/u-row/u-row.vue +93 -0
- package/components/u-row-notice/props.js +39 -0
- package/components/u-row-notice/u-row-notice.vue +330 -0
- package/components/u-safe-bottom/props.js +5 -0
- package/components/u-safe-bottom/u-safe-bottom.vue +56 -0
- package/components/u-scroll-list/nvue.js +28 -0
- package/components/u-scroll-list/other.js +0 -0
- package/components/u-scroll-list/props.js +34 -0
- package/components/u-scroll-list/scrollWxs.wxs +50 -0
- package/components/u-scroll-list/u-scroll-list.vue +224 -0
- package/components/u-search/props.js +118 -0
- package/components/u-search/u-search.vue +303 -0
- package/components/u-skeleton/props.js +59 -0
- package/components/u-skeleton/u-skeleton.vue +244 -0
- package/components/u-slider/mpother.js +113 -0
- package/components/u-slider/mpwxs.js +42 -0
- package/components/u-slider/mpwxs.wxs +121 -0
- package/components/u-slider/nvue - /345/211/257/346/234/254.js" +180 -0
- package/components/u-slider/nvue.js +193 -0
- package/components/u-slider/props.js +54 -0
- package/components/u-slider/u-slider.vue +55 -0
- package/components/u-status-bar/props.js +8 -0
- package/components/u-status-bar/u-status-bar.vue +46 -0
- package/components/u-steps/props.js +39 -0
- package/components/u-steps/u-steps.vue +80 -0
- package/components/u-steps-item/props.js +24 -0
- package/components/u-steps-item/u-steps-item.vue +316 -0
- package/components/u-sticky/props.js +40 -0
- package/components/u-sticky/u-sticky.vue +212 -0
- package/components/u-subsection/props.js +49 -0
- package/components/u-subsection/u-subsection.vue +299 -0
- package/components/u-swipe-action/props.js +9 -0
- package/components/u-swipe-action/u-swipe-action.vue +67 -0
- package/components/u-swipe-action-item/index - backup.wxs +256 -0
- package/components/u-swipe-action-item/index.wxs +225 -0
- package/components/u-swipe-action-item/nvue - backup.js +270 -0
- package/components/u-swipe-action-item/nvue.js +174 -0
- package/components/u-swipe-action-item/props.js +41 -0
- package/components/u-swipe-action-item/u-swipe-action-item.vue +190 -0
- package/components/u-swipe-action-item/wxs.js +15 -0
- package/components/u-swiper/props.js +125 -0
- package/components/u-swiper/u-swiper.vue +255 -0
- package/components/u-swiper-indicator/props.js +29 -0
- package/components/u-swiper-indicator/u-swiper-indicator.vue +110 -0
- package/components/u-switch/props.js +54 -0
- package/components/u-switch/u-switch.vue +177 -0
- package/components/u-tabbar/props.js +44 -0
- package/components/u-tabbar/u-tabbar.vue +141 -0
- package/components/u-tabbar-item/props.js +35 -0
- package/components/u-tabbar-item/u-tabbar-item.vue +142 -0
- package/components/u-table/props.js +5 -0
- package/components/u-table/u-table.vue +29 -0
- package/components/u-tabs/props.js +64 -0
- package/components/u-tabs/u-tabs.vue +354 -0
- package/components/u-tabs-item/props.js +5 -0
- package/components/u-tabs-item/u-tabs-item.vue +29 -0
- package/components/u-tag/props.js +84 -0
- package/components/u-tag/u-tag.vue +358 -0
- package/components/u-td/props.js +5 -0
- package/components/u-td/u-td.vue +31 -0
- package/components/u-text/props.js +110 -0
- package/components/u-text/u-text.vue +223 -0
- package/components/u-text/value.js +85 -0
- package/components/u-textarea/props.js +119 -0
- package/components/u-textarea/u-textarea.vue +239 -0
- package/components/u-toast/u-toast.vue +291 -0
- package/components/u-toolbar/props.js +34 -0
- package/components/u-toolbar/u-toolbar.vue +102 -0
- package/components/u-tooltip/props.js +59 -0
- package/components/u-tooltip/u-tooltip.vue +366 -0
- package/components/u-tr/props.js +5 -0
- package/components/u-tr/u-tr.vue +31 -0
- package/components/u-transition/nvue.ani-map.js +68 -0
- package/components/u-transition/props.js +24 -0
- package/components/u-transition/transition.js +157 -0
- package/components/u-transition/u-transition.vue +92 -0
- package/components/u-transition/vue.ani-style.scss +113 -0
- package/components/u-upload/mixin.js +21 -0
- package/components/u-upload/props.js +124 -0
- package/components/u-upload/u-upload.vue +558 -0
- package/components/u-upload/utils.js +151 -0
- package/components/uview-plus/uview-plus.vue +15 -0
- package/index.js +77 -0
- package/index.scss +23 -0
- package/libs/config/color.js +17 -0
- package/libs/config/config.js +34 -0
- package/libs/config/props/actionSheet.js +25 -0
- package/libs/config/props/album.js +25 -0
- package/libs/config/props/alert.js +22 -0
- package/libs/config/props/avatar.js +28 -0
- package/libs/config/props/avatarGroup.js +23 -0
- package/libs/config/props/backtop.js +27 -0
- package/libs/config/props/badge.js +27 -0
- package/libs/config/props/button.js +42 -0
- package/libs/config/props/calendar.js +42 -0
- package/libs/config/props/carKeyboard.js +15 -0
- package/libs/config/props/cell.js +35 -0
- package/libs/config/props/cellGroup.js +17 -0
- package/libs/config/props/checkbox.js +27 -0
- package/libs/config/props/checkboxGroup.js +29 -0
- package/libs/config/props/circleProgress.js +15 -0
- package/libs/config/props/code.js +21 -0
- package/libs/config/props/codeInput.js +29 -0
- package/libs/config/props/col.js +19 -0
- package/libs/config/props/collapse.js +17 -0
- package/libs/config/props/collapseItem.js +25 -0
- package/libs/config/props/columnNotice.js +24 -0
- package/libs/config/props/countDown.js +18 -0
- package/libs/config/props/countTo.js +25 -0
- package/libs/config/props/datetimePicker.js +36 -0
- package/libs/config/props/divider.js +23 -0
- package/libs/config/props/empty.js +26 -0
- package/libs/config/props/form.js +22 -0
- package/libs/config/props/formItem.js +22 -0
- package/libs/config/props/gap.js +19 -0
- package/libs/config/props/grid.js +17 -0
- package/libs/config/props/gridItem.js +16 -0
- package/libs/config/props/icon.js +36 -0
- package/libs/config/props/image.js +30 -0
- package/libs/config/props/indexAnchor.js +19 -0
- package/libs/config/props/indexList.js +19 -0
- package/libs/config/props/input.js +48 -0
- package/libs/config/props/keyboard.js +30 -0
- package/libs/config/props/line.js +20 -0
- package/libs/config/props/lineProgress.js +19 -0
- package/libs/config/props/link.js +26 -0
- package/libs/config/props/list.js +28 -0
- package/libs/config/props/listItem.js +15 -0
- package/libs/config/props/loadingIcon.js +30 -0
- package/libs/config/props/loadingPage.js +23 -0
- package/libs/config/props/loadmore.js +32 -0
- package/libs/config/props/modal.js +30 -0
- package/libs/config/props/navbar.js +32 -0
- package/libs/config/props/noNetwork.js +18 -0
- package/libs/config/props/noticeBar.js +27 -0
- package/libs/config/props/notify.js +22 -0
- package/libs/config/props/numberBox.js +35 -0
- package/libs/config/props/numberKeyboard.js +17 -0
- package/libs/config/props/overlay.js +18 -0
- package/libs/config/props/parse.js +22 -0
- package/libs/config/props/picker.js +29 -0
- package/libs/config/props/popup.js +29 -0
- package/libs/config/props/radio.js +27 -0
- package/libs/config/props/radioGroup.js +30 -0
- package/libs/config/props/rate.js +26 -0
- package/libs/config/props/readMore.js +22 -0
- package/libs/config/props/row.js +17 -0
- package/libs/config/props/rowNotice.js +21 -0
- package/libs/config/props/scrollList.js +20 -0
- package/libs/config/props/search.js +37 -0
- package/libs/config/props/section.js +24 -0
- package/libs/config/props/skeleton.js +25 -0
- package/libs/config/props/slider.js +25 -0
- package/libs/config/props/statusBar.js +15 -0
- package/libs/config/props/steps.js +21 -0
- package/libs/config/props/stepsItem.js +18 -0
- package/libs/config/props/sticky.js +20 -0
- package/libs/config/props/subsection.js +23 -0
- package/libs/config/props/swipeAction.js +15 -0
- package/libs/config/props/swipeActionItem.js +21 -0
- package/libs/config/props/swiper.js +39 -0
- package/libs/config/props/swipterIndicator.js +19 -0
- package/libs/config/props/switch.js +24 -0
- package/libs/config/props/tabbar.js +22 -0
- package/libs/config/props/tabbarItem.js +20 -0
- package/libs/config/props/tabs.js +32 -0
- package/libs/config/props/tag.js +29 -0
- package/libs/config/props/text.js +38 -0
- package/libs/config/props/textarea.js +36 -0
- package/libs/config/props/toast.js +30 -0
- package/libs/config/props/toolbar.js +21 -0
- package/libs/config/props/tooltip.js +25 -0
- package/libs/config/props/transition.js +18 -0
- package/libs/config/props/upload.js +36 -0
- package/libs/config/props.js +190 -0
- package/libs/config/zIndex.js +20 -0
- package/libs/css/color.scss +155 -0
- package/libs/css/common.scss +97 -0
- package/libs/css/components.scss +15 -0
- package/libs/css/flex.scss +257 -0
- package/libs/css/h5.scss +0 -0
- package/libs/css/mixin.scss +8 -0
- package/libs/css/mp.scss +0 -0
- package/libs/css/nvue.scss +0 -0
- package/libs/css/vue.scss +27 -0
- package/libs/function/colorGradient.js +134 -0
- package/libs/function/debounce.js +29 -0
- package/libs/function/digit.js +167 -0
- package/libs/function/index.js +708 -0
- package/libs/function/platform.js +75 -0
- package/libs/function/test.js +288 -0
- package/libs/function/throttle.js +30 -0
- package/libs/luch-request/adapters/index.js +97 -0
- package/libs/luch-request/core/InterceptorManager.js +50 -0
- package/libs/luch-request/core/Request.js +198 -0
- package/libs/luch-request/core/buildFullPath.js +20 -0
- package/libs/luch-request/core/defaults.js +29 -0
- package/libs/luch-request/core/dispatchRequest.js +3 -0
- package/libs/luch-request/core/mergeConfig.js +103 -0
- package/libs/luch-request/core/settle.js +16 -0
- package/libs/luch-request/helpers/buildURL.js +69 -0
- package/libs/luch-request/helpers/combineURLs.js +14 -0
- package/libs/luch-request/helpers/isAbsoluteURL.js +14 -0
- package/libs/luch-request/index.d.ts +116 -0
- package/libs/luch-request/index.js +3 -0
- package/libs/luch-request/utils/clone.js +264 -0
- package/libs/luch-request/utils.js +131 -0
- package/libs/mixin/button.js +13 -0
- package/libs/mixin/mixin.js +160 -0
- package/libs/mixin/mpMixin.js +8 -0
- package/libs/mixin/mpShare.js +13 -0
- package/libs/mixin/openType.js +25 -0
- package/libs/mixin/style.js +228 -0
- package/libs/mixin/touch.js +59 -0
- package/libs/util/async-validator.js +1343 -0
- package/libs/util/calendar.js +546 -0
- package/libs/util/emitter.js +51 -0
- package/libs/util/route.js +124 -0
- package/package.json +91 -0
- package/theme.scss +44 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<u-popup
|
|
3
|
+
:overlay="overlay"
|
|
4
|
+
:closeOnClickOverlay="closeOnClickOverlay"
|
|
5
|
+
mode="bottom"
|
|
6
|
+
:popup="false"
|
|
7
|
+
:show="show"
|
|
8
|
+
:safeAreaInsetBottom="safeAreaInsetBottom"
|
|
9
|
+
@close="popupClose"
|
|
10
|
+
:zIndex="zIndex"
|
|
11
|
+
:customStyle="{
|
|
12
|
+
backgroundColor: 'rgb(214, 218, 220)'
|
|
13
|
+
}"
|
|
14
|
+
>
|
|
15
|
+
<view class="u-keyboard">
|
|
16
|
+
<slot />
|
|
17
|
+
<view
|
|
18
|
+
class="u-keyboard__tooltip"
|
|
19
|
+
v-if="tooltip"
|
|
20
|
+
>
|
|
21
|
+
<view
|
|
22
|
+
hover-class="u-hover-class"
|
|
23
|
+
:hover-stay-time="100"
|
|
24
|
+
>
|
|
25
|
+
<text
|
|
26
|
+
class="u-keyboard__tooltip__item u-keyboard__tooltip__cancel"
|
|
27
|
+
v-if="showCancel"
|
|
28
|
+
@tap="onCancel"
|
|
29
|
+
>{{showCancel && cancelText}}</text>
|
|
30
|
+
</view>
|
|
31
|
+
<view>
|
|
32
|
+
<text
|
|
33
|
+
v-if="showTips"
|
|
34
|
+
class="u-keyboard__tooltip__item u-keyboard__tooltip__tips"
|
|
35
|
+
>{{tips ? tips : mode == 'number' ? '数字键盘' : mode == 'card' ? '身份证键盘' : '车牌号键盘'}}</text>
|
|
36
|
+
</view>
|
|
37
|
+
<view
|
|
38
|
+
hover-class="u-hover-class"
|
|
39
|
+
:hover-stay-time="100"
|
|
40
|
+
>
|
|
41
|
+
<text
|
|
42
|
+
v-if="showConfirm"
|
|
43
|
+
@tap="onConfirm"
|
|
44
|
+
class="u-keyboard__tooltip__item u-keyboard__tooltip__submit"
|
|
45
|
+
hover-class="u-hover-class"
|
|
46
|
+
>{{showConfirm && confirmText}}</text>
|
|
47
|
+
</view>
|
|
48
|
+
</view>
|
|
49
|
+
<template v-if="mode == 'number' || mode == 'card'">
|
|
50
|
+
<u-number-keyboard
|
|
51
|
+
:random="random"
|
|
52
|
+
@backspace="backspace"
|
|
53
|
+
@change="change"
|
|
54
|
+
:mode="mode"
|
|
55
|
+
:dotDisabled="dotDisabled"
|
|
56
|
+
></u-number-keyboard>
|
|
57
|
+
</template>
|
|
58
|
+
<template v-else>
|
|
59
|
+
<u-car-keyboard
|
|
60
|
+
:random="random"
|
|
61
|
+
:autoChange="autoChange"
|
|
62
|
+
@backspace="backspace"
|
|
63
|
+
@change="change"
|
|
64
|
+
></u-car-keyboard>
|
|
65
|
+
</template>
|
|
66
|
+
</view>
|
|
67
|
+
</u-popup>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
|
+
import props from './props.js';
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* keyboard 键盘
|
|
75
|
+
* @description 此为uViw自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3中模式,都有可以打乱按键顺序的选项。
|
|
76
|
+
* @tutorial https://www.uviewui.com/components/keyboard.html
|
|
77
|
+
* @property {String} mode 键盘类型,见官网基本使用的说明 (默认 'number' )
|
|
78
|
+
* @property {Boolean} dotDisabled 是否显示"."按键,只在mode=number时有效 (默认 false )
|
|
79
|
+
* @property {Boolean} tooltip 是否显示键盘顶部工具条 (默认 true )
|
|
80
|
+
* @property {Boolean} showTips 是否显示工具条中间的提示 (默认 true )
|
|
81
|
+
* @property {String} tips 工具条中间的提示文字,见上方基本使用的说明,如不需要,请传""空字符
|
|
82
|
+
* @property {Boolean} showCancel 是否显示工具条左边的"取消"按钮 (默认 true )
|
|
83
|
+
* @property {Boolean} showConfirm 是否显示工具条右边的"完成"按钮( 默认 true )
|
|
84
|
+
* @property {Boolean} random 是否打乱键盘按键的顺序 (默认 false )
|
|
85
|
+
* @property {Boolean} safeAreaInsetBottom 是否开启底部安全区适配 (默认 true )
|
|
86
|
+
* @property {Boolean} closeOnClickOverlay 是否允许点击遮罩收起键盘 (默认 true )
|
|
87
|
+
* @property {Boolean} show 控制键盘的弹出与收起(默认 false )
|
|
88
|
+
* @property {Boolean} overlay 是否显示遮罩 (默认 true )
|
|
89
|
+
* @property {String | Number} zIndex 弹出键盘的z-index值 (默认 1075 )
|
|
90
|
+
* @property {String} cancelText 取消按钮的文字 (默认 '取消' )
|
|
91
|
+
* @property {String} confirmText 确认按钮的文字 (默认 '确认' )
|
|
92
|
+
* @property {Object} customStyle 自定义样式,对象形式
|
|
93
|
+
* @event {Function} change 按键被点击(不包含退格键被点击)
|
|
94
|
+
* @event {Function} cancel 键盘顶部工具条左边的"取消"按钮被点击
|
|
95
|
+
* @event {Function} confirm 键盘顶部工具条右边的"完成"按钮被点击
|
|
96
|
+
* @event {Function} backspace 键盘退格键被点击
|
|
97
|
+
* @example <u-keyboard mode="number" v-model="show"></u-keyboard>
|
|
98
|
+
*/
|
|
99
|
+
export default {
|
|
100
|
+
name: "u-keyboard",
|
|
101
|
+
data() {
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
|
|
107
|
+
methods: {
|
|
108
|
+
change(e) {
|
|
109
|
+
this.$emit('change', e);
|
|
110
|
+
},
|
|
111
|
+
// 键盘关闭
|
|
112
|
+
popupClose() {
|
|
113
|
+
this.$emit('close');
|
|
114
|
+
},
|
|
115
|
+
// 输入完成
|
|
116
|
+
onConfirm() {
|
|
117
|
+
this.$emit('confirm');
|
|
118
|
+
},
|
|
119
|
+
// 取消输入
|
|
120
|
+
onCancel() {
|
|
121
|
+
this.$emit('cancel');
|
|
122
|
+
},
|
|
123
|
+
// 退格键
|
|
124
|
+
backspace() {
|
|
125
|
+
this.$emit('backspace');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<style lang="scss" scoped>
|
|
132
|
+
@import "../../libs/css/components.scss";
|
|
133
|
+
|
|
134
|
+
.u-keyboard {
|
|
135
|
+
|
|
136
|
+
&__tooltip {
|
|
137
|
+
@include flex;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
background-color: #FFFFFF;
|
|
140
|
+
padding: 14px 12px;
|
|
141
|
+
|
|
142
|
+
&__item {
|
|
143
|
+
color: #333333;
|
|
144
|
+
flex: 1;
|
|
145
|
+
text-align: center;
|
|
146
|
+
font-size: 15px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&__submit {
|
|
150
|
+
text-align: right;
|
|
151
|
+
color: $u-primary;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&__cancel {
|
|
155
|
+
text-align: left;
|
|
156
|
+
color: #888888;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&__tips {
|
|
160
|
+
color: $u-tips-color;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
color: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: uni.$u.props.line.color
|
|
6
|
+
},
|
|
7
|
+
// 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
|
|
8
|
+
length: {
|
|
9
|
+
type: [String, Number],
|
|
10
|
+
default: uni.$u.props.line.length
|
|
11
|
+
},
|
|
12
|
+
// 线条方向,col-竖向,row-横向
|
|
13
|
+
direction: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: uni.$u.props.line.direction
|
|
16
|
+
},
|
|
17
|
+
// 是否显示细边框
|
|
18
|
+
hairline: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: uni.$u.props.line.hairline
|
|
21
|
+
},
|
|
22
|
+
// 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
|
|
23
|
+
margin: {
|
|
24
|
+
type: [String, Number],
|
|
25
|
+
default: uni.$u.props.line.margin
|
|
26
|
+
},
|
|
27
|
+
// 是否虚线,true-虚线,false-实线
|
|
28
|
+
dashed: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: uni.$u.props.line.dashed
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="u-line"
|
|
4
|
+
:style="[lineStyle]"
|
|
5
|
+
>
|
|
6
|
+
|
|
7
|
+
</view>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import props from './props.js';
|
|
12
|
+
/**
|
|
13
|
+
* line 线条
|
|
14
|
+
* @description 此组件一般用于显示一根线条,用于分隔内容块,有横向和竖向两种模式,且能设置0.5px线条,使用也很简单
|
|
15
|
+
* @tutorial https://www.uviewui.com/components/line.html
|
|
16
|
+
* @property {String} color 线条的颜色 ( 默认 '#d6d7d9' )
|
|
17
|
+
* @property {String | Number} length 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 ( 默认 '100%' )
|
|
18
|
+
* @property {String} direction 线条的方向,row-横向,col-竖向 (默认 'row' )
|
|
19
|
+
* @property {Boolean} hairline 是否显示细线条 (默认 true )
|
|
20
|
+
* @property {String | Number} margin 线条与上下左右元素的间距,字符串形式,如"30px" (默认 0 )
|
|
21
|
+
* @property {Boolean} dashed 是否虚线,true-虚线,false-实线 (默认 false )
|
|
22
|
+
* @property {Object} customStyle 定义需要用到的外部样式
|
|
23
|
+
* @example <u-line color="red"></u-line>
|
|
24
|
+
*/
|
|
25
|
+
export default {
|
|
26
|
+
name: 'u-line',
|
|
27
|
+
mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
|
|
28
|
+
computed: {
|
|
29
|
+
lineStyle() {
|
|
30
|
+
const style = {}
|
|
31
|
+
style.margin = this.margin
|
|
32
|
+
// 如果是水平线条,边框高度为1px,再通过transform缩小一半,就是0.5px了
|
|
33
|
+
if (this.direction === 'row') {
|
|
34
|
+
// 此处采用兼容分开写,兼容nvue的写法
|
|
35
|
+
style.borderBottomWidth = '1px'
|
|
36
|
+
style.borderBottomStyle = this.dashed ? 'dashed' : 'solid'
|
|
37
|
+
style.width = uni.$u.addUnit(this.length)
|
|
38
|
+
if (this.hairline) style.transform = 'scaleY(0.5)'
|
|
39
|
+
} else {
|
|
40
|
+
// 如果是竖向线条,边框宽度为1px,再通过transform缩小一半,就是0.5px了
|
|
41
|
+
style.borderLeftWidth = '1px'
|
|
42
|
+
style.borderLeftStyle = this.dashed ? 'dashed' : 'solid'
|
|
43
|
+
style.height = uni.$u.addUnit(this.length)
|
|
44
|
+
if (this.hairline) style.transform = 'scaleX(0.5)'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
style.borderColor = this.color
|
|
48
|
+
return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle))
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style lang="scss" scoped>
|
|
55
|
+
@import "../../libs/css/components.scss";
|
|
56
|
+
|
|
57
|
+
.u-line {
|
|
58
|
+
/* #ifndef APP-NVUE */
|
|
59
|
+
vertical-align: middle;
|
|
60
|
+
/* #endif */
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// 激活部分的颜色
|
|
4
|
+
activeColor: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: uni.$u.props.lineProgress.activeColor
|
|
7
|
+
},
|
|
8
|
+
inactiveColor: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: uni.$u.props.lineProgress.color
|
|
11
|
+
},
|
|
12
|
+
// 进度百分比,数值
|
|
13
|
+
percentage: {
|
|
14
|
+
type: [String, Number],
|
|
15
|
+
default: uni.$u.props.lineProgress.inactiveColor
|
|
16
|
+
},
|
|
17
|
+
// 是否在进度条内部显示百分比的值
|
|
18
|
+
showText: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: uni.$u.props.lineProgress.showText
|
|
21
|
+
},
|
|
22
|
+
// 进度条的高度,单位px
|
|
23
|
+
height: {
|
|
24
|
+
type: [String, Number],
|
|
25
|
+
default: uni.$u.props.lineProgress.height
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="u-line-progress"
|
|
4
|
+
:style="[$u.addStyle(customStyle)]"
|
|
5
|
+
>
|
|
6
|
+
<view
|
|
7
|
+
class="u-line-progress__background"
|
|
8
|
+
ref="u-line-progress__background"
|
|
9
|
+
:style="[{
|
|
10
|
+
backgroundColor: inactiveColor,
|
|
11
|
+
height: $u.addUnit(height),
|
|
12
|
+
}]"
|
|
13
|
+
>
|
|
14
|
+
</view>
|
|
15
|
+
<view
|
|
16
|
+
class="u-line-progress__line"
|
|
17
|
+
:style="[progressStyle]"
|
|
18
|
+
>
|
|
19
|
+
<slot>
|
|
20
|
+
<text v-if="showText && percentage >= 10" class="u-line-progress__text">{{innserPercentage + '%'}}</text>
|
|
21
|
+
</slot>
|
|
22
|
+
</view>
|
|
23
|
+
</view>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import props from './props.js';
|
|
28
|
+
// #ifdef APP-NVUE
|
|
29
|
+
const dom = uni.requireNativePlugin('dom')
|
|
30
|
+
// #endif
|
|
31
|
+
/**
|
|
32
|
+
* lineProgress 线型进度条
|
|
33
|
+
* @description 展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。
|
|
34
|
+
* @tutorial https://www.uviewui.com/components/lineProgress.html
|
|
35
|
+
* @property {String} activeColor 激活部分的颜色 ( 默认 '#19be6b' )
|
|
36
|
+
* @property {String} inactiveColor 背景色 ( 默认 '#ececec' )
|
|
37
|
+
* @property {String | Number} percentage 进度百分比,数值 ( 默认 0 )
|
|
38
|
+
* @property {Boolean} showText 是否在进度条内部显示百分比的值 ( 默认 true )
|
|
39
|
+
* @property {String | Number} height 进度条的高度,单位px ( 默认 12 )
|
|
40
|
+
*
|
|
41
|
+
* @example <u-line-progress :percent="70" :show-percent="true"></u-line-progress>
|
|
42
|
+
*/
|
|
43
|
+
export default {
|
|
44
|
+
name: "u-line-progress",
|
|
45
|
+
mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
lineWidth: 0,
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
watch: {
|
|
52
|
+
percentage(n) {
|
|
53
|
+
this.resizeProgressWidth()
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
computed: {
|
|
57
|
+
progressStyle() {
|
|
58
|
+
let style = {}
|
|
59
|
+
style.width = this.lineWidth
|
|
60
|
+
style.backgroundColor = this.activeColor
|
|
61
|
+
style.height = uni.$u.addUnit(this.height)
|
|
62
|
+
return style
|
|
63
|
+
},
|
|
64
|
+
innserPercentage() {
|
|
65
|
+
// 控制范围在0-100之间
|
|
66
|
+
return uni.$u.range(0, 100, this.percentage)
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
mounted() {
|
|
70
|
+
this.init()
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
init() {
|
|
74
|
+
uni.$u.sleep(20).then(() => {
|
|
75
|
+
this.resizeProgressWidth()
|
|
76
|
+
})
|
|
77
|
+
},
|
|
78
|
+
getProgressWidth() {
|
|
79
|
+
// #ifndef APP-NVUE
|
|
80
|
+
return this.$uGetRect('.u-line-progress__background')
|
|
81
|
+
// #endif
|
|
82
|
+
|
|
83
|
+
// #ifdef APP-NVUE
|
|
84
|
+
// 返回一个promise
|
|
85
|
+
return new Promise(resolve => {
|
|
86
|
+
dom.getComponentRect(this.$refs['u-line-progress__background'], (res) => {
|
|
87
|
+
resolve(res.size)
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
// #endif
|
|
91
|
+
},
|
|
92
|
+
resizeProgressWidth() {
|
|
93
|
+
this.getProgressWidth().then(size => {
|
|
94
|
+
const {
|
|
95
|
+
width
|
|
96
|
+
} = size
|
|
97
|
+
// 通过设置的percentage值,计算其所占总长度的百分比
|
|
98
|
+
this.lineWidth = width * this.innserPercentage / 100 + 'px'
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</script>
|
|
104
|
+
|
|
105
|
+
<style lang="scss" scoped>
|
|
106
|
+
@import "../../libs/css/components.scss";
|
|
107
|
+
|
|
108
|
+
.u-line-progress {
|
|
109
|
+
align-items: stretch;
|
|
110
|
+
position: relative;
|
|
111
|
+
@include flex(row);
|
|
112
|
+
flex: 1;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
border-radius: 100px;
|
|
115
|
+
|
|
116
|
+
&__background {
|
|
117
|
+
background-color: #ececec;
|
|
118
|
+
border-radius: 100px;
|
|
119
|
+
flex: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&__line {
|
|
123
|
+
position: absolute;
|
|
124
|
+
top: 0;
|
|
125
|
+
left: 0;
|
|
126
|
+
bottom: 0;
|
|
127
|
+
align-items: center;
|
|
128
|
+
@include flex(row);
|
|
129
|
+
color: #ffffff;
|
|
130
|
+
border-radius: 100px;
|
|
131
|
+
transition: width 0.5s ease;
|
|
132
|
+
justify-content: flex-end;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&__text {
|
|
136
|
+
font-size: 10px;
|
|
137
|
+
align-items: center;
|
|
138
|
+
text-align: right;
|
|
139
|
+
color: #FFFFFF;
|
|
140
|
+
margin-right: 5px;
|
|
141
|
+
transform: scale(0.9);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// 文字颜色
|
|
4
|
+
color: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: uni.$u.props.link.color
|
|
7
|
+
},
|
|
8
|
+
// 字体大小,单位px
|
|
9
|
+
fontSize: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
default: uni.$u.props.link.fontSize
|
|
12
|
+
},
|
|
13
|
+
// 是否显示下划线
|
|
14
|
+
underLine: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: uni.$u.props.link.underLine
|
|
17
|
+
},
|
|
18
|
+
// 要跳转的链接
|
|
19
|
+
href: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: uni.$u.props.link.href
|
|
22
|
+
},
|
|
23
|
+
// 小程序中复制到粘贴板的提示语
|
|
24
|
+
mpTips: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: uni.$u.props.link.mpTips
|
|
27
|
+
},
|
|
28
|
+
// 下划线颜色
|
|
29
|
+
lineColor: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: uni.$u.props.link.lineColor
|
|
32
|
+
},
|
|
33
|
+
// 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
|
|
34
|
+
text: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: uni.$u.props.link.text
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<text
|
|
3
|
+
class="u-link"
|
|
4
|
+
@tap.stop="openLink"
|
|
5
|
+
:style="[linkStyle, $u.addStyle(customStyle)]"
|
|
6
|
+
>{{text}}</text>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import props from './props.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* link 超链接
|
|
14
|
+
* @description 该组件为超链接组件,在不同平台有不同表现形式:在APP平台会通过plus环境打开内置浏览器,在小程序中把链接复制到粘贴板,同时提示信息,在H5中通过window.open打开链接。
|
|
15
|
+
* @tutorial https://www.uviewui.com/components/link.html
|
|
16
|
+
* @property {String} color 文字颜色 (默认 color['u-primary'] )
|
|
17
|
+
* @property {String | Number} fontSize 字体大小,单位px (默认 15 )
|
|
18
|
+
* @property {Boolean} underLine 是否显示下划线 (默认 false )
|
|
19
|
+
* @property {String} href 跳转的链接,要带上http(s)
|
|
20
|
+
* @property {String} mpTips 各个小程序平台把链接复制到粘贴板后的提示语(默认“链接已复制,请在浏览器打开”)
|
|
21
|
+
* @property {String} lineColor 下划线颜色,默认同color参数颜色
|
|
22
|
+
* @property {String} text 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色
|
|
23
|
+
* @property {Object} customStyle 定义需要用到的外部样式
|
|
24
|
+
*
|
|
25
|
+
* @example <u-link href="http://www.uviewui.com">蜀道难,难于上青天</u-link>
|
|
26
|
+
*/
|
|
27
|
+
export default {
|
|
28
|
+
name: "u-link",
|
|
29
|
+
mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
|
|
30
|
+
computed: {
|
|
31
|
+
linkStyle() {
|
|
32
|
+
const style = {
|
|
33
|
+
color: this.color,
|
|
34
|
+
fontSize: uni.$u.addUnit(this.fontSize),
|
|
35
|
+
// line-height设置为比字体大小多2px
|
|
36
|
+
lineHeight: uni.$u.addUnit(uni.$u.getPx(this.fontSize) + 2),
|
|
37
|
+
textDecoration: this.underLine ? 'underline' : 'none'
|
|
38
|
+
}
|
|
39
|
+
// if (this.underLine) {
|
|
40
|
+
// style.borderBottomColor = this.lineColor || this.color
|
|
41
|
+
// style.borderBottomWidth = '1px'
|
|
42
|
+
// }
|
|
43
|
+
return style
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
openLink() {
|
|
48
|
+
// #ifdef APP-PLUS
|
|
49
|
+
plus.runtime.openURL(this.href)
|
|
50
|
+
// #endif
|
|
51
|
+
// #ifdef H5
|
|
52
|
+
window.open(this.href)
|
|
53
|
+
// #endif
|
|
54
|
+
// #ifdef MP
|
|
55
|
+
uni.setClipboardData({
|
|
56
|
+
data: this.href,
|
|
57
|
+
success: () => {
|
|
58
|
+
uni.hideToast();
|
|
59
|
+
this.$nextTick(() => {
|
|
60
|
+
uni.$u.toast(this.mpTips);
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
// #endif
|
|
65
|
+
this.$emit('click')
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
@import "../../libs/css/components.scss";
|
|
73
|
+
$u-link-line-height:1 !default;
|
|
74
|
+
|
|
75
|
+
.u-link {
|
|
76
|
+
/* #ifndef APP-NVUE */
|
|
77
|
+
line-height: $u-link-line-height;
|
|
78
|
+
/* #endif */
|
|
79
|
+
@include flex;
|
|
80
|
+
flex-wrap: wrap;
|
|
81
|
+
flex: 1;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// 控制是否出现滚动条,仅nvue有效
|
|
4
|
+
showScrollbar: {
|
|
5
|
+
type: Boolean,
|
|
6
|
+
default: uni.$u.props.list.showScrollbar
|
|
7
|
+
},
|
|
8
|
+
// 距底部多少时触发scrolltolower事件
|
|
9
|
+
lowerThreshold: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
default: uni.$u.props.list.lowerThreshold
|
|
12
|
+
},
|
|
13
|
+
// 距顶部多少时触发scrolltoupper事件,非nvue有效
|
|
14
|
+
upperThreshold: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: uni.$u.props.list.upperThreshold
|
|
17
|
+
},
|
|
18
|
+
// 设置竖向滚动条位置
|
|
19
|
+
scrollTop: {
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
default: uni.$u.props.list.scrollTop
|
|
22
|
+
},
|
|
23
|
+
// 控制 onscroll 事件触发的频率,仅nvue有效
|
|
24
|
+
offsetAccuracy: {
|
|
25
|
+
type: [String, Number],
|
|
26
|
+
default: uni.$u.props.list.offsetAccuracy
|
|
27
|
+
},
|
|
28
|
+
// 启用 flexbox 布局。开启后,当前节点声明了display: flex就会成为flex container,并作用于其孩子节点,仅微信小程序有效
|
|
29
|
+
enableFlex: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: uni.$u.props.list.enableFlex
|
|
32
|
+
},
|
|
33
|
+
// 是否按分页模式显示List,默认值false
|
|
34
|
+
pagingEnabled: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: uni.$u.props.list.pagingEnabled
|
|
37
|
+
},
|
|
38
|
+
// 是否允许List滚动
|
|
39
|
+
scrollable: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: uni.$u.props.list.scrollable
|
|
42
|
+
},
|
|
43
|
+
// 值应为某子元素id(id不能以数字开头)
|
|
44
|
+
scrollIntoView: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: uni.$u.props.list.scrollIntoView
|
|
47
|
+
},
|
|
48
|
+
// 在设置滚动条位置时使用动画过渡
|
|
49
|
+
scrollWithAnimation: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: uni.$u.props.list.scrollWithAnimation
|
|
52
|
+
},
|
|
53
|
+
// iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只对微信小程序有效
|
|
54
|
+
enableBackToTop: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: uni.$u.props.list.enableBackToTop
|
|
57
|
+
},
|
|
58
|
+
// 列表的高度
|
|
59
|
+
height: {
|
|
60
|
+
type: [String, Number],
|
|
61
|
+
default: uni.$u.props.list.height
|
|
62
|
+
},
|
|
63
|
+
// 列表宽度
|
|
64
|
+
width: {
|
|
65
|
+
type: [String, Number],
|
|
66
|
+
default: uni.$u.props.list.width
|
|
67
|
+
},
|
|
68
|
+
// 列表前后预渲染的屏数,1代表一个屏幕的高度,1.5代表1个半屏幕高度
|
|
69
|
+
preLoadScreen: {
|
|
70
|
+
type: [String, Number],
|
|
71
|
+
default: uni.$u.props.list.preLoadScreen
|
|
72
|
+
}
|
|
73
|
+
// vue下,是否开启虚拟列表
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
}
|