uview-ui-wjf 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +71 -0
- package/changelog.md +388 -0
- package/components/u--form/u--form.vue +92 -0
- package/components/u--image/u--image.vue +73 -0
- package/components/u--input/u--input.vue +115 -0
- package/components/u--text/u--text.vue +72 -0
- package/components/u--textarea/u--textarea.vue +85 -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 +173 -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 +495 -0
- package/components/u-button/vue.scss +80 -0
- package/components/u-calendar/header.vue +99 -0
- package/components/u-calendar/month.vue +579 -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 +120 -0
- package/components/u-datetime-picker/u-datetime-picker.vue +361 -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 +127 -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 +48 -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 +237 -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 +369 -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 +89 -0
- package/components/u-modal/u-modal.vue +228 -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 +286 -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 +339 -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 +306 -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 +363 -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/clipboard.min.js +58 -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 +566 -0
- package/components/u-upload/utils.js +151 -0
- package/components/uview-ui/uview-ui.vue +15 -0
- package/index.js +79 -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 +37 -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 +23 -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 +31 -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 +731 -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/dayjs.js +308 -0
- package/libs/util/emitter.js +51 -0
- package/libs/util/route.js +124 -0
- package/package.json +83 -0
- package/theme.scss +44 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="u-steps-item" ref="u-steps-item" :class="[`u-steps-item--${parentData.direction}`]">
|
|
3
|
+
<view class="u-steps-item__line" v-if="index + 1 < childLength"
|
|
4
|
+
:class="[`u-steps-item__line--${parentData.direction}`]" :style="[lineStyle]"></view>
|
|
5
|
+
<view class="u-steps-item__wrapper"
|
|
6
|
+
:class="[`u-steps-item__wrapper--${parentData.direction}`, parentData.dot && `u-steps-item__wrapper--${parentData.direction}--dot`]">
|
|
7
|
+
<slot name="icon">
|
|
8
|
+
<view class="u-steps-item__wrapper__dot" v-if="parentData.dot" :style="{
|
|
9
|
+
backgroundColor: statusColor
|
|
10
|
+
}">
|
|
11
|
+
|
|
12
|
+
</view>
|
|
13
|
+
<view class="u-steps-item__wrapper__icon" v-else-if="parentData.activeIcon || parentData.inactiveIcon">
|
|
14
|
+
<u-icon :name="index <= parentData.current ? parentData.activeIcon : parentData.inactiveIcon"
|
|
15
|
+
:size="iconSize"
|
|
16
|
+
:color="index <= parentData.current ? parentData.activeColor : parentData.inactiveColor">
|
|
17
|
+
</u-icon>
|
|
18
|
+
</view>
|
|
19
|
+
<view v-else :style="{
|
|
20
|
+
backgroundColor: statusClass === 'process' ? parentData.activeColor : 'transparent',
|
|
21
|
+
borderColor: statusColor
|
|
22
|
+
}" class="u-steps-item__wrapper__circle">
|
|
23
|
+
<text v-if="statusClass === 'process' || statusClass === 'wait'"
|
|
24
|
+
class="u-steps-item__wrapper__circle__text" :style="{
|
|
25
|
+
color: index == parentData.current ? '#ffffff' : parentData.inactiveColor
|
|
26
|
+
}">{{ index + 1}}</text>
|
|
27
|
+
<u-icon v-else :color="statusClass === 'error' ? 'error' : parentData.activeColor" size="12"
|
|
28
|
+
:name="statusClass === 'error' ? 'close' : 'checkmark'"></u-icon>
|
|
29
|
+
</view>
|
|
30
|
+
</slot>
|
|
31
|
+
</view>
|
|
32
|
+
<view class="u-steps-item__content" :class="[`u-steps-item__content--${parentData.direction}`]"
|
|
33
|
+
:style="[contentStyle]">
|
|
34
|
+
<u--text :text="title" :type="parentData.current == index ? 'main' : 'content'" lineHeight="20px"
|
|
35
|
+
:size="parentData.current == index ? 14 : 13"></u--text>
|
|
36
|
+
<slot name="desc">
|
|
37
|
+
<u--text :text="desc" type="tips" size="12"></u--text>
|
|
38
|
+
</slot>
|
|
39
|
+
</view>
|
|
40
|
+
<!-- <view
|
|
41
|
+
class="u-steps-item__line"
|
|
42
|
+
v-if="showLine && parentData.direction === 'column'"
|
|
43
|
+
:class="[`u-steps-item__line--${parentData.direction}`]"
|
|
44
|
+
:style="[lineStyle]"
|
|
45
|
+
></view> -->
|
|
46
|
+
</view>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script>
|
|
50
|
+
import props from './props.js';
|
|
51
|
+
// #ifdef APP-NVUE
|
|
52
|
+
const dom = uni.requireNativePlugin('dom')
|
|
53
|
+
// #endif
|
|
54
|
+
/**
|
|
55
|
+
* StepsItem 步骤条的子组件
|
|
56
|
+
* @description 本组件需要和u-steps配合使用
|
|
57
|
+
* @tutorial https://uviewui.com/components/steps.html
|
|
58
|
+
* @property {String} title 标题文字
|
|
59
|
+
* @property {String} current 描述文本
|
|
60
|
+
* @property {String | Number} iconSize 图标大小 (默认 17 )
|
|
61
|
+
* @property {Boolean} error 当前步骤是否处于失败状态 (默认 false )
|
|
62
|
+
* @example <u-steps current="0"><u-steps-item title="已出库" desc="10:35" ></u-steps-item></u-steps>
|
|
63
|
+
*/
|
|
64
|
+
export default {
|
|
65
|
+
name: 'u-steps-item',
|
|
66
|
+
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
index: 0,
|
|
70
|
+
childLength: 0,
|
|
71
|
+
showLine: false,
|
|
72
|
+
size: {
|
|
73
|
+
height: 0,
|
|
74
|
+
width: 0
|
|
75
|
+
},
|
|
76
|
+
parentData: {
|
|
77
|
+
direction: 'row',
|
|
78
|
+
current: 0,
|
|
79
|
+
activeColor: '',
|
|
80
|
+
inactiveColor: '',
|
|
81
|
+
activeIcon: '',
|
|
82
|
+
inactiveIcon: '',
|
|
83
|
+
dot: false
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
watch: {
|
|
88
|
+
'parentData'(newValue, oldValue) {
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
created() {
|
|
92
|
+
this.init()
|
|
93
|
+
},
|
|
94
|
+
computed: {
|
|
95
|
+
lineStyle() {
|
|
96
|
+
const style = {}
|
|
97
|
+
if (this.parentData.direction === 'row') {
|
|
98
|
+
style.width = this.size.width + 'px'
|
|
99
|
+
style.left = this.size.width / 2 + 'px'
|
|
100
|
+
} else {
|
|
101
|
+
style.height = this.size.height + 'px'
|
|
102
|
+
// style.top = this.size.height / 2 + 'px'
|
|
103
|
+
}
|
|
104
|
+
style.backgroundColor = this.parent.children?.[this.index + 1]?.error ? uni.$u.color.error : this.index <
|
|
105
|
+
this
|
|
106
|
+
.parentData
|
|
107
|
+
.current ? this.parentData.activeColor : this.parentData.inactiveColor
|
|
108
|
+
return style
|
|
109
|
+
},
|
|
110
|
+
statusClass() {
|
|
111
|
+
const {
|
|
112
|
+
index,
|
|
113
|
+
error
|
|
114
|
+
} = this
|
|
115
|
+
const {
|
|
116
|
+
current
|
|
117
|
+
} = this.parentData
|
|
118
|
+
if (current == index) {
|
|
119
|
+
return error === true ? 'error' : 'process'
|
|
120
|
+
} else if (error) {
|
|
121
|
+
return 'error'
|
|
122
|
+
} else if (current > index) {
|
|
123
|
+
return 'finish'
|
|
124
|
+
} else {
|
|
125
|
+
return 'wait'
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
statusColor() {
|
|
129
|
+
let color = ''
|
|
130
|
+
switch (this.statusClass) {
|
|
131
|
+
case 'finish':
|
|
132
|
+
color = this.parentData.activeColor
|
|
133
|
+
break
|
|
134
|
+
case 'error':
|
|
135
|
+
color = uni.$u.color.error
|
|
136
|
+
break
|
|
137
|
+
case 'process':
|
|
138
|
+
color = this.parentData.dot ? this.parentData.activeColor : 'transparent'
|
|
139
|
+
break
|
|
140
|
+
default:
|
|
141
|
+
color = this.parentData.inactiveColor
|
|
142
|
+
break
|
|
143
|
+
}
|
|
144
|
+
return color
|
|
145
|
+
},
|
|
146
|
+
contentStyle() {
|
|
147
|
+
const style = {}
|
|
148
|
+
if (this.parentData.direction === 'column') {
|
|
149
|
+
style.marginLeft = this.parentData.dot ? '2px' : '6px'
|
|
150
|
+
style.marginTop = this.parentData.dot ? '0px' : '6px'
|
|
151
|
+
} else {
|
|
152
|
+
style.marginTop = this.parentData.dot ? '2px' : '6px'
|
|
153
|
+
style.marginLeft = this.parentData.dot ? '2px' : '6px'
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return style
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
mounted() {
|
|
160
|
+
this.parent && this.parent.updateFromChild()
|
|
161
|
+
uni.$u.sleep().then(() => {
|
|
162
|
+
this.getStepsItemRect()
|
|
163
|
+
})
|
|
164
|
+
},
|
|
165
|
+
methods: {
|
|
166
|
+
init() {
|
|
167
|
+
// 初始化数据
|
|
168
|
+
this.updateParentData()
|
|
169
|
+
if (!this.parent) {
|
|
170
|
+
return uni.$u.error('u-steps-item必须要搭配u-steps组件使用')
|
|
171
|
+
}
|
|
172
|
+
this.index = this.parent.children.indexOf(this)
|
|
173
|
+
this.childLength = this.parent.children.length
|
|
174
|
+
},
|
|
175
|
+
updateParentData() {
|
|
176
|
+
// 此方法在mixin中
|
|
177
|
+
this.getParentData('u-steps')
|
|
178
|
+
},
|
|
179
|
+
// 父组件数据发生变化
|
|
180
|
+
updateFromParent() {
|
|
181
|
+
this.init()
|
|
182
|
+
},
|
|
183
|
+
// 获取组件的尺寸,用于设置横线的位置
|
|
184
|
+
getStepsItemRect() {
|
|
185
|
+
// #ifndef APP-NVUE
|
|
186
|
+
this.$uGetRect('.u-steps-item').then(size => {
|
|
187
|
+
this.size = size
|
|
188
|
+
})
|
|
189
|
+
// #endif
|
|
190
|
+
|
|
191
|
+
// #ifdef APP-NVUE
|
|
192
|
+
dom.getComponentRect(this.$refs['u-steps-item'], res => {
|
|
193
|
+
const {
|
|
194
|
+
size
|
|
195
|
+
} = res
|
|
196
|
+
this.size = size
|
|
197
|
+
})
|
|
198
|
+
// #endif
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
</script>
|
|
203
|
+
|
|
204
|
+
<style lang="scss" scoped>
|
|
205
|
+
@import "../../libs/css/components.scss";
|
|
206
|
+
|
|
207
|
+
.u-steps-item {
|
|
208
|
+
flex: 1;
|
|
209
|
+
@include flex;
|
|
210
|
+
|
|
211
|
+
&--row {
|
|
212
|
+
flex-direction: column;
|
|
213
|
+
align-items: center;
|
|
214
|
+
position: relative;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
&--column {
|
|
218
|
+
position: relative;
|
|
219
|
+
flex-direction: row;
|
|
220
|
+
justify-content: flex-start;
|
|
221
|
+
padding-bottom: 5px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&__wrapper {
|
|
225
|
+
@include flex;
|
|
226
|
+
justify-content: center;
|
|
227
|
+
align-items: center;
|
|
228
|
+
position: relative;
|
|
229
|
+
background-color: #fff;
|
|
230
|
+
|
|
231
|
+
&--column {
|
|
232
|
+
width: 20px;
|
|
233
|
+
height: 32px;
|
|
234
|
+
|
|
235
|
+
&--dot {
|
|
236
|
+
height: 20px;
|
|
237
|
+
width: 20px;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&--row {
|
|
242
|
+
width: 32px;
|
|
243
|
+
height: 20px;
|
|
244
|
+
|
|
245
|
+
&--dot {
|
|
246
|
+
width: 20px;
|
|
247
|
+
height: 20px;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&__circle {
|
|
252
|
+
width: 20px;
|
|
253
|
+
height: 20px;
|
|
254
|
+
/* #ifndef APP-NVUE */
|
|
255
|
+
box-sizing: border-box;
|
|
256
|
+
flex-shrink: 0;
|
|
257
|
+
/* #endif */
|
|
258
|
+
border-radius: 100px;
|
|
259
|
+
border-width: 1px;
|
|
260
|
+
border-color: $u-tips-color;
|
|
261
|
+
border-style: solid;
|
|
262
|
+
@include flex(row);
|
|
263
|
+
align-items: center;
|
|
264
|
+
justify-content: center;
|
|
265
|
+
transition: background-color 0.3s;
|
|
266
|
+
|
|
267
|
+
&__text {
|
|
268
|
+
color: $u-tips-color;
|
|
269
|
+
font-size: 11px;
|
|
270
|
+
@include flex(row);
|
|
271
|
+
align-items: center;
|
|
272
|
+
justify-content: center;
|
|
273
|
+
text-align: center;
|
|
274
|
+
line-height: 11px;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&__dot {
|
|
279
|
+
width: 10px;
|
|
280
|
+
height: 10px;
|
|
281
|
+
border-radius: 100px;
|
|
282
|
+
background-color: $u-content-color;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&__content {
|
|
287
|
+
@include flex;
|
|
288
|
+
flex: 1;
|
|
289
|
+
|
|
290
|
+
&--row {
|
|
291
|
+
flex-direction: column;
|
|
292
|
+
align-items: center;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
&--column {
|
|
296
|
+
flex-direction: column;
|
|
297
|
+
margin-left: 6px;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&__line {
|
|
302
|
+
position: absolute;
|
|
303
|
+
background: $u-tips-color;
|
|
304
|
+
|
|
305
|
+
&--row {
|
|
306
|
+
top: 10px;
|
|
307
|
+
height: 1px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
&--column {
|
|
311
|
+
width: 1px;
|
|
312
|
+
left: 10px;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
|
|
4
|
+
offsetTop: {
|
|
5
|
+
type: [String, Number],
|
|
6
|
+
default: uni.$u.props.sticky.offsetTop
|
|
7
|
+
},
|
|
8
|
+
// 自定义导航栏的高度
|
|
9
|
+
customNavHeight: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
// #ifdef H5
|
|
12
|
+
// H5端的导航栏属于“自定义”导航栏的范畴,因为它是非原生的,与普通元素一致
|
|
13
|
+
default: 44,
|
|
14
|
+
// #endif
|
|
15
|
+
// #ifndef H5
|
|
16
|
+
default: uni.$u.props.sticky.customNavHeight
|
|
17
|
+
// #endif
|
|
18
|
+
},
|
|
19
|
+
// 是否开启吸顶功能
|
|
20
|
+
disabled: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: uni.$u.props.sticky.disabled
|
|
23
|
+
},
|
|
24
|
+
// 吸顶区域的背景颜色
|
|
25
|
+
bgColor: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: uni.$u.props.sticky.bgColor
|
|
28
|
+
},
|
|
29
|
+
// z-index值
|
|
30
|
+
zIndex: {
|
|
31
|
+
type: [String, Number],
|
|
32
|
+
default: uni.$u.props.sticky.zIndex
|
|
33
|
+
},
|
|
34
|
+
// 列表中的索引值
|
|
35
|
+
index: {
|
|
36
|
+
type: [String, Number],
|
|
37
|
+
default: uni.$u.props.sticky.index
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="u-sticky"
|
|
4
|
+
:id="elId"
|
|
5
|
+
:style="[style]"
|
|
6
|
+
>
|
|
7
|
+
<view
|
|
8
|
+
:style="[stickyContent]"
|
|
9
|
+
class="u-sticky__content"
|
|
10
|
+
>
|
|
11
|
+
<slot />
|
|
12
|
+
</view>
|
|
13
|
+
</view>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import props from './props.js';;
|
|
18
|
+
/**
|
|
19
|
+
* sticky 吸顶
|
|
20
|
+
* @description 该组件与CSS中position: sticky属性实现的效果一致,当组件达到预设的到顶部距离时, 就会固定在指定位置,组件位置大于预设的顶部距离时,会重新按照正常的布局排列。
|
|
21
|
+
* @tutorial https://www.uviewui.com/components/sticky.html
|
|
22
|
+
* @property {String | Number} offsetTop 吸顶时与顶部的距离,单位px(默认 0 )
|
|
23
|
+
* @property {String | Number} customNavHeight 自定义导航栏的高度 (h5 默认44 其他默认 0 )
|
|
24
|
+
* @property {Boolean} disabled 是否开启吸顶功能 (默认 false )
|
|
25
|
+
* @property {String} bgColor 组件背景颜色(默认 '#ffffff' )
|
|
26
|
+
* @property {String | Number} zIndex 吸顶时的z-index值
|
|
27
|
+
* @property {String | Number} index 自定义标识,用于区分是哪一个组件
|
|
28
|
+
* @property {Object} customStyle 组件的样式,对象形式
|
|
29
|
+
* @event {Function} fixed 组件吸顶时触发
|
|
30
|
+
* @event {Function} unfixed 组件取消吸顶时触发
|
|
31
|
+
* @example <u-sticky offsetTop="200"><view>塞下秋来风景异,衡阳雁去无留意</view></u-sticky>
|
|
32
|
+
*/
|
|
33
|
+
export default {
|
|
34
|
+
name: 'u-sticky',
|
|
35
|
+
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
|
|
36
|
+
data() {
|
|
37
|
+
return {
|
|
38
|
+
cssSticky: false, // 是否使用css的sticky实现
|
|
39
|
+
stickyTop: 0, // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值
|
|
40
|
+
elId: uni.$u.guid(),
|
|
41
|
+
left: 0, // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性
|
|
42
|
+
width: 'auto',
|
|
43
|
+
height: 'auto',
|
|
44
|
+
fixed: false, // js模式时,是否处于吸顶模式
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
computed: {
|
|
48
|
+
style() {
|
|
49
|
+
const style = {}
|
|
50
|
+
if(!this.disabled) {
|
|
51
|
+
if (this.cssSticky) {
|
|
52
|
+
style.position = 'sticky'
|
|
53
|
+
style.zIndex = this.uZindex
|
|
54
|
+
style.top = uni.$u.addUnit(this.stickyTop)
|
|
55
|
+
} else {
|
|
56
|
+
style.height = this.fixed ? this.height + 'px' : 'auto'
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
// 无需吸顶时,设置会默认的relative(nvue)和非nvue的static静态模式即可
|
|
60
|
+
// #ifdef APP-NVUE
|
|
61
|
+
style.position = 'relative'
|
|
62
|
+
// #endif
|
|
63
|
+
// #ifndef APP-NVUE
|
|
64
|
+
style.position = 'static'
|
|
65
|
+
// #endif
|
|
66
|
+
}
|
|
67
|
+
style.backgroundColor = this.bgColor
|
|
68
|
+
return uni.$u.deepMerge(uni.$u.addStyle(this.customStyle), style)
|
|
69
|
+
},
|
|
70
|
+
// 吸顶内容的样式
|
|
71
|
+
stickyContent() {
|
|
72
|
+
const style = {}
|
|
73
|
+
if (!this.cssSticky) {
|
|
74
|
+
style.position = this.fixed ? 'fixed' : 'static'
|
|
75
|
+
style.top = this.stickyTop + 'px'
|
|
76
|
+
style.left = this.left + 'px'
|
|
77
|
+
style.width = this.width == 'auto' ? 'auto' : this.width + 'px'
|
|
78
|
+
style.zIndex = this.uZindex
|
|
79
|
+
}
|
|
80
|
+
return style
|
|
81
|
+
},
|
|
82
|
+
uZindex() {
|
|
83
|
+
return this.zIndex ? this.zIndex : uni.$u.zIndex.sticky
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
mounted() {
|
|
87
|
+
this.init()
|
|
88
|
+
},
|
|
89
|
+
methods: {
|
|
90
|
+
init() {
|
|
91
|
+
this.getStickyTop()
|
|
92
|
+
// 判断使用的模式
|
|
93
|
+
this.checkSupportCssSticky()
|
|
94
|
+
// 如果不支持css sticky,则使用js方案,此方案性能比不上css方案
|
|
95
|
+
if (!this.cssSticky) {
|
|
96
|
+
!this.disabled && this.initObserveContent()
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
initObserveContent() {
|
|
100
|
+
// 获取吸顶内容的高度,用于在js吸顶模式时,给父元素一个填充高度,防止"塌陷"
|
|
101
|
+
this.$uGetRect('#' + this.elId).then((res) => {
|
|
102
|
+
this.height = res.height
|
|
103
|
+
this.left = res.left
|
|
104
|
+
this.width = res.width
|
|
105
|
+
this.$nextTick(() => {
|
|
106
|
+
this.observeContent()
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
},
|
|
110
|
+
observeContent() {
|
|
111
|
+
// 先断掉之前的观察
|
|
112
|
+
this.disconnectObserver('contentObserver')
|
|
113
|
+
const contentObserver = uni.createIntersectionObserver({
|
|
114
|
+
// 检测的区间范围
|
|
115
|
+
thresholds: [0.95, 0.98, 1]
|
|
116
|
+
})
|
|
117
|
+
// 到屏幕顶部的高度时触发
|
|
118
|
+
contentObserver.relativeToViewport({
|
|
119
|
+
top: -this.stickyTop
|
|
120
|
+
})
|
|
121
|
+
// 绑定观察的元素
|
|
122
|
+
contentObserver.observe(`#${this.elId}`, res => {
|
|
123
|
+
this.setFixed(res.boundingClientRect.top)
|
|
124
|
+
})
|
|
125
|
+
this.contentObserver = contentObserver
|
|
126
|
+
},
|
|
127
|
+
setFixed(top) {
|
|
128
|
+
// 判断是否出于吸顶条件范围
|
|
129
|
+
const fixed = top <= this.stickyTop
|
|
130
|
+
this.fixed = fixed
|
|
131
|
+
},
|
|
132
|
+
disconnectObserver(observerName) {
|
|
133
|
+
// 断掉观察,释放资源
|
|
134
|
+
const observer = this[observerName]
|
|
135
|
+
observer && observer.disconnect()
|
|
136
|
+
},
|
|
137
|
+
getStickyTop() {
|
|
138
|
+
this.stickyTop = uni.$u.getPx(this.offsetTop) + uni.$u.getPx(this.customNavHeight)
|
|
139
|
+
},
|
|
140
|
+
async checkSupportCssSticky() {
|
|
141
|
+
// #ifdef H5
|
|
142
|
+
// H5,一般都是现代浏览器,是支持css sticky的,这里使用创建元素嗅探的形式判断
|
|
143
|
+
if (this.checkCssStickyForH5()) {
|
|
144
|
+
this.cssSticky = true
|
|
145
|
+
}
|
|
146
|
+
// #endif
|
|
147
|
+
|
|
148
|
+
// 如果安卓版本高于8.0,依然认为是支持css sticky的(因为安卓7在某些机型,可能不支持sticky)
|
|
149
|
+
if (uni.$u.os() === 'android' && Number(uni.$u.sys().system) > 8) {
|
|
150
|
+
this.cssSticky = true
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// APP-Vue和微信平台,通过computedStyle判断是否支持css sticky
|
|
154
|
+
// #ifdef APP-VUE || MP-WEIXIN
|
|
155
|
+
this.cssSticky = await this.checkComputedStyle()
|
|
156
|
+
// #endif
|
|
157
|
+
|
|
158
|
+
// ios上,从ios6开始,都是支持css sticky的
|
|
159
|
+
if (uni.$u.os() === 'ios') {
|
|
160
|
+
this.cssSticky = true
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// nvue,是支持css sticky的
|
|
164
|
+
// #ifdef APP-NVUE
|
|
165
|
+
this.cssSticky = true
|
|
166
|
+
// #endif
|
|
167
|
+
},
|
|
168
|
+
// 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky
|
|
169
|
+
checkComputedStyle() {
|
|
170
|
+
// 方法内进行判断,避免在其他平台生成无用代码
|
|
171
|
+
// #ifdef APP-VUE || MP-WEIXIN
|
|
172
|
+
return new Promise(resolve => {
|
|
173
|
+
uni.createSelectorQuery().in(this).select('.u-sticky').fields({
|
|
174
|
+
computedStyle: ["position"]
|
|
175
|
+
}).exec(e => {
|
|
176
|
+
resolve('sticky' === e[0].position)
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
// #endif
|
|
180
|
+
},
|
|
181
|
+
// H5通过创建元素的形式嗅探是否支持css sticky
|
|
182
|
+
// 判断浏览器是否支持sticky属性
|
|
183
|
+
checkCssStickyForH5() {
|
|
184
|
+
// 方法内进行判断,避免在其他平台生成无用代码
|
|
185
|
+
// #ifdef H5
|
|
186
|
+
const vendorList = ['', '-webkit-', '-ms-', '-moz-', '-o-'],
|
|
187
|
+
vendorListLength = vendorList.length,
|
|
188
|
+
stickyElement = document.createElement('div')
|
|
189
|
+
for (let i = 0; i < vendorListLength; i++) {
|
|
190
|
+
stickyElement.style.position = vendorList[i] + 'sticky'
|
|
191
|
+
if (stickyElement.style.position !== '') {
|
|
192
|
+
return true
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return false;
|
|
196
|
+
// #endif
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
beforeDestroy() {
|
|
200
|
+
this.disconnectObserver('contentObserver')
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
</script>
|
|
204
|
+
|
|
205
|
+
<style lang="scss" scoped>
|
|
206
|
+
.u-sticky {
|
|
207
|
+
/* #ifdef APP-VUE || MP-WEIXIN */
|
|
208
|
+
// 此处默认写sticky属性,是为了给微信和APP通过uni.createSelectorQuery查询是否支持css sticky使用
|
|
209
|
+
position: sticky;
|
|
210
|
+
/* #endif */
|
|
211
|
+
}
|
|
212
|
+
</style>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// tab的数据
|
|
4
|
+
list: {
|
|
5
|
+
type: Array,
|
|
6
|
+
default: uni.$u.props.subsection.list
|
|
7
|
+
},
|
|
8
|
+
// 当前活动的tab的index
|
|
9
|
+
current: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
default: uni.$u.props.subsection.current
|
|
12
|
+
},
|
|
13
|
+
// 激活的颜色
|
|
14
|
+
activeColor: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: uni.$u.props.subsection.activeColor
|
|
17
|
+
},
|
|
18
|
+
// 未激活的颜色
|
|
19
|
+
inactiveColor: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: uni.$u.props.subsection.inactiveColor
|
|
22
|
+
},
|
|
23
|
+
// 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
|
|
24
|
+
mode: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: uni.$u.props.subsection.mode
|
|
27
|
+
},
|
|
28
|
+
// 字体大小
|
|
29
|
+
fontSize: {
|
|
30
|
+
type: [String, Number],
|
|
31
|
+
default: uni.$u.props.subsection.fontSize
|
|
32
|
+
},
|
|
33
|
+
// 激活tab的字体是否加粗
|
|
34
|
+
bold: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: uni.$u.props.subsection.bold
|
|
37
|
+
},
|
|
38
|
+
// mode = button时,组件背景颜色
|
|
39
|
+
bgColor: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: uni.$u.props.subsection.bgColor
|
|
42
|
+
},
|
|
43
|
+
// 从list元素对象中读取的键名
|
|
44
|
+
keyName: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: uni.$u.props.subsection.keyName
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|