@tuya-miniapp/smart-ui 2.6.1-beta-31 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bottom-sheet/index.css +1 -1
- package/dist/bottom-sheet/index.js +4 -0
- package/dist/bottom-sheet/index.wxml +11 -3
- package/dist/bottom-sheet/index.wxss +1 -1
- package/dist/image/index.css +1 -1
- package/dist/image/index.wxss +1 -1
- package/dist/nav-bar/index.css +1 -1
- package/dist/nav-bar/index.wxml +2 -2
- package/dist/nav-bar/index.wxss +1 -1
- package/dist/picker-column/index.css +1 -1
- package/dist/picker-column/index.wxss +1 -1
- package/dist/stepper/index.css +1 -1
- package/dist/stepper/index.js +23 -8
- package/dist/stepper/index.wxml +2 -2
- package/dist/stepper/index.wxs +10 -0
- package/dist/stepper/index.wxss +1 -1
- package/lib/bottom-sheet/index.css +1 -1
- package/lib/bottom-sheet/index.js +4 -0
- package/lib/bottom-sheet/index.wxml +11 -3
- package/lib/bottom-sheet/index.wxss +1 -1
- package/lib/image/index.css +1 -1
- package/lib/image/index.wxss +1 -1
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.wxml +2 -2
- package/lib/nav-bar/index.wxss +1 -1
- package/lib/picker-column/index.css +1 -1
- package/lib/picker-column/index.wxss +1 -1
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.js +24 -8
- package/lib/stepper/index.wxml +2 -2
- package/lib/stepper/index.wxs +10 -0
- package/lib/stepper/index.wxss +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__header:empty{display:none}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
@@ -21,9 +21,17 @@
|
|
21
21
|
bind:leave="onLeave"
|
22
22
|
bind:after-leave="onAfterLeave"
|
23
23
|
>
|
24
|
-
<view
|
25
|
-
{{ title }}
|
26
|
-
<smart-icon
|
24
|
+
<view class="smart-bottom-sheet__header">
|
25
|
+
<view wx:if="{{ title }}">{{ title }}</view>
|
26
|
+
<smart-icon
|
27
|
+
wx:if="{{ title && showClose }}"
|
28
|
+
name="{{ xmarkIcon }}"
|
29
|
+
class="smart-bottom-sheet__icon"
|
30
|
+
size="{{ iconSize }}"
|
31
|
+
color="{{ xmarkIconColor }}"
|
32
|
+
bind:click="onClose"
|
33
|
+
/>
|
34
|
+
<slot name="title" />
|
27
35
|
</view>
|
28
36
|
|
29
37
|
<view wx:if="{{ contentHeight !== null }}" class="smart-bottom-sheet__content smart-bottom-sheet__content_height" style="{{computed.getHeight(contentHeight)}}">
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__header:empty{display:none}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
package/dist/image/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-image{display:inline-block;position:relative;vertical-align:middle}.smart-image__tint-color{display:inline-block;height:100%;left:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;position:absolute;top:0;width:100%}.smart-image--round{border-radius:50%;overflow:hidden}.smart-image--round .smart-image__img{border-radius:inherit}.smart-image__error,.smart-image__img,.smart-image__loading{display:block;height:100%;width:100%}.smart-image__error,.smart-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.smart-image__loading-icon{--icon-color:var(--image-loading-icon-color,#dcdee0);color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.smart-image__error-img{height:var(--image-error-size,32px);width:var(--image-error-size,32px)}
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:0}.smart-image{display:inline-block;position:relative;vertical-align:middle}.smart-image__tint-color{display:inline-block;height:100%;left:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;position:absolute;top:0;width:100%}.smart-image--round{border-radius:50%;overflow:hidden}.smart-image--round .smart-image__img{border-radius:inherit}.smart-image__error,.smart-image__img,.smart-image__loading{display:block;height:100%;width:100%}.smart-image__error,.smart-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.smart-image__loading-icon{--icon-color:var(--image-loading-icon-color,#dcdee0);color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.smart-image__error-img{height:var(--image-error-size,32px);width:var(--image-error-size,32px)}
|
package/dist/image/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-image{display:inline-block;position:relative;vertical-align:middle}.smart-image__tint-color{display:inline-block;height:100%;left:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;position:absolute;top:0;width:100%}.smart-image--round{border-radius:50%;overflow:hidden}.smart-image--round .smart-image__img{border-radius:inherit}.smart-image__error,.smart-image__img,.smart-image__loading{display:block;height:100%;width:100%}.smart-image__error,.smart-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.smart-image__loading-icon{--icon-color:var(--image-loading-icon-color,#dcdee0);color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.smart-image__error-img{height:var(--image-error-size,32px);width:var(--image-error-size,32px)}
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:0}.smart-image{display:inline-block;position:relative;vertical-align:middle}.smart-image__tint-color{display:inline-block;height:100%;left:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;position:absolute;top:0;width:100%}.smart-image--round{border-radius:50%;overflow:hidden}.smart-image--round .smart-image__img{border-radius:inherit}.smart-image__error,.smart-image__img,.smart-image__loading{display:block;height:100%;width:100%}.smart-image__error,.smart-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.smart-image__loading-icon{--icon-color:var(--image-loading-icon-color,#dcdee0);color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.smart-image__error-img{height:var(--image-error-size,32px);width:var(--image-error-size,32px)}
|
package/dist/nav-bar/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,var(--app-device-navbar-height,46px));line-height:var(--nav-bar-height,var(--app-device-navbar-height,46px));position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,var(--app-device-navbar-height,46px));line-height:var(--nav-bar-height,var(--app-device-navbar-height,46px));position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--safe{padding-top:var(--app-device-status-height,20px)}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar--round{border-radius:var(--nav-bar-round-border-radius,16px 16px 0 0);min-height:var(--nav-bar-round-min-height,56px)}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__left--home{max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left--home .smart-nav-bar__text{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-nav-bar__left--title{max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left--title .smart-nav-bar__text{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-nav-bar__right{right:var(--padding-md,16px)}.smart-nav-bar__right .smart-nav-bar__text{color:var(--nav-bar-right-text-color,var(--nav-bar-text-color,var(--app-B2-N1,#000)))}
|
package/dist/nav-bar/index.wxml
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
style="{{ computed.barStyle({ zIndex, statusBarHeight, safeAreaInsetTop }) }}; {{ customStyle }}"
|
9
9
|
>
|
10
10
|
<view class="smart-nav-bar__content">
|
11
|
-
<view class="
|
11
|
+
<view class="{{ utils.bem('nav-bar__left', { home: leftTextType === 'home', title: leftTextType === 'title' }) }}" bind:tap="onClickLeft">
|
12
12
|
<block wx:if="{{ leftArrow || leftText || leftIcon }}">
|
13
13
|
<smart-icon
|
14
14
|
wx:if="{{ leftArrow }}"
|
@@ -27,7 +27,7 @@
|
|
27
27
|
</view>
|
28
28
|
<view
|
29
29
|
wx:if="{{ leftText }}"
|
30
|
-
class="
|
30
|
+
class="smart-nav-bar__text"
|
31
31
|
catch:tap="onClickLeftText"
|
32
32
|
hover-class="{{ leftTextType === 'back' ? 'smart-nav-bar__text--hover' : '' }}"
|
33
33
|
hover-stay-time="70"
|
package/dist/nav-bar/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,var(--app-device-navbar-height,46px));line-height:var(--nav-bar-height,var(--app-device-navbar-height,46px));position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,var(--app-device-navbar-height,46px));line-height:var(--nav-bar-height,var(--app-device-navbar-height,46px));position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--safe{padding-top:var(--app-device-status-height,20px)}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar--round{border-radius:var(--nav-bar-round-border-radius,16px 16px 0 0);min-height:var(--nav-bar-round-min-height,56px)}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__left--home{max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left--home .smart-nav-bar__text{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-nav-bar__left--title{max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left--title .smart-nav-bar__text{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-nav-bar__right{right:var(--padding-md,16px)}.smart-nav-bar__right .smart-nav-bar__text{color:var(--nav-bar-right-text-color,var(--nav-bar-text-color,var(--app-B2-N1,#000)))}
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);text-align:center}.smart-picker-column,.smart-picker-column__offset{position:relative;width:100%}.smart-picker-column__visual{position:absolute;top:0;width:100%}.smart-picker-column__item{pointer-events:none}.smart-picker-column__item--selected{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--picker-option-selected-font-weight-bold,var(--font-weight-bold,700))}.smart-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}.smart-picker-column__mask{background:transparent;display:flex;flex-direction:column;height:100%;position:absolute;top:0;width:100%;z-index:10}.smart-picker-column__mask__item{flex:1}.smart-picker-column__unit{align-items:center;display:flex;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:100%}.smart-picker-column__unit_text{color:var(--picker-option-unit-text-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--picker-option-unit-font-size,12px);left:100%;margin-left:var(--picker-option-unit-mid-size,4px);position:absolute;top:50%;transform:translateY(-50%)}.smart-picker-column__max-text{color:transparent;font-weight:var(--font-weight-bold,500);position:relative}.smart-picker-column--disabled{opacity:var(--picker-option-disabled-opacity,.3)}
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);text-align:center}.smart-picker-column,.smart-picker-column__offset{position:relative;width:100%}.smart-picker-column__visual{position:absolute;top:0;width:100%}.smart-picker-column__item{pointer-events:none}.smart-picker-column__item--selected{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--picker-option-selected-font-weight-bold,var(--font-weight-bold,700))}.smart-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}.smart-picker-column__mask{background:transparent;display:flex;flex-direction:column;height:100%;position:absolute;top:0;width:100%;z-index:10}.smart-picker-column__mask__item{flex:1}.smart-picker-column__unit{align-items:center;display:flex;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:100%}.smart-picker-column__unit_text{color:var(--picker-option-unit-text-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--picker-option-unit-font-size,12px);left:100%;margin-left:var(--picker-option-unit-mid-size,4px);position:absolute;top:50%;transform:translateY(-50%);white-space:nowrap}.smart-picker-column__max-text{color:transparent;font-weight:var(--font-weight-bold,500);position:relative}.smart-picker-column--disabled{opacity:var(--picker-option-disabled-opacity,.3)}
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);text-align:center}.smart-picker-column,.smart-picker-column__offset{position:relative;width:100%}.smart-picker-column__visual{position:absolute;top:0;width:100%}.smart-picker-column__item{pointer-events:none}.smart-picker-column__item--selected{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--picker-option-selected-font-weight-bold,var(--font-weight-bold,700))}.smart-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}.smart-picker-column__mask{background:transparent;display:flex;flex-direction:column;height:100%;position:absolute;top:0;width:100%;z-index:10}.smart-picker-column__mask__item{flex:1}.smart-picker-column__unit{align-items:center;display:flex;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:100%}.smart-picker-column__unit_text{color:var(--picker-option-unit-text-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--picker-option-unit-font-size,12px);left:100%;margin-left:var(--picker-option-unit-mid-size,4px);position:absolute;top:50%;transform:translateY(-50%)}.smart-picker-column__max-text{color:transparent;font-weight:var(--font-weight-bold,500);position:relative}.smart-picker-column--disabled{opacity:var(--picker-option-disabled-opacity,.3)}
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);text-align:center}.smart-picker-column,.smart-picker-column__offset{position:relative;width:100%}.smart-picker-column__visual{position:absolute;top:0;width:100%}.smart-picker-column__item{pointer-events:none}.smart-picker-column__item--selected{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--picker-option-selected-font-weight-bold,var(--font-weight-bold,700))}.smart-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}.smart-picker-column__mask{background:transparent;display:flex;flex-direction:column;height:100%;position:absolute;top:0;width:100%;z-index:10}.smart-picker-column__mask__item{flex:1}.smart-picker-column__unit{align-items:center;display:flex;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:100%}.smart-picker-column__unit_text{color:var(--picker-option-unit-text-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--picker-option-unit-font-size,12px);left:100%;margin-left:var(--picker-option-unit-mid-size,4px);position:absolute;top:50%;transform:translateY(-50%);white-space:nowrap}.smart-picker-column__max-text{color:transparent;font-weight:var(--font-weight-bold,500);position:relative}.smart-picker-column--disabled{opacity:var(--picker-option-disabled-opacity,.3)}
|
package/dist/stepper/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-stepper{background:var(--stepper-container-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--stepper-background-border-radius,10px);display:inline-block;font-size:0;padding:var(--stepper-padding,2px)}.smart-stepper__minus,.smart-stepper__plus{--icon-color:currentColor;align-items:center;background-color:var(--stepper-background-color,var(--app-B6,#fff));border:var(--stepper-button-border,0);border-radius:var(--stepper-border-radius,8px);box-sizing:border-box;color:var(--stepper-button-icon-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-flex;font-size:var(--stepper-button-icon-font-size,27px);height:var(--stepper-input-height,28px);justify-content:center;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,44px)}.smart-stepper__minus-icon,.smart-stepper__plus-icon{display:none}.smart-stepper__minus>.smart-stepper__minus-icon:first-child,.smart-stepper__minus>.smart-stepper__plus-icon:first-child,.smart-stepper__plus>.smart-stepper__minus-icon:first-child,.smart-stepper__plus>.smart-stepper__plus-icon:first-child{display:inline-flex}.smart-stepper__minus--hover,.smart-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.smart-stepper__minus--disabled,.smart-stepper__plus--disabled{
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-stepper{background:var(--stepper-container-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--stepper-background-border-radius,10px);display:inline-block;font-size:0;padding:var(--stepper-padding,2px)}.smart-stepper__minus,.smart-stepper__plus{--icon-color:currentColor;align-items:center;background-color:var(--stepper-background-color,var(--app-B6,#fff));border:var(--stepper-button-border,0);border-radius:var(--stepper-border-radius,8px);box-sizing:border-box;color:var(--stepper-button-icon-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-flex;font-size:var(--stepper-button-icon-font-size,27px);height:var(--stepper-input-height,28px);justify-content:center;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,44px)}.smart-stepper__minus-icon,.smart-stepper__plus-icon{display:none}.smart-stepper__minus>.smart-stepper__minus-icon:first-child,.smart-stepper__minus>.smart-stepper__plus-icon:first-child,.smart-stepper__plus>.smart-stepper__minus-icon:first-child,.smart-stepper__plus>.smart-stepper__plus-icon:first-child{display:inline-flex}.smart-stepper__minus--hover,.smart-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.smart-stepper__minus--disabled,.smart-stepper__plus--disabled{color:var(--stepper-button-disabled-icon-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-stepper__minus--disabled,.smart-stepper__minus--disabled.smart-stepper__minus--hover,.smart-stepper__minus--disabled.smart-stepper__plus--hover,.smart-stepper__plus--disabled,.smart-stepper__plus--disabled.smart-stepper__minus--hover,.smart-stepper__plus--disabled.smart-stepper__plus--hover{background-color:var(--stepper-button-disabled-color,var(--app-B6,#fff))}.smart-stepper--round .smart-stepper__input{background-color:initial!important}.smart-stepper--round .smart-stepper__minus,.smart-stepper--round .smart-stepper__plus{border-radius:100%}.smart-stepper--round .smart-stepper__minus:active,.smart-stepper--round .smart-stepper__plus:active{opacity:.7}.smart-stepper--round .smart-stepper__minus--disabled,.smart-stepper--round .smart-stepper__minus--disabled:active,.smart-stepper--round .smart-stepper__plus--disabled,.smart-stepper--round .smart-stepper__plus--disabled:active{opacity:.3}.smart-stepper--round .smart-stepper__plus{background-color:var(--stepper-button-round-theme-color,#ee0a24);color:#fff}.smart-stepper--round .smart-stepper__minus{background-color:#fff;border:1px solid var(--stepper-button-round-theme-color,#ee0a24);color:var(--stepper-button-round-theme-color,#ee0a24)}.smart-stepper__input{-webkit-appearance:none;border:0;border-radius:0;border-width:1px 0;box-sizing:border-box;color:var(--stepper-input-text-color,var(--app-B6-N1,#000));display:inline-block;font-size:var(--stepper-input-font-size,16px);height:var(--stepper-input-height,28px);min-height:0;padding:1px;text-align:center;vertical-align:middle;width:var(--stepper-input-width,50px)}.smart-stepper__input--disabled{color:var(--stepper-input-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}
|
package/dist/stepper/index.js
CHANGED
@@ -69,6 +69,7 @@ SmartComponent({
|
|
69
69
|
currentValue: '',
|
70
70
|
Minus,
|
71
71
|
Plus,
|
72
|
+
isInit: false,
|
72
73
|
},
|
73
74
|
watch: {
|
74
75
|
value() {
|
@@ -76,14 +77,25 @@ SmartComponent({
|
|
76
77
|
},
|
77
78
|
},
|
78
79
|
created() {
|
80
|
+
const currentValue = this.format(this.data.value, true);
|
81
|
+
if (currentValue !== this.data.value) {
|
82
|
+
this.$emit('change', currentValue);
|
83
|
+
}
|
79
84
|
this.setData({
|
80
|
-
currentValue
|
85
|
+
currentValue,
|
86
|
+
isInit: true,
|
81
87
|
});
|
82
88
|
},
|
83
89
|
methods: {
|
84
90
|
observeValue() {
|
85
|
-
const { value } = this.data;
|
86
|
-
|
91
|
+
const { value, isInit } = this.data;
|
92
|
+
if (!isInit)
|
93
|
+
return;
|
94
|
+
const currentValue = this.format(value, true);
|
95
|
+
if (currentValue !== value) {
|
96
|
+
this.$emit('change', currentValue);
|
97
|
+
}
|
98
|
+
this.setData({ currentValue });
|
87
99
|
},
|
88
100
|
check() {
|
89
101
|
const val = this.format(this.data.currentValue);
|
@@ -102,7 +114,7 @@ SmartComponent({
|
|
102
114
|
this.$emit('focus', event.detail);
|
103
115
|
},
|
104
116
|
onBlur(event) {
|
105
|
-
const value = this.format(event.detail.value);
|
117
|
+
const value = this.format(event.detail.value, true);
|
106
118
|
this.setData({ currentValue: value });
|
107
119
|
this.emitChange(value);
|
108
120
|
this.$emit('blur', Object.assign(Object.assign({}, event.detail), { value }));
|
@@ -116,13 +128,16 @@ SmartComponent({
|
|
116
128
|
return value;
|
117
129
|
},
|
118
130
|
// limit value range
|
119
|
-
format(value) {
|
131
|
+
format(value, isFormatAll = false) {
|
120
132
|
value = this.filter(value);
|
121
133
|
// format range
|
122
134
|
value = value === '' ? 0 : +value;
|
123
|
-
value = Math.
|
135
|
+
value = Math.min(this.data.max, value);
|
136
|
+
if (isFormatAll) {
|
137
|
+
value = Math.max(value, this.data.min);
|
138
|
+
}
|
124
139
|
// format decimal
|
125
|
-
if (isDef(this.data.decimalLength)) {
|
140
|
+
if (isDef(this.data.decimalLength) && isFormatAll) {
|
126
141
|
value = value.toFixed(this.data.decimalLength);
|
127
142
|
}
|
128
143
|
return value;
|
@@ -149,7 +164,7 @@ SmartComponent({
|
|
149
164
|
return;
|
150
165
|
}
|
151
166
|
const diff = type === 'minus' ? -this.data.step : +this.data.step;
|
152
|
-
const value = this.format(add(+this.data.currentValue, diff));
|
167
|
+
const value = this.format(add(+this.data.currentValue, diff), true);
|
153
168
|
this.emitChange(value);
|
154
169
|
this.$emit(type);
|
155
170
|
ty.vibrateShort({ type: 'light' });
|
package/dist/stepper/index.wxml
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
wx:if="{{ showMinus }}"
|
7
7
|
data-type="minus"
|
8
8
|
style="{{ computed.buttonStyle({ buttonSize }) }}"
|
9
|
-
class="minus-class {{ utils.bem('stepper__minus', { disabled:
|
9
|
+
class="minus-class {{ utils.bem('stepper__minus', { disabled: computed.checkMin({ min, currentValue, disabled, disableMinus }) }) }}"
|
10
10
|
hover-class="smart-stepper__minus--hover"
|
11
11
|
hover-stay-time="70"
|
12
12
|
bind:tap="onTap"
|
@@ -32,7 +32,7 @@
|
|
32
32
|
wx:if="{{ showPlus }}"
|
33
33
|
data-type="plus"
|
34
34
|
style="{{ computed.buttonStyle({ buttonSize }) }}"
|
35
|
-
class="plus-class {{ utils.bem('stepper__plus', { disabled:
|
35
|
+
class="plus-class {{ utils.bem('stepper__plus', { disabled: computed.checkMax({ max, currentValue, disabled, disablePlus }) }) }}"
|
36
36
|
hover-class="smart-stepper__plus--hover"
|
37
37
|
hover-stay-time="70"
|
38
38
|
bind:tap="onTap"
|
package/dist/stepper/index.wxs
CHANGED
@@ -16,7 +16,17 @@ function inputStyle(data) {
|
|
16
16
|
});
|
17
17
|
}
|
18
18
|
|
19
|
+
function checkMin(data) {
|
20
|
+
return data.currentValue <= Number(data.min) || data.disabled || data.disableMinus
|
21
|
+
}
|
22
|
+
|
23
|
+
function checkMax(data) {
|
24
|
+
return data.currentValue >= Number(data.max) || data.disabled || data.disablePlus
|
25
|
+
}
|
26
|
+
|
19
27
|
module.exports = {
|
20
28
|
buttonStyle: buttonStyle,
|
21
29
|
inputStyle: inputStyle,
|
30
|
+
checkMin: checkMin,
|
31
|
+
checkMax: checkMax,
|
22
32
|
};
|
package/dist/stepper/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-stepper{background:var(--stepper-container-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--stepper-background-border-radius,10px);display:inline-block;font-size:0;padding:var(--stepper-padding,2px)}.smart-stepper__minus,.smart-stepper__plus{--icon-color:currentColor;align-items:center;background-color:var(--stepper-background-color,var(--app-B6,#fff));border:var(--stepper-button-border,0);border-radius:var(--stepper-border-radius,8px);box-sizing:border-box;color:var(--stepper-button-icon-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-flex;font-size:var(--stepper-button-icon-font-size,27px);height:var(--stepper-input-height,28px);justify-content:center;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,44px)}.smart-stepper__minus-icon,.smart-stepper__plus-icon{display:none}.smart-stepper__minus>.smart-stepper__minus-icon:first-child,.smart-stepper__minus>.smart-stepper__plus-icon:first-child,.smart-stepper__plus>.smart-stepper__minus-icon:first-child,.smart-stepper__plus>.smart-stepper__plus-icon:first-child{display:inline-flex}.smart-stepper__minus--hover,.smart-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.smart-stepper__minus--disabled,.smart-stepper__plus--disabled{
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-stepper{background:var(--stepper-container-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--stepper-background-border-radius,10px);display:inline-block;font-size:0;padding:var(--stepper-padding,2px)}.smart-stepper__minus,.smart-stepper__plus{--icon-color:currentColor;align-items:center;background-color:var(--stepper-background-color,var(--app-B6,#fff));border:var(--stepper-button-border,0);border-radius:var(--stepper-border-radius,8px);box-sizing:border-box;color:var(--stepper-button-icon-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-flex;font-size:var(--stepper-button-icon-font-size,27px);height:var(--stepper-input-height,28px);justify-content:center;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,44px)}.smart-stepper__minus-icon,.smart-stepper__plus-icon{display:none}.smart-stepper__minus>.smart-stepper__minus-icon:first-child,.smart-stepper__minus>.smart-stepper__plus-icon:first-child,.smart-stepper__plus>.smart-stepper__minus-icon:first-child,.smart-stepper__plus>.smart-stepper__plus-icon:first-child{display:inline-flex}.smart-stepper__minus--hover,.smart-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.smart-stepper__minus--disabled,.smart-stepper__plus--disabled{color:var(--stepper-button-disabled-icon-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-stepper__minus--disabled,.smart-stepper__minus--disabled.smart-stepper__minus--hover,.smart-stepper__minus--disabled.smart-stepper__plus--hover,.smart-stepper__plus--disabled,.smart-stepper__plus--disabled.smart-stepper__minus--hover,.smart-stepper__plus--disabled.smart-stepper__plus--hover{background-color:var(--stepper-button-disabled-color,var(--app-B6,#fff))}.smart-stepper--round .smart-stepper__input{background-color:initial!important}.smart-stepper--round .smart-stepper__minus,.smart-stepper--round .smart-stepper__plus{border-radius:100%}.smart-stepper--round .smart-stepper__minus:active,.smart-stepper--round .smart-stepper__plus:active{opacity:.7}.smart-stepper--round .smart-stepper__minus--disabled,.smart-stepper--round .smart-stepper__minus--disabled:active,.smart-stepper--round .smart-stepper__plus--disabled,.smart-stepper--round .smart-stepper__plus--disabled:active{opacity:.3}.smart-stepper--round .smart-stepper__plus{background-color:var(--stepper-button-round-theme-color,#ee0a24);color:#fff}.smart-stepper--round .smart-stepper__minus{background-color:#fff;border:1px solid var(--stepper-button-round-theme-color,#ee0a24);color:var(--stepper-button-round-theme-color,#ee0a24)}.smart-stepper__input{-webkit-appearance:none;border:0;border-radius:0;border-width:1px 0;box-sizing:border-box;color:var(--stepper-input-text-color,var(--app-B6-N1,#000));display:inline-block;font-size:var(--stepper-input-font-size,16px);height:var(--stepper-input-height,28px);min-height:0;padding:1px;text-align:center;vertical-align:middle;width:var(--stepper-input-width,50px)}.smart-stepper__input--disabled{color:var(--stepper-input-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__header:empty{display:none}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
@@ -21,9 +21,17 @@
|
|
21
21
|
bind:leave="onLeave"
|
22
22
|
bind:after-leave="onAfterLeave"
|
23
23
|
>
|
24
|
-
<view
|
25
|
-
{{ title }}
|
26
|
-
<smart-icon
|
24
|
+
<view class="smart-bottom-sheet__header">
|
25
|
+
<view wx:if="{{ title }}">{{ title }}</view>
|
26
|
+
<smart-icon
|
27
|
+
wx:if="{{ title && showClose }}"
|
28
|
+
name="{{ xmarkIcon }}"
|
29
|
+
class="smart-bottom-sheet__icon"
|
30
|
+
size="{{ iconSize }}"
|
31
|
+
color="{{ xmarkIconColor }}"
|
32
|
+
bind:click="onClose"
|
33
|
+
/>
|
34
|
+
<slot name="title" />
|
27
35
|
</view>
|
28
36
|
|
29
37
|
<view wx:if="{{ contentHeight !== null }}" class="smart-bottom-sheet__content smart-bottom-sheet__content_height" style="{{computed.getHeight(contentHeight)}}">
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-bottom-sheet{color:var(--bottom-sheet-font-color,var(--app-B4-N1,#000));display:flex;flex-direction:column;max-height:var(--bottom-sheet-max-height,50%);min-height:var(--bottom-sheet-min-height,auto);padding-bottom:env(safe-area-inset-bottom);width:var(--bottom-sheet-width,100%)}.smart-bottom-sheet__header{color:var(--bottom-sheet-header-color,var(--app-B4-N1,#000));font-size:var(--bottom-sheet-header-font-size,17px);font-weight:var(--bottom-sheet-header-font-weight,600);line-height:var(--bottom-sheet-header-height,56px);padding:var(--bottom-sheet-header-padding,0 16px);text-align:center}.smart-bottom-sheet__header:empty{display:none}.smart-bottom-sheet__content{box-sizing:border-box;overflow-y:auto;padding:var(--bottom-sheet-padding,0 16px);position:relative}.smart-bottom-sheet__content_height{overflow-y:visible}.smart-bottom-sheet__icon{margin:var(--bottom-sheet-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}
|
package/lib/image/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-image{display:inline-block;position:relative;vertical-align:middle}.smart-image__tint-color{display:inline-block;height:100%;left:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;position:absolute;top:0;width:100%}.smart-image--round{border-radius:50%;overflow:hidden}.smart-image--round .smart-image__img{border-radius:inherit}.smart-image__error,.smart-image__img,.smart-image__loading{display:block;height:100%;width:100%}.smart-image__error,.smart-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.smart-image__loading-icon{--icon-color:var(--image-loading-icon-color,#dcdee0);color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.smart-image__error-img{height:var(--image-error-size,32px);width:var(--image-error-size,32px)}
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:0}.smart-image{display:inline-block;position:relative;vertical-align:middle}.smart-image__tint-color{display:inline-block;height:100%;left:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;position:absolute;top:0;width:100%}.smart-image--round{border-radius:50%;overflow:hidden}.smart-image--round .smart-image__img{border-radius:inherit}.smart-image__error,.smart-image__img,.smart-image__loading{display:block;height:100%;width:100%}.smart-image__error,.smart-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.smart-image__loading-icon{--icon-color:var(--image-loading-icon-color,#dcdee0);color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.smart-image__error-img{height:var(--image-error-size,32px);width:var(--image-error-size,32px)}
|
package/lib/image/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-image{display:inline-block;position:relative;vertical-align:middle}.smart-image__tint-color{display:inline-block;height:100%;left:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;position:absolute;top:0;width:100%}.smart-image--round{border-radius:50%;overflow:hidden}.smart-image--round .smart-image__img{border-radius:inherit}.smart-image__error,.smart-image__img,.smart-image__loading{display:block;height:100%;width:100%}.smart-image__error,.smart-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.smart-image__loading-icon{--icon-color:var(--image-loading-icon-color,#dcdee0);color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.smart-image__error-img{height:var(--image-error-size,32px);width:var(--image-error-size,32px)}
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}:host{font-size:0;line-height:0}.smart-image{display:inline-block;position:relative;vertical-align:middle}.smart-image__tint-color{display:inline-block;height:100%;left:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;position:absolute;top:0;width:100%}.smart-image--round{border-radius:50%;overflow:hidden}.smart-image--round .smart-image__img{border-radius:inherit}.smart-image__error,.smart-image__img,.smart-image__loading{display:block;height:100%;width:100%}.smart-image__error,.smart-image__loading{align-items:center;background-color:var(--image-placeholder-background-color,#f7f8fa);color:var(--image-placeholder-text-color,#969799);display:flex;flex-direction:column;font-size:var(--image-placeholder-font-size,14px);justify-content:center;left:0;position:absolute;top:0}.smart-image__loading-icon{--icon-color:var(--image-loading-icon-color,#dcdee0);color:var(--image-loading-icon-color,#dcdee0);font-size:var(--image-loading-icon-size,32px)!important}.smart-image__error-img{height:var(--image-error-size,32px);width:var(--image-error-size,32px)}
|
package/lib/nav-bar/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,var(--app-device-navbar-height,46px));line-height:var(--nav-bar-height,var(--app-device-navbar-height,46px));position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,var(--app-device-navbar-height,46px));line-height:var(--nav-bar-height,var(--app-device-navbar-height,46px));position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--safe{padding-top:var(--app-device-status-height,20px)}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar--round{border-radius:var(--nav-bar-round-border-radius,16px 16px 0 0);min-height:var(--nav-bar-round-min-height,56px)}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__left--home{max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left--home .smart-nav-bar__text{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-nav-bar__left--title{max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left--title .smart-nav-bar__text{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-nav-bar__right{right:var(--padding-md,16px)}.smart-nav-bar__right .smart-nav-bar__text{color:var(--nav-bar-right-text-color,var(--nav-bar-text-color,var(--app-B2-N1,#000)))}
|
package/lib/nav-bar/index.wxml
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
style="{{ computed.barStyle({ zIndex, statusBarHeight, safeAreaInsetTop }) }}; {{ customStyle }}"
|
9
9
|
>
|
10
10
|
<view class="smart-nav-bar__content">
|
11
|
-
<view class="
|
11
|
+
<view class="{{ utils.bem('nav-bar__left', { home: leftTextType === 'home', title: leftTextType === 'title' }) }}" bind:tap="onClickLeft">
|
12
12
|
<block wx:if="{{ leftArrow || leftText || leftIcon }}">
|
13
13
|
<smart-icon
|
14
14
|
wx:if="{{ leftArrow }}"
|
@@ -27,7 +27,7 @@
|
|
27
27
|
</view>
|
28
28
|
<view
|
29
29
|
wx:if="{{ leftText }}"
|
30
|
-
class="
|
30
|
+
class="smart-nav-bar__text"
|
31
31
|
catch:tap="onClickLeftText"
|
32
32
|
hover-class="{{ leftTextType === 'back' ? 'smart-nav-bar__text--hover' : '' }}"
|
33
33
|
hover-stay-time="70"
|
package/lib/nav-bar/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,var(--app-device-navbar-height,46px));line-height:var(--nav-bar-height,var(--app-device-navbar-height,46px));position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,var(--app-device-navbar-height,46px));line-height:var(--nav-bar-height,var(--app-device-navbar-height,46px));position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--safe{padding-top:var(--app-device-status-height,20px)}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar--round{border-radius:var(--nav-bar-round-border-radius,16px 16px 0 0);min-height:var(--nav-bar-round-min-height,56px)}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__left--home{max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left--home .smart-nav-bar__text{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-nav-bar__left--title{max-width:var(--nav-bar-title-max-width,calc(100% - 360rpx))}.smart-nav-bar__left--title .smart-nav-bar__text{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smart-nav-bar__right{right:var(--padding-md,16px)}.smart-nav-bar__right .smart-nav-bar__text{color:var(--nav-bar-right-text-color,var(--nav-bar-text-color,var(--app-B2-N1,#000)))}
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);text-align:center}.smart-picker-column,.smart-picker-column__offset{position:relative;width:100%}.smart-picker-column__visual{position:absolute;top:0;width:100%}.smart-picker-column__item{pointer-events:none}.smart-picker-column__item--selected{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--picker-option-selected-font-weight-bold,var(--font-weight-bold,700))}.smart-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}.smart-picker-column__mask{background:transparent;display:flex;flex-direction:column;height:100%;position:absolute;top:0;width:100%;z-index:10}.smart-picker-column__mask__item{flex:1}.smart-picker-column__unit{align-items:center;display:flex;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:100%}.smart-picker-column__unit_text{color:var(--picker-option-unit-text-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--picker-option-unit-font-size,12px);left:100%;margin-left:var(--picker-option-unit-mid-size,4px);position:absolute;top:50%;transform:translateY(-50%)}.smart-picker-column__max-text{color:transparent;font-weight:var(--font-weight-bold,500);position:relative}.smart-picker-column--disabled{opacity:var(--picker-option-disabled-opacity,.3)}
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);text-align:center}.smart-picker-column,.smart-picker-column__offset{position:relative;width:100%}.smart-picker-column__visual{position:absolute;top:0;width:100%}.smart-picker-column__item{pointer-events:none}.smart-picker-column__item--selected{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--picker-option-selected-font-weight-bold,var(--font-weight-bold,700))}.smart-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}.smart-picker-column__mask{background:transparent;display:flex;flex-direction:column;height:100%;position:absolute;top:0;width:100%;z-index:10}.smart-picker-column__mask__item{flex:1}.smart-picker-column__unit{align-items:center;display:flex;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:100%}.smart-picker-column__unit_text{color:var(--picker-option-unit-text-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--picker-option-unit-font-size,12px);left:100%;margin-left:var(--picker-option-unit-mid-size,4px);position:absolute;top:50%;transform:translateY(-50%);white-space:nowrap}.smart-picker-column__max-text{color:transparent;font-weight:var(--font-weight-bold,500);position:relative}.smart-picker-column--disabled{opacity:var(--picker-option-disabled-opacity,.3)}
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);text-align:center}.smart-picker-column,.smart-picker-column__offset{position:relative;width:100%}.smart-picker-column__visual{position:absolute;top:0;width:100%}.smart-picker-column__item{pointer-events:none}.smart-picker-column__item--selected{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--picker-option-selected-font-weight-bold,var(--font-weight-bold,700))}.smart-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}.smart-picker-column__mask{background:transparent;display:flex;flex-direction:column;height:100%;position:absolute;top:0;width:100%;z-index:10}.smart-picker-column__mask__item{flex:1}.smart-picker-column__unit{align-items:center;display:flex;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:100%}.smart-picker-column__unit_text{color:var(--picker-option-unit-text-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--picker-option-unit-font-size,12px);left:100%;margin-left:var(--picker-option-unit-mid-size,4px);position:absolute;top:50%;transform:translateY(-50%)}.smart-picker-column__max-text{color:transparent;font-weight:var(--font-weight-bold,500);position:relative}.smart-picker-column--disabled{opacity:var(--picker-option-disabled-opacity,.3)}
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-picker-column{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-size:var(--picker-option-font-size,16px);font-weight:var(--font-weight-bold,500);text-align:center}.smart-picker-column,.smart-picker-column__offset{position:relative;width:100%}.smart-picker-column__visual{position:absolute;top:0;width:100%}.smart-picker-column__item{pointer-events:none}.smart-picker-column__item--selected{color:var(--picker-option-selected-text-color,var(--app-B6-N1,#000));font-weight:var(--picker-option-selected-font-weight-bold,var(--font-weight-bold,700))}.smart-picker-column__item--disabled{opacity:var(--picker-option-disabled-opacity,.3)}.smart-picker-column__mask{background:transparent;display:flex;flex-direction:column;height:100%;position:absolute;top:0;width:100%;z-index:10}.smart-picker-column__mask__item{flex:1}.smart-picker-column__unit{align-items:center;display:flex;justify-content:center;position:absolute;top:50%;transform:translateY(-50%);width:100%}.smart-picker-column__unit_text{color:var(--picker-option-unit-text-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--picker-option-unit-font-size,12px);left:100%;margin-left:var(--picker-option-unit-mid-size,4px);position:absolute;top:50%;transform:translateY(-50%);white-space:nowrap}.smart-picker-column__max-text{color:transparent;font-weight:var(--font-weight-bold,500);position:relative}.smart-picker-column--disabled{opacity:var(--picker-option-disabled-opacity,.3)}
|
package/lib/stepper/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-stepper{background:var(--stepper-container-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--stepper-background-border-radius,10px);display:inline-block;font-size:0;padding:var(--stepper-padding,2px)}.smart-stepper__minus,.smart-stepper__plus{--icon-color:currentColor;align-items:center;background-color:var(--stepper-background-color,var(--app-B6,#fff));border:var(--stepper-button-border,0);border-radius:var(--stepper-border-radius,8px);box-sizing:border-box;color:var(--stepper-button-icon-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-flex;font-size:var(--stepper-button-icon-font-size,27px);height:var(--stepper-input-height,28px);justify-content:center;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,44px)}.smart-stepper__minus-icon,.smart-stepper__plus-icon{display:none}.smart-stepper__minus>.smart-stepper__minus-icon:first-child,.smart-stepper__minus>.smart-stepper__plus-icon:first-child,.smart-stepper__plus>.smart-stepper__minus-icon:first-child,.smart-stepper__plus>.smart-stepper__plus-icon:first-child{display:inline-flex}.smart-stepper__minus--hover,.smart-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.smart-stepper__minus--disabled,.smart-stepper__plus--disabled{
|
1
|
+
@import '../common/index.css';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-stepper{background:var(--stepper-container-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--stepper-background-border-radius,10px);display:inline-block;font-size:0;padding:var(--stepper-padding,2px)}.smart-stepper__minus,.smart-stepper__plus{--icon-color:currentColor;align-items:center;background-color:var(--stepper-background-color,var(--app-B6,#fff));border:var(--stepper-button-border,0);border-radius:var(--stepper-border-radius,8px);box-sizing:border-box;color:var(--stepper-button-icon-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-flex;font-size:var(--stepper-button-icon-font-size,27px);height:var(--stepper-input-height,28px);justify-content:center;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,44px)}.smart-stepper__minus-icon,.smart-stepper__plus-icon{display:none}.smart-stepper__minus>.smart-stepper__minus-icon:first-child,.smart-stepper__minus>.smart-stepper__plus-icon:first-child,.smart-stepper__plus>.smart-stepper__minus-icon:first-child,.smart-stepper__plus>.smart-stepper__plus-icon:first-child{display:inline-flex}.smart-stepper__minus--hover,.smart-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.smart-stepper__minus--disabled,.smart-stepper__plus--disabled{color:var(--stepper-button-disabled-icon-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-stepper__minus--disabled,.smart-stepper__minus--disabled.smart-stepper__minus--hover,.smart-stepper__minus--disabled.smart-stepper__plus--hover,.smart-stepper__plus--disabled,.smart-stepper__plus--disabled.smart-stepper__minus--hover,.smart-stepper__plus--disabled.smart-stepper__plus--hover{background-color:var(--stepper-button-disabled-color,var(--app-B6,#fff))}.smart-stepper--round .smart-stepper__input{background-color:initial!important}.smart-stepper--round .smart-stepper__minus,.smart-stepper--round .smart-stepper__plus{border-radius:100%}.smart-stepper--round .smart-stepper__minus:active,.smart-stepper--round .smart-stepper__plus:active{opacity:.7}.smart-stepper--round .smart-stepper__minus--disabled,.smart-stepper--round .smart-stepper__minus--disabled:active,.smart-stepper--round .smart-stepper__plus--disabled,.smart-stepper--round .smart-stepper__plus--disabled:active{opacity:.3}.smart-stepper--round .smart-stepper__plus{background-color:var(--stepper-button-round-theme-color,#ee0a24);color:#fff}.smart-stepper--round .smart-stepper__minus{background-color:#fff;border:1px solid var(--stepper-button-round-theme-color,#ee0a24);color:var(--stepper-button-round-theme-color,#ee0a24)}.smart-stepper__input{-webkit-appearance:none;border:0;border-radius:0;border-width:1px 0;box-sizing:border-box;color:var(--stepper-input-text-color,var(--app-B6-N1,#000));display:inline-block;font-size:var(--stepper-input-font-size,16px);height:var(--stepper-input-height,28px);min-height:0;padding:1px;text-align:center;vertical-align:middle;width:var(--stepper-input-width,50px)}.smart-stepper__input--disabled{color:var(--stepper-input-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}
|
package/lib/stepper/index.js
CHANGED
@@ -85,6 +85,7 @@ function equal(value1, value2) {
|
|
85
85
|
currentValue: '',
|
86
86
|
Minus: icons_1.Minus,
|
87
87
|
Plus: icons_2.Plus,
|
88
|
+
isInit: false,
|
88
89
|
},
|
89
90
|
watch: {
|
90
91
|
value: function () {
|
@@ -92,14 +93,25 @@ function equal(value1, value2) {
|
|
92
93
|
},
|
93
94
|
},
|
94
95
|
created: function () {
|
96
|
+
var currentValue = this.format(this.data.value, true);
|
97
|
+
if (currentValue !== this.data.value) {
|
98
|
+
this.$emit('change', currentValue);
|
99
|
+
}
|
95
100
|
this.setData({
|
96
|
-
currentValue:
|
101
|
+
currentValue: currentValue,
|
102
|
+
isInit: true,
|
97
103
|
});
|
98
104
|
},
|
99
105
|
methods: {
|
100
106
|
observeValue: function () {
|
101
|
-
var
|
102
|
-
|
107
|
+
var _a = this.data, value = _a.value, isInit = _a.isInit;
|
108
|
+
if (!isInit)
|
109
|
+
return;
|
110
|
+
var currentValue = this.format(value, true);
|
111
|
+
if (currentValue !== value) {
|
112
|
+
this.$emit('change', currentValue);
|
113
|
+
}
|
114
|
+
this.setData({ currentValue: currentValue });
|
103
115
|
},
|
104
116
|
check: function () {
|
105
117
|
var val = this.format(this.data.currentValue);
|
@@ -118,7 +130,7 @@ function equal(value1, value2) {
|
|
118
130
|
this.$emit('focus', event.detail);
|
119
131
|
},
|
120
132
|
onBlur: function (event) {
|
121
|
-
var value = this.format(event.detail.value);
|
133
|
+
var value = this.format(event.detail.value, true);
|
122
134
|
this.setData({ currentValue: value });
|
123
135
|
this.emitChange(value);
|
124
136
|
this.$emit('blur', __assign(__assign({}, event.detail), { value: value }));
|
@@ -132,13 +144,17 @@ function equal(value1, value2) {
|
|
132
144
|
return value;
|
133
145
|
},
|
134
146
|
// limit value range
|
135
|
-
format: function (value) {
|
147
|
+
format: function (value, isFormatAll) {
|
148
|
+
if (isFormatAll === void 0) { isFormatAll = false; }
|
136
149
|
value = this.filter(value);
|
137
150
|
// format range
|
138
151
|
value = value === '' ? 0 : +value;
|
139
|
-
value = Math.
|
152
|
+
value = Math.min(this.data.max, value);
|
153
|
+
if (isFormatAll) {
|
154
|
+
value = Math.max(value, this.data.min);
|
155
|
+
}
|
140
156
|
// format decimal
|
141
|
-
if ((0, validator_1.isDef)(this.data.decimalLength)) {
|
157
|
+
if ((0, validator_1.isDef)(this.data.decimalLength) && isFormatAll) {
|
142
158
|
value = value.toFixed(this.data.decimalLength);
|
143
159
|
}
|
144
160
|
return value;
|
@@ -165,7 +181,7 @@ function equal(value1, value2) {
|
|
165
181
|
return;
|
166
182
|
}
|
167
183
|
var diff = type === 'minus' ? -this.data.step : +this.data.step;
|
168
|
-
var value = this.format(add(+this.data.currentValue, diff));
|
184
|
+
var value = this.format(add(+this.data.currentValue, diff), true);
|
169
185
|
this.emitChange(value);
|
170
186
|
this.$emit(type);
|
171
187
|
ty_1.default.vibrateShort({ type: 'light' });
|
package/lib/stepper/index.wxml
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
wx:if="{{ showMinus }}"
|
7
7
|
data-type="minus"
|
8
8
|
style="{{ computed.buttonStyle({ buttonSize }) }}"
|
9
|
-
class="minus-class {{ utils.bem('stepper__minus', { disabled:
|
9
|
+
class="minus-class {{ utils.bem('stepper__minus', { disabled: computed.checkMin({ min, currentValue, disabled, disableMinus }) }) }}"
|
10
10
|
hover-class="smart-stepper__minus--hover"
|
11
11
|
hover-stay-time="70"
|
12
12
|
bind:tap="onTap"
|
@@ -32,7 +32,7 @@
|
|
32
32
|
wx:if="{{ showPlus }}"
|
33
33
|
data-type="plus"
|
34
34
|
style="{{ computed.buttonStyle({ buttonSize }) }}"
|
35
|
-
class="plus-class {{ utils.bem('stepper__plus', { disabled:
|
35
|
+
class="plus-class {{ utils.bem('stepper__plus', { disabled: computed.checkMax({ max, currentValue, disabled, disablePlus }) }) }}"
|
36
36
|
hover-class="smart-stepper__plus--hover"
|
37
37
|
hover-stay-time="70"
|
38
38
|
bind:tap="onTap"
|
package/lib/stepper/index.wxs
CHANGED
@@ -16,7 +16,17 @@ function inputStyle(data) {
|
|
16
16
|
});
|
17
17
|
}
|
18
18
|
|
19
|
+
function checkMin(data) {
|
20
|
+
return data.currentValue <= Number(data.min) || data.disabled || data.disableMinus
|
21
|
+
}
|
22
|
+
|
23
|
+
function checkMax(data) {
|
24
|
+
return data.currentValue >= Number(data.max) || data.disabled || data.disablePlus
|
25
|
+
}
|
26
|
+
|
19
27
|
module.exports = {
|
20
28
|
buttonStyle: buttonStyle,
|
21
29
|
inputStyle: inputStyle,
|
30
|
+
checkMin: checkMin,
|
31
|
+
checkMax: checkMax,
|
22
32
|
};
|
package/lib/stepper/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-stepper{background:var(--stepper-container-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--stepper-background-border-radius,10px);display:inline-block;font-size:0;padding:var(--stepper-padding,2px)}.smart-stepper__minus,.smart-stepper__plus{--icon-color:currentColor;align-items:center;background-color:var(--stepper-background-color,var(--app-B6,#fff));border:var(--stepper-button-border,0);border-radius:var(--stepper-border-radius,8px);box-sizing:border-box;color:var(--stepper-button-icon-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-flex;font-size:var(--stepper-button-icon-font-size,27px);height:var(--stepper-input-height,28px);justify-content:center;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,44px)}.smart-stepper__minus-icon,.smart-stepper__plus-icon{display:none}.smart-stepper__minus>.smart-stepper__minus-icon:first-child,.smart-stepper__minus>.smart-stepper__plus-icon:first-child,.smart-stepper__plus>.smart-stepper__minus-icon:first-child,.smart-stepper__plus>.smart-stepper__plus-icon:first-child{display:inline-flex}.smart-stepper__minus--hover,.smart-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.smart-stepper__minus--disabled,.smart-stepper__plus--disabled{
|
1
|
+
@import '../common/index.wxss';:root{--smart-ui-overlay:rgba(0,0,0,.4);--smart-ui-dialog-background:#fff;--smart-ui-border-image:linear-gradient(90deg,transparent,rgba(0,0,0,.3),transparent)}:root[theme=dark]{--smart-ui-overlay:rgba(0,0,0,.7);--smart-ui-dialog-background:#333;--smart-ui-border-image:linear-gradient(90deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3),hsla(0,0%,100%,0))}.smart-stepper{background:var(--stepper-container-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--stepper-background-border-radius,10px);display:inline-block;font-size:0;padding:var(--stepper-padding,2px)}.smart-stepper__minus,.smart-stepper__plus{--icon-color:currentColor;align-items:center;background-color:var(--stepper-background-color,var(--app-B6,#fff));border:var(--stepper-button-border,0);border-radius:var(--stepper-border-radius,8px);box-sizing:border-box;color:var(--stepper-button-icon-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:inline-flex;font-size:var(--stepper-button-icon-font-size,27px);height:var(--stepper-input-height,28px);justify-content:center;padding:var(--padding-base,4px);position:relative;vertical-align:middle;width:var(--stepper-input-height,44px)}.smart-stepper__minus-icon,.smart-stepper__plus-icon{display:none}.smart-stepper__minus>.smart-stepper__minus-icon:first-child,.smart-stepper__minus>.smart-stepper__plus-icon:first-child,.smart-stepper__plus>.smart-stepper__minus-icon:first-child,.smart-stepper__plus>.smart-stepper__plus-icon:first-child{display:inline-flex}.smart-stepper__minus--hover,.smart-stepper__plus--hover{background-color:var(--stepper-active-color,#e8e8e8)}.smart-stepper__minus--disabled,.smart-stepper__plus--disabled{color:var(--stepper-button-disabled-icon-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-stepper__minus--disabled,.smart-stepper__minus--disabled.smart-stepper__minus--hover,.smart-stepper__minus--disabled.smart-stepper__plus--hover,.smart-stepper__plus--disabled,.smart-stepper__plus--disabled.smart-stepper__minus--hover,.smart-stepper__plus--disabled.smart-stepper__plus--hover{background-color:var(--stepper-button-disabled-color,var(--app-B6,#fff))}.smart-stepper--round .smart-stepper__input{background-color:initial!important}.smart-stepper--round .smart-stepper__minus,.smart-stepper--round .smart-stepper__plus{border-radius:100%}.smart-stepper--round .smart-stepper__minus:active,.smart-stepper--round .smart-stepper__plus:active{opacity:.7}.smart-stepper--round .smart-stepper__minus--disabled,.smart-stepper--round .smart-stepper__minus--disabled:active,.smart-stepper--round .smart-stepper__plus--disabled,.smart-stepper--round .smart-stepper__plus--disabled:active{opacity:.3}.smart-stepper--round .smart-stepper__plus{background-color:var(--stepper-button-round-theme-color,#ee0a24);color:#fff}.smart-stepper--round .smart-stepper__minus{background-color:#fff;border:1px solid var(--stepper-button-round-theme-color,#ee0a24);color:var(--stepper-button-round-theme-color,#ee0a24)}.smart-stepper__input{-webkit-appearance:none;border:0;border-radius:0;border-width:1px 0;box-sizing:border-box;color:var(--stepper-input-text-color,var(--app-B6-N1,#000));display:inline-block;font-size:var(--stepper-input-font-size,16px);height:var(--stepper-input-height,28px);min-height:0;padding:1px;text-align:center;vertical-align:middle;width:var(--stepper-input-width,50px)}.smart-stepper__input--disabled{color:var(--stepper-input-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}
|