@tuya-miniapp/smart-ui 1.0.0-beta-1 → 1.0.0-beta-2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- @import '../common/index.css';.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__icon{font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}.smart-action-sheet__item{color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000))}.smart-action-sheet__item:not(:last-child){border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
1
+ @import '../common/index.css';.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__list{max-height:325px;overflow-y:scroll}.smart-action-sheet__icon{font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}.smart-action-sheet__item{color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000))}.smart-action-sheet__item:not(:last-child){border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
@@ -24,7 +24,7 @@
24
24
  <view wx:if="{{ description }}" class="smart-action-sheet__description smart-hairline--bottom">
25
25
  {{ description }}
26
26
  </view>
27
- <view wx:if="{{ actions && actions.length }}" class="list-class">
27
+ <view wx:if="{{ actions && actions.length }}" class="smart-action-sheet__list list-class">
28
28
  <!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
29
29
  <button
30
30
  wx:for="{{ actions }}"
@@ -1 +1 @@
1
- @import '../common/index.wxss';.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__icon{font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}.smart-action-sheet__item{color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000))}.smart-action-sheet__item:not(:last-child){border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
1
+ @import '../common/index.wxss';.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__list{max-height:325px;overflow-y:scroll}.smart-action-sheet__icon{font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}.smart-action-sheet__item{color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000))}.smart-action-sheet__item:not(:last-child){border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
@@ -26,6 +26,14 @@ SmartComponent({
26
26
  type: Boolean,
27
27
  value: true,
28
28
  },
29
+ ellipsis: {
30
+ type: Boolean,
31
+ value: true,
32
+ },
33
+ swipeThreshold: {
34
+ type: Number,
35
+ value: 5,
36
+ },
29
37
  showHeader: {
30
38
  type: Boolean,
31
39
  value: true,
@@ -19,6 +19,8 @@
19
19
  color="{{ activeColor }}"
20
20
  border="{{ false }}"
21
21
  swipeable="{{ swipeable }}"
22
+ ellipsis="{{ ellipsis }}"
23
+ swipe-threshold="{{ swipeThreshold }}"
22
24
  bind:click="onClickTab"
23
25
  >
24
26
  <smart-tab
@@ -1 +1 @@
1
- @import '../common/index.css';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}
1
+ @import '../common/index.css';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important;border-radius:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}
@@ -1 +1 @@
1
- @import '../common/index.wxss';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}
1
+ @import '../common/index.wxss';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important;border-radius:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}
@@ -89,6 +89,9 @@ SmartComponent({
89
89
  else {
90
90
  this.setData({ animate: false });
91
91
  }
92
+ if (this.fireChange) {
93
+ this.$emit('change', currentIndex);
94
+ }
92
95
  },
93
96
  onClickItem(event) {
94
97
  const { index } = event.currentTarget.dataset;
@@ -160,6 +163,7 @@ SmartComponent({
160
163
  const { data } = this;
161
164
  index = this.adjustIndex(index) || 0;
162
165
  const offset = -index * data.itemHeight;
166
+ this.fireChange = false;
163
167
  if (index !== data.currentIndex) {
164
168
  // 需要动画的情况下,保持最大的截取
165
169
  if (animate) {
@@ -170,7 +174,7 @@ SmartComponent({
170
174
  animate: true,
171
175
  duration: DEFAULT_DURATION,
172
176
  }).then(() => {
173
- userAction && this.$emit('change', index);
177
+ userAction && (this.fireChange = true);
174
178
  });
175
179
  });
176
180
  }
@@ -1 +1 @@
1
- @import '../common/index.css';.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__icon{font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}.smart-action-sheet__item{color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000))}.smart-action-sheet__item:not(:last-child){border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
1
+ @import '../common/index.css';.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__list{max-height:325px;overflow-y:scroll}.smart-action-sheet__icon{font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}.smart-action-sheet__item{color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000))}.smart-action-sheet__item:not(:last-child){border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
@@ -24,7 +24,7 @@
24
24
  <view wx:if="{{ description }}" class="smart-action-sheet__description smart-hairline--bottom">
25
25
  {{ description }}
26
26
  </view>
27
- <view wx:if="{{ actions && actions.length }}" class="list-class">
27
+ <view wx:if="{{ actions && actions.length }}" class="smart-action-sheet__list list-class">
28
28
  <!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
29
29
  <button
30
30
  wx:for="{{ actions }}"
@@ -1 +1 @@
1
- @import '../common/index.wxss';.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__icon{font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}.smart-action-sheet__item{color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000))}.smart-action-sheet__item:not(:last-child){border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
1
+ @import '../common/index.wxss';.smart-action-sheet{border-radius:var(--popup-round-border-radius,var(--popup-round-border-radius,16px))!important;color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000));left:var(--action-sheet-left,16px)!important;margin:var(--action-sheet-margin,0 0 16px);max-height:var(--action-sheet-max-height,90%)!important;width:var(--action-sheet-width,calc(100% - 32px))!important}.smart-action-sheet__list{max-height:325px;overflow-y:scroll}.smart-action-sheet__icon{font-size:var(--action-sheet-item-icon-size,28px);margin:var(--action-sheet-item-icon-margin,16px 16px 0 0);position:absolute;right:0;top:0}.smart-action-sheet__item{color:var(--action-sheet-item-text-color,var(--app-B4-N1,#000))}.smart-action-sheet__item:not(:last-child){border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)))}.smart-action-sheet__cancel,.smart-action-sheet__confirm,.smart-action-sheet__item{background-color:var(--action-sheet-item-background,var(--app-B4,#fff));font-size:var(--action-sheet-item-font-size,16px);font-weight:var(--action-sheet-item-font-weight,normal);line-height:var(--action-sheet-item-line-height,24px);padding:16px;text-align:center;width:100%}.smart-action-sheet__cancel--hover,.smart-action-sheet__confirm--hover,.smart-action-sheet__item--hover{background-color:var(--action-sheet-active-color,var(--app-B1,#f6f7fb))}.smart-action-sheet__cancel:after,.smart-action-sheet__confirm:after,.smart-action-sheet__item:after{border-width:0}.smart-action-sheet__cancel{color:var(--action-sheet-cancel-text-color,var(--app-B4-N3,rgba(0,0,0,.5)))}.smart-action-sheet__confirm{color:var(--action-sheet-confirm-text-color,var(--app-B4-N1,#000));font-weight:var(--action-sheet-confirm-font-weight,500)}.smart-action-sheet__gap{background-color:var(--action-sheet-footer-padding-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:block;height:var(--action-sheet-footer-padding-top,8px)}.smart-action-sheet__item--disabled{opacity:var(--action-sheet-item-disabled-opacity,.3)}.smart-action-sheet__item--disabled.smart-action-sheet__item--hover{background-color:var(--action-sheet-item-background,var(--app-B4,#fff))}.smart-action-sheet__subname{color:var(--action-sheet-subname-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-subname-font-size,12px);line-height:var(--action-sheet-subname-line-height,20px);margin-top:var(--padding-xs,8px)}.smart-action-sheet__header{border-bottom:1px solid var(--action-sheet-header-border-color,var(--app-B4-N7,rgba(0,0,0,.1)));color:var(--action-sheet-header-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-header-font-size,16px);font-weight:var(--action-sheet-header-font-weight,normal);line-height:var(--action-sheet-header-height,56px);text-align:center}.smart-action-sheet__description{color:var(--action-sheet-description-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--action-sheet-description-font-size,14px);line-height:var(--action-sheet-description-line-height,20px);padding:20px var(--padding-md,16px);text-align:center}.smart-action-sheet__loading{color:inherit!important;display:flex!important}.smart-action-sheet__footer{align-items:center;background-color:var(--action-sheet-item-background,var(--app-B4,#fff));display:flex;font-size:var(--action-sheet-item-font-size,16px);justify-content:space-around;line-height:var(--action-sheet-item-line-height,22px);text-align:center}
@@ -40,6 +40,14 @@ var Xmark_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Xmark"));
40
40
  type: Boolean,
41
41
  value: true,
42
42
  },
43
+ ellipsis: {
44
+ type: Boolean,
45
+ value: true,
46
+ },
47
+ swipeThreshold: {
48
+ type: Number,
49
+ value: 5,
50
+ },
43
51
  showHeader: {
44
52
  type: Boolean,
45
53
  value: true,
@@ -19,6 +19,8 @@
19
19
  color="{{ activeColor }}"
20
20
  border="{{ false }}"
21
21
  swipeable="{{ swipeable }}"
22
+ ellipsis="{{ ellipsis }}"
23
+ swipe-threshold="{{ swipeThreshold }}"
22
24
  bind:click="onClickTab"
23
25
  >
24
26
  <smart-tab
@@ -1 +1 @@
1
- @import '../common/index.css';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}
1
+ @import '../common/index.css';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important;border-radius:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}
@@ -1 +1 @@
1
- @import '../common/index.wxss';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}
1
+ @import '../common/index.wxss';.smart-dialog{background-color:var(--dialog-background-color,var(--app-B4,#fff));border-radius:var(--dialog-border-radius,16px);font-size:var(--dialog-font-size,16px);overflow:hidden;top:45%!important;width:var(--dialog-width,311px)}@media (max-width:321px){.smart-dialog{width:var(--dialog-small-screen-width,90%)}}.smart-dialog__header{color:var(--dialog-header-font-color,var(--app-B4-N1,#000));font-weight:var(--dialog-header-font-weight,400);line-height:var(--dialog-header-line-height,24px);padding-top:var(--dialog-header-padding-top,24px);text-align:center}.smart-dialog__header-icon{border-radius:100%;display:block;font-size:var(--dialog-header-icon-size,39px);height:var(--dialog-header-icon-size,39px);margin:auto auto 12px;width:var(--dialog-header-icon-size,39px)}.smart-dialog__header--isolated{padding:var(--dialog-header-isolated-padding,24px 0)}.smart-dialog__message{-webkit-overflow-scrolling:touch;color:var(--dialog-message-text-color,var(--app-B4-N1,#000));font-size:var(--dialog-message-font-size,16px);line-height:var(--dialog-message-line-height,20px);max-height:var(--dialog-message-max-height,60vh);overflow-y:auto;padding:var(--dialog-message-padding,24px);text-align:center}.smart-dialog__message-text{word-wrap:break-word}.smart-dialog__message--hasTitle{color:var(--dialog-has-title-message-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--dialog-has-title-message-font-size,14px);padding-top:var(--dialog-has-title-message-padding-top,8px)}.smart-dialog__message--round-button{padding-bottom:16px}.smart-dialog__message--left{text-align:left}.smart-dialog__message--right{text-align:right}.smart-dialog__message--justify{text-align:justify}.smart-dialog__input{background-color:var(--dialog-input-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));border-radius:var(--dialog-input-border-radius,10px);font-size:var(--dialog-input-font-size,14px);height:var(--dialog-input-height,40px);margin:var(--dialog-input-margin,0 16px 24px);padding:var(--dialog-input-padding,0 10px)}.smart-dialog__footer{display:flex}.smart-dialog__footer--round-button{height:40px!important;padding:8px 20px 16px!important;position:relative!important}.smart-dialog__button{flex:1}.smart-dialog__cancel,.smart-dialog__confirm{border:0!important;border-radius:0!important}.smart-dialog-bounce-enter{opacity:0;transform:translate3d(-50%,-50%,0) scale(.7)}.smart-dialog-bounce-leave-active{opacity:0;transform:translate3d(-50%,-50%,0) scale(.9)}
@@ -91,6 +91,9 @@ var DEFAULT_DURATION = 200;
91
91
  else {
92
92
  this.setData({ animate: false });
93
93
  }
94
+ if (this.fireChange) {
95
+ this.$emit('change', currentIndex);
96
+ }
94
97
  },
95
98
  onClickItem: function (event) {
96
99
  var index = event.currentTarget.dataset.index;
@@ -163,6 +166,7 @@ var DEFAULT_DURATION = 200;
163
166
  var data = this.data;
164
167
  index = this.adjustIndex(index) || 0;
165
168
  var offset = -index * data.itemHeight;
169
+ this.fireChange = false;
166
170
  if (index !== data.currentIndex) {
167
171
  // 需要动画的情况下,保持最大的截取
168
172
  if (animate) {
@@ -173,7 +177,7 @@ var DEFAULT_DURATION = 200;
173
177
  animate: true,
174
178
  duration: DEFAULT_DURATION,
175
179
  }).then(function () {
176
- userAction && _this.$emit('change', index);
180
+ userAction && (_this.fireChange = true);
177
181
  });
178
182
  });
179
183
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-miniapp/smart-ui",
3
- "version": "1.0.0-beta-1",
3
+ "version": "1.0.0-beta-2",
4
4
  "author": "MiniApp Team",
5
5
  "license": "MIT",
6
6
  "miniprogram": "lib",