@tuya-miniapp/smart-ui 2.3.4-beta-4 → 2.3.4-beta-6
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/common/appLog.js +1 -1
- package/dist/dialog/index.css +1 -1
- package/dist/dialog/index.wxss +1 -1
- package/dist/picker/index.wxml +1 -0
- package/dist/picker-column/index.js +12 -0
- package/dist/tab/index.js +10 -2
- package/dist/tabs/index.css +1 -1
- package/dist/tabs/index.js +13 -4
- package/dist/tabs/index.wxml +4 -1
- package/dist/tabs/index.wxss +1 -1
- package/dist/toast/index.css +1 -1
- package/dist/toast/index.wxml +2 -2
- package/dist/toast/index.wxss +1 -1
- package/lib/common/appLog.js +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.wxss +1 -1
- package/lib/picker/index.wxml +1 -0
- package/lib/picker-column/index.js +12 -0
- package/lib/tab/index.js +10 -2
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.js +13 -4
- package/lib/tabs/index.wxml +4 -1
- package/lib/tabs/index.wxss +1 -1
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.wxml +2 -2
- package/lib/toast/index.wxss +1 -1
- package/package.json +2 -1
package/dist/common/appLog.js
CHANGED
package/dist/dialog/index.css
CHANGED
@@ -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;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)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--smart-dialog--round-button-border-radius,20px)!important}
|
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:var(--dialog-header-padding,0);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)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--smart-dialog--round-button-border-radius,20px)!important}
|
package/dist/dialog/index.wxss
CHANGED
@@ -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;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)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--smart-dialog--round-button-border-radius,20px)!important}
|
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:var(--dialog-header-padding,0);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)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--smart-dialog--round-button-border-radius,20px)!important}
|
package/dist/picker/index.wxml
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
style="order: {{ item.order }}; {{ computed.style(item.style) }}"
|
23
23
|
active-style="{{ activeStyle }}"
|
24
24
|
options="{{ item.values }}"
|
25
|
+
disabled="{{ item.disabled }}"
|
25
26
|
unit="{{ item.unit || unit }}"
|
26
27
|
changeAnimation="{{ changeAnimation }}"
|
27
28
|
default-index="{{ item.defaultIndex || defaultIndex }}"
|
@@ -17,6 +17,7 @@ SmartComponent({
|
|
17
17
|
valueKey: String,
|
18
18
|
className: String,
|
19
19
|
itemHeight: Number,
|
20
|
+
disabled: Boolean,
|
20
21
|
visibleItemCount: Number,
|
21
22
|
activeStyle: {
|
22
23
|
type: String,
|
@@ -83,6 +84,9 @@ SmartComponent({
|
|
83
84
|
return this.data.options.length;
|
84
85
|
},
|
85
86
|
onTouchStart(event) {
|
87
|
+
if (this.data.disabled) {
|
88
|
+
return;
|
89
|
+
}
|
86
90
|
if (this.data.timer) {
|
87
91
|
clearTimeout(this.data.timer);
|
88
92
|
this.setData({
|
@@ -102,6 +106,9 @@ SmartComponent({
|
|
102
106
|
});
|
103
107
|
},
|
104
108
|
onTouchMove(event) {
|
109
|
+
if (this.data.disabled) {
|
110
|
+
return;
|
111
|
+
}
|
105
112
|
const { data } = this;
|
106
113
|
const { preOffsetList } = data;
|
107
114
|
const deltaY = event.touches[0].clientY - data.startY;
|
@@ -131,6 +138,9 @@ SmartComponent({
|
|
131
138
|
onTouchEnd() {
|
132
139
|
return __awaiter(this, void 0, void 0, function* () {
|
133
140
|
const { data } = this;
|
141
|
+
if (data.disabled) {
|
142
|
+
return;
|
143
|
+
}
|
134
144
|
const { preOffsetList } = data;
|
135
145
|
let preOffset = Math.max(Math.abs(preOffsetList[preOffsetList.length - 3] - preOffsetList[preOffsetList.length - 4]), Math.abs(preOffsetList[preOffsetList.length - 2] - preOffsetList[preOffsetList.length - 3]), Math.abs(preOffsetList[preOffsetList.length - 1] - preOffsetList[preOffsetList.length - 2]));
|
136
146
|
if (isNaN(preOffset))
|
@@ -223,6 +233,8 @@ SmartComponent({
|
|
223
233
|
}, time / count - 20);
|
224
234
|
},
|
225
235
|
onClickItem(event) {
|
236
|
+
if (this.data.disabled)
|
237
|
+
return;
|
226
238
|
const { index } = event.currentTarget.dataset;
|
227
239
|
if (index === this.data.currentIndex || index < 0 || index > this.data.options.length - 1) {
|
228
240
|
return;
|
package/dist/tab/index.js
CHANGED
@@ -15,14 +15,22 @@ SmartComponent({
|
|
15
15
|
type: String,
|
16
16
|
observer: 'update',
|
17
17
|
},
|
18
|
-
|
19
|
-
type:
|
18
|
+
subtitle: {
|
19
|
+
type: String,
|
20
20
|
observer: 'update',
|
21
21
|
},
|
22
22
|
titleStyle: {
|
23
23
|
type: String,
|
24
24
|
observer: 'update',
|
25
25
|
},
|
26
|
+
subtitleStyle: {
|
27
|
+
type: String,
|
28
|
+
observer: 'update',
|
29
|
+
},
|
30
|
+
disabled: {
|
31
|
+
type: Boolean,
|
32
|
+
observer: 'update',
|
33
|
+
},
|
26
34
|
name: {
|
27
35
|
type: null,
|
28
36
|
value: '',
|
package/dist/tabs/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
1
|
+
@import '../common/index.css';.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--line_subtitle{height:var(--tabs-sub-line-height,64px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
package/dist/tabs/index.js
CHANGED
@@ -92,6 +92,7 @@ SmartComponent({
|
|
92
92
|
scrollWithAnimation: false,
|
93
93
|
lineOffsetLeft: 0,
|
94
94
|
inited: false,
|
95
|
+
hasSubTitle: false,
|
95
96
|
},
|
96
97
|
mounted() {
|
97
98
|
requestAnimationFrame(() => {
|
@@ -127,12 +128,14 @@ SmartComponent({
|
|
127
128
|
this.trigger('disabled', child);
|
128
129
|
return;
|
129
130
|
}
|
130
|
-
this.onBeforeChange(index)
|
131
|
+
this.onBeforeChange(index)
|
132
|
+
.then(() => {
|
131
133
|
this.setCurrentIndex(index);
|
132
134
|
nextTick(() => {
|
133
135
|
this.trigger('click');
|
134
136
|
});
|
135
|
-
})
|
137
|
+
})
|
138
|
+
.catch(err => { });
|
136
139
|
},
|
137
140
|
// correct the index of active tab
|
138
141
|
setCurrentIndexByName(name) {
|
@@ -147,6 +150,7 @@ SmartComponent({
|
|
147
150
|
if (!isDef(currentIndex) || currentIndex >= children.length || currentIndex < 0) {
|
148
151
|
return;
|
149
152
|
}
|
153
|
+
let hasSubTitle = false;
|
150
154
|
groupSetData(this, () => {
|
151
155
|
const task = [];
|
152
156
|
children.forEach((item, index) => {
|
@@ -156,6 +160,9 @@ SmartComponent({
|
|
156
160
|
? task.push(() => item.updateRender(active, this))
|
157
161
|
: task.unshift(() => item.updateRender(active, this));
|
158
162
|
}
|
163
|
+
if (item.data.subtitle) {
|
164
|
+
hasSubTitle = true;
|
165
|
+
}
|
159
166
|
});
|
160
167
|
task.forEach(fun => fun());
|
161
168
|
});
|
@@ -166,7 +173,7 @@ SmartComponent({
|
|
166
173
|
return;
|
167
174
|
}
|
168
175
|
const shouldEmitChange = data.currentIndex !== null;
|
169
|
-
this.setData({ currentIndex });
|
176
|
+
this.setData({ currentIndex, hasSubTitle });
|
170
177
|
requestAnimationFrame(() => {
|
171
178
|
this.resize();
|
172
179
|
this.scrollIntoView();
|
@@ -255,7 +262,9 @@ SmartComponent({
|
|
255
262
|
if (direction === 'horizontal' && offsetX >= minSwipeDistance) {
|
256
263
|
const index = this.getAvaiableTab(deltaX);
|
257
264
|
if (index !== -1) {
|
258
|
-
this.onBeforeChange(index)
|
265
|
+
this.onBeforeChange(index)
|
266
|
+
.then(() => this.setCurrentIndex(index))
|
267
|
+
.catch(err => { });
|
259
268
|
}
|
260
269
|
}
|
261
270
|
this.swiping = false;
|
package/dist/tabs/index.wxml
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
container="{{ container }}"
|
10
10
|
bind:scroll="onTouchScroll"
|
11
11
|
>
|
12
|
-
<view class="{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'smart-hairline--top-bottom' : '' }} wrap-class">
|
12
|
+
<view class="{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'smart-hairline--top-bottom' : '' }} {{ hasSubTitle ? 'smart-tabs--line_subtitle' : '' }} wrap-class">
|
13
13
|
<slot name="nav-left" />
|
14
14
|
|
15
15
|
<scroll-view
|
@@ -39,6 +39,9 @@
|
|
39
39
|
custom-class="smart-tab__title__info"
|
40
40
|
/>
|
41
41
|
</view>
|
42
|
+
<view wx:if="{{!!item.subtitle}}" class="{{ ellipsis ? 'smart-ellipsis' : '' }}" style="{{ item.subtitleStyle }}">
|
43
|
+
{{ item.subtitle }}
|
44
|
+
</view>
|
42
45
|
</view>
|
43
46
|
</view>
|
44
47
|
</scroll-view>
|
package/dist/tabs/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
1
|
+
@import '../common/index.wxss';.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--line_subtitle{height:var(--tabs-sub-line-height,64px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
package/dist/toast/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh)}.smart-toast--bottom{transform:translateY(30vh)}
|
1
|
+
@import '../common/index.css';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh) translate(-50%,-50%)}.smart-toast--bottom{transform:translateY(30vh) translate(-50%,-50%)}
|
package/dist/toast/index.wxml
CHANGED
@@ -7,10 +7,10 @@
|
|
7
7
|
<smart-transition
|
8
8
|
show="{{ show }}"
|
9
9
|
custom-style="z-index: {{ zIndex }}"
|
10
|
-
custom-class="smart-toast__container"
|
10
|
+
custom-class="smart-toast__container smart-toast--{{ position }}"
|
11
11
|
>
|
12
12
|
<view
|
13
|
-
class="smart-toast smart-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }}
|
13
|
+
class="smart-toast smart-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }}"
|
14
14
|
catch:touchmove="noop"
|
15
15
|
style="{{ width ? ('width: ' + width + 'px') : '' }}"
|
16
16
|
>
|
package/dist/toast/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh)}.smart-toast--bottom{transform:translateY(30vh)}
|
1
|
+
@import '../common/index.wxss';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh) translate(-50%,-50%)}.smart-toast--bottom{transform:translateY(30vh) translate(-50%,-50%)}
|
package/lib/common/appLog.js
CHANGED
package/lib/dialog/index.css
CHANGED
@@ -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;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)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--smart-dialog--round-button-border-radius,20px)!important}
|
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:var(--dialog-header-padding,0);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)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--smart-dialog--round-button-border-radius,20px)!important}
|
package/lib/dialog/index.wxss
CHANGED
@@ -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;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)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--smart-dialog--round-button-border-radius,20px)!important}
|
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:var(--dialog-header-padding,0);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)}.smart-dialog--round-button .smart-dialog__cancel,.smart-dialog--round-button .smart-dialog__confirm{border-radius:var(--smart-dialog--round-button-border-radius,20px)!important}
|
package/lib/picker/index.wxml
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
style="order: {{ item.order }}; {{ computed.style(item.style) }}"
|
23
23
|
active-style="{{ activeStyle }}"
|
24
24
|
options="{{ item.values }}"
|
25
|
+
disabled="{{ item.disabled }}"
|
25
26
|
unit="{{ item.unit || unit }}"
|
26
27
|
changeAnimation="{{ changeAnimation }}"
|
27
28
|
default-index="{{ item.defaultIndex || defaultIndex }}"
|
@@ -55,6 +55,7 @@ var DEFAULT_DURATION = 400;
|
|
55
55
|
valueKey: String,
|
56
56
|
className: String,
|
57
57
|
itemHeight: Number,
|
58
|
+
disabled: Boolean,
|
58
59
|
visibleItemCount: Number,
|
59
60
|
activeStyle: {
|
60
61
|
type: String,
|
@@ -121,6 +122,9 @@ var DEFAULT_DURATION = 400;
|
|
121
122
|
return this.data.options.length;
|
122
123
|
},
|
123
124
|
onTouchStart: function (event) {
|
125
|
+
if (this.data.disabled) {
|
126
|
+
return;
|
127
|
+
}
|
124
128
|
if (this.data.timer) {
|
125
129
|
clearTimeout(this.data.timer);
|
126
130
|
this.setData({
|
@@ -140,6 +144,9 @@ var DEFAULT_DURATION = 400;
|
|
140
144
|
});
|
141
145
|
},
|
142
146
|
onTouchMove: function (event) {
|
147
|
+
if (this.data.disabled) {
|
148
|
+
return;
|
149
|
+
}
|
143
150
|
var data = this.data;
|
144
151
|
var preOffsetList = data.preOffsetList;
|
145
152
|
var deltaY = event.touches[0].clientY - data.startY;
|
@@ -174,6 +181,9 @@ var DEFAULT_DURATION = 400;
|
|
174
181
|
switch (_a.label) {
|
175
182
|
case 0:
|
176
183
|
data = this.data;
|
184
|
+
if (data.disabled) {
|
185
|
+
return [2 /*return*/];
|
186
|
+
}
|
177
187
|
preOffsetList = data.preOffsetList;
|
178
188
|
preOffset = Math.max(Math.abs(preOffsetList[preOffsetList.length - 3] - preOffsetList[preOffsetList.length - 4]), Math.abs(preOffsetList[preOffsetList.length - 2] - preOffsetList[preOffsetList.length - 3]), Math.abs(preOffsetList[preOffsetList.length - 1] - preOffsetList[preOffsetList.length - 2]));
|
179
189
|
if (isNaN(preOffset))
|
@@ -262,6 +272,8 @@ var DEFAULT_DURATION = 400;
|
|
262
272
|
}, time / count - 20);
|
263
273
|
},
|
264
274
|
onClickItem: function (event) {
|
275
|
+
if (this.data.disabled)
|
276
|
+
return;
|
265
277
|
var index = event.currentTarget.dataset.index;
|
266
278
|
if (index === this.data.currentIndex || index < 0 || index > this.data.options.length - 1) {
|
267
279
|
return;
|
package/lib/tab/index.js
CHANGED
@@ -17,14 +17,22 @@ var component_1 = require("../common/component");
|
|
17
17
|
type: String,
|
18
18
|
observer: 'update',
|
19
19
|
},
|
20
|
-
|
21
|
-
type:
|
20
|
+
subtitle: {
|
21
|
+
type: String,
|
22
22
|
observer: 'update',
|
23
23
|
},
|
24
24
|
titleStyle: {
|
25
25
|
type: String,
|
26
26
|
observer: 'update',
|
27
27
|
},
|
28
|
+
subtitleStyle: {
|
29
|
+
type: String,
|
30
|
+
observer: 'update',
|
31
|
+
},
|
32
|
+
disabled: {
|
33
|
+
type: Boolean,
|
34
|
+
observer: 'update',
|
35
|
+
},
|
28
36
|
name: {
|
29
37
|
type: null,
|
30
38
|
value: '',
|
package/lib/tabs/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
1
|
+
@import '../common/index.css';.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--line_subtitle{height:var(--tabs-sub-line-height,64px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
package/lib/tabs/index.js
CHANGED
@@ -108,6 +108,7 @@ var relation_1 = require("../common/relation");
|
|
108
108
|
scrollWithAnimation: false,
|
109
109
|
lineOffsetLeft: 0,
|
110
110
|
inited: false,
|
111
|
+
hasSubTitle: false,
|
111
112
|
},
|
112
113
|
mounted: function () {
|
113
114
|
var _this = this;
|
@@ -145,12 +146,14 @@ var relation_1 = require("../common/relation");
|
|
145
146
|
this.trigger('disabled', child);
|
146
147
|
return;
|
147
148
|
}
|
148
|
-
this.onBeforeChange(index)
|
149
|
+
this.onBeforeChange(index)
|
150
|
+
.then(function () {
|
149
151
|
_this.setCurrentIndex(index);
|
150
152
|
(0, utils_1.nextTick)(function () {
|
151
153
|
_this.trigger('click');
|
152
154
|
});
|
153
|
-
})
|
155
|
+
})
|
156
|
+
.catch(function (err) { });
|
154
157
|
},
|
155
158
|
// correct the index of active tab
|
156
159
|
setCurrentIndexByName: function (name) {
|
@@ -166,6 +169,7 @@ var relation_1 = require("../common/relation");
|
|
166
169
|
if (!(0, validator_1.isDef)(currentIndex) || currentIndex >= children.length || currentIndex < 0) {
|
167
170
|
return;
|
168
171
|
}
|
172
|
+
var hasSubTitle = false;
|
169
173
|
(0, utils_1.groupSetData)(this, function () {
|
170
174
|
var task = [];
|
171
175
|
children.forEach(function (item, index) {
|
@@ -175,6 +179,9 @@ var relation_1 = require("../common/relation");
|
|
175
179
|
? task.push(function () { return item.updateRender(active, _this); })
|
176
180
|
: task.unshift(function () { return item.updateRender(active, _this); });
|
177
181
|
}
|
182
|
+
if (item.data.subtitle) {
|
183
|
+
hasSubTitle = true;
|
184
|
+
}
|
178
185
|
});
|
179
186
|
task.forEach(function (fun) { return fun(); });
|
180
187
|
});
|
@@ -185,7 +192,7 @@ var relation_1 = require("../common/relation");
|
|
185
192
|
return;
|
186
193
|
}
|
187
194
|
var shouldEmitChange = data.currentIndex !== null;
|
188
|
-
this.setData({ currentIndex: currentIndex });
|
195
|
+
this.setData({ currentIndex: currentIndex, hasSubTitle: hasSubTitle });
|
189
196
|
(0, utils_1.requestAnimationFrame)(function () {
|
190
197
|
_this.resize();
|
191
198
|
_this.scrollIntoView();
|
@@ -279,7 +286,9 @@ var relation_1 = require("../common/relation");
|
|
279
286
|
if (direction === 'horizontal' && offsetX >= minSwipeDistance) {
|
280
287
|
var index_1 = this.getAvaiableTab(deltaX);
|
281
288
|
if (index_1 !== -1) {
|
282
|
-
this.onBeforeChange(index_1)
|
289
|
+
this.onBeforeChange(index_1)
|
290
|
+
.then(function () { return _this.setCurrentIndex(index_1); })
|
291
|
+
.catch(function (err) { });
|
283
292
|
}
|
284
293
|
}
|
285
294
|
this.swiping = false;
|
package/lib/tabs/index.wxml
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
container="{{ container }}"
|
10
10
|
bind:scroll="onTouchScroll"
|
11
11
|
>
|
12
|
-
<view class="{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'smart-hairline--top-bottom' : '' }} wrap-class">
|
12
|
+
<view class="{{ utils.bem('tabs--') + type }} {{ utils.bem('tabs__wrap', { scrollable }) }} {{ type === 'line' && border ? 'smart-hairline--top-bottom' : '' }} {{ hasSubTitle ? 'smart-tabs--line_subtitle' : '' }} wrap-class">
|
13
13
|
<slot name="nav-left" />
|
14
14
|
|
15
15
|
<scroll-view
|
@@ -39,6 +39,9 @@
|
|
39
39
|
custom-class="smart-tab__title__info"
|
40
40
|
/>
|
41
41
|
</view>
|
42
|
+
<view wx:if="{{!!item.subtitle}}" class="{{ ellipsis ? 'smart-ellipsis' : '' }}" style="{{ item.subtitleStyle }}">
|
43
|
+
{{ item.subtitle }}
|
44
|
+
</view>
|
42
45
|
</view>
|
43
46
|
</view>
|
44
47
|
</scroll-view>
|
package/lib/tabs/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
1
|
+
@import '../common/index.wxss';.smart-tabs{-webkit-tap-highlight-color:transparent;position:relative}.smart-tabs__wrap{display:flex;overflow:hidden}.smart-tabs__wrap--scrollable .smart-tab{flex:0 0 22%}.smart-tabs__wrap--scrollable .smart-tab--complete{flex:1 0 auto!important;padding:0 12px}.smart-tabs__wrap--scrollable .smart-tabs__nav--complete{padding-left:8px;padding-right:8px}.smart-tabs__scroll{background-color:var(--tabs-background-color,var(--app-B3,#fff));overflow:auto}.smart-tabs__scroll--line{box-sizing:initial;height:calc(100% + 15px)}.smart-tabs__scroll--card{background-color:var(--tabs-card-background-color,var(--app-B6-N9,rgba(0,0,0,.05)));border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;padding:var(--tabs-card-padding,2px);width:100%}.smart-tabs__scroll::-webkit-scrollbar{display:none}.smart-tabs__nav{display:flex;position:relative;-webkit-user-select:none;user-select:none}.smart-tabs__nav--card{border-radius:var(--tabs-card-border-radius,8px);box-sizing:border-box;height:100%}.smart-tabs__nav--card .smart-tab{align-items:center;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;justify-content:center}.smart-tabs__nav--card .smart-tab:last-child{border-right:none}.smart-tabs__nav--card .smart-tab.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000))}.smart-tabs__nav--card .smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tabs__line{background-color:var(--tabs-bottom-bar-color,var(--app-M4,#1989fa));border-radius:var(--tabs-bottom-bar-height,3px);bottom:0;height:var(--tabs-bottom-bar-height,3px);left:0;opacity:0;position:absolute;z-index:1}.smart-tabs__card-box{background-color:initial;height:100%;pointer-events:none;position:relative;width:100%}.smart-tabs__card{background-color:var(--tabs-card-active-background-color,var(--app-B3,#fff));border-radius:var(--tabs-card-active-border-radius,6px);height:100%;left:var(--tabs-card-active-left,0);opacity:0;position:absolute;top:var(--tabs-card-active-top,0);z-index:0}.smart-tabs__track{height:100%;position:relative;width:100%;z-index:1}.smart-tabs__track--animated{display:flex;transition-property:left}.smart-tabs__content{overflow:hidden}.smart-tabs--line{height:var(--tabs-line-height,32px)}.smart-tabs--line_subtitle{height:var(--tabs-sub-line-height,64px)}.smart-tabs--card{height:var(--tabs-card-height,32px)}.smart-tab{box-sizing:border-box;color:var(--tabs-card-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));cursor:pointer;flex:1;font-size:var(--tab-font-size,13px);line-height:var(--tabs-line-height,32px);min-width:0;position:relative;text-align:center}.smart-tab--active{color:var(--tabs-card-text-active-color,var(--app-B6-N1,#000));font-weight:var(--font-weight-bold,500)}.smart-tab--disabled{color:var(--tab-disabled-text-color,var(--app-B6-N7,rgba(0,0,0,.1)))}.smart-tab__title__info{position:relative!important;top:-1px!important;transform:translateX(0)!important}
|
package/lib/toast/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh)}.smart-toast--bottom{transform:translateY(30vh)}
|
1
|
+
@import '../common/index.css';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh) translate(-50%,-50%)}.smart-toast--bottom{transform:translateY(30vh) translate(-50%,-50%)}
|
package/lib/toast/index.wxml
CHANGED
@@ -7,10 +7,10 @@
|
|
7
7
|
<smart-transition
|
8
8
|
show="{{ show }}"
|
9
9
|
custom-style="z-index: {{ zIndex }}"
|
10
|
-
custom-class="smart-toast__container"
|
10
|
+
custom-class="smart-toast__container smart-toast--{{ position }}"
|
11
11
|
>
|
12
12
|
<view
|
13
|
-
class="smart-toast smart-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }}
|
13
|
+
class="smart-toast smart-toast--{{ (type === 'text' || type === 'html') ? 'text' : 'icon' }}"
|
14
14
|
catch:touchmove="noop"
|
15
15
|
style="{{ width ? ('width: ' + width + 'px') : '' }}"
|
16
16
|
>
|
package/lib/toast/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh)}.smart-toast--bottom{transform:translateY(30vh)}
|
1
|
+
@import '../common/index.wxss';.smart-toast{word-wrap:break-word;align-items:center;background-color:var(--toast-background-color,rgba(0,0,0,.7));border-radius:var(--toast-border-radius,10px);box-sizing:initial;color:var(--toast-text-color,#fff);display:flex;flex-direction:column;font-size:var(--toast-font-size,14px);justify-content:center;line-height:var(--toast-line-height,20px);white-space:pre-wrap}.smart-toast__container{left:50%;max-width:var(--toast-max-width,70%);position:fixed;top:50%;transform:translate(-50%,-50%);width:-webkit-fit-content;width:fit-content}.smart-toast--text{min-width:var(--toast-text-min-width,96px);padding:var(--toast-text-padding,8px 12px)}.smart-toast--icon{min-height:var(--toast-default-min-height,88px);padding:var(--toast-default-padding,16px);width:var(--toast-default-width,88px)}.smart-toast--icon .smart-toast__icon{font-size:var(--toast-icon-size,36px)}.smart-toast--icon .smart-toast__text{padding-top:8px}.smart-toast__loading{margin:10px 0}.smart-toast--top{transform:translateY(-30vh) translate(-50%,-50%)}.smart-toast--bottom{transform:translateY(30vh) translate(-50%,-50%)}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tuya-miniapp/smart-ui",
|
3
|
-
"version": "2.3.4-beta-
|
3
|
+
"version": "2.3.4-beta-6",
|
4
4
|
"author": "MiniApp Team",
|
5
5
|
"license": "MIT",
|
6
6
|
"miniprogram": "lib",
|
@@ -14,6 +14,7 @@
|
|
14
14
|
"release": "sh build/release.sh",
|
15
15
|
"build:icon": "yarn && node build/generate-icon/index.js",
|
16
16
|
"build": "yarn && MODE=build NODE_OPTIONS=--no-experimental-fetch npx gulp -f build/compiler.js --series buildEs buildLib buildExample",
|
17
|
+
"build:wx": "node build/wx.mjs",
|
17
18
|
"test": "jest",
|
18
19
|
"test:watch": "jest --watch",
|
19
20
|
"preMinipackBuild": "yarn && MODE=build NODE_OPTIONS=--no-experimental-fetch npx gulp -f build/compiler.js --series buildEs buildLib buildExample",
|