@tuya-miniapp/smart-ui 2.0.2-beta-14 → 2.1.0-beta-2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/action-sheet/demo/index.js +5 -0
- package/dist/action-sheet/index.wxml +2 -2
- package/dist/field/index.css +1 -1
- package/dist/field/index.wxss +1 -1
- package/dist/nav-bar/index.css +1 -1
- package/dist/nav-bar/index.js +5 -1
- package/dist/nav-bar/index.wxml +2 -2
- package/dist/nav-bar/index.wxss +1 -1
- package/lib/action-sheet/demo/index.js +5 -0
- package/lib/action-sheet/index.wxml +2 -2
- package/lib/field/index.css +1 -1
- package/lib/field/index.wxss +1 -1
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.js +5 -1
- package/lib/nav-bar/index.wxml +2 -2
- package/lib/nav-bar/index.wxss +1 -1
- package/package.json +1 -1
@@ -21,6 +21,11 @@ SmartComponent({
|
|
21
21
|
{ id: 0, name: 'Action', checked: true },
|
22
22
|
{ id: 1, name: 'Action', checked: false },
|
23
23
|
{ id: 2, name: 'Action', checked: false },
|
24
|
+
{ id: 3, name: 'Action', checked: false },
|
25
|
+
{ id: 4, name: 'Action', checked: false },
|
26
|
+
{ id: 5, name: 'Action', checked: false },
|
27
|
+
{ id: 6, name: 'Action', checked: false },
|
28
|
+
{ id: 7, name: 'Action', checked: false },
|
24
29
|
],
|
25
30
|
currentNumber: 0,
|
26
31
|
currentDate: new Date(2018, 0, 1),
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<view wx:if="{{ description }}" class="smart-action-sheet__description smart-hairline--bottom">
|
26
26
|
{{ description }}
|
27
27
|
</view>
|
28
|
-
<view wx:if="{{ actions && actions.length }}" class="smart-action-sheet__list list-class">
|
28
|
+
<scroll-view wx:if="{{ actions && actions.length }}" class="smart-action-sheet__list list-class">
|
29
29
|
<!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
|
30
30
|
<button
|
31
31
|
wx:for="{{ actions }}"
|
@@ -57,7 +57,7 @@
|
|
57
57
|
</block>
|
58
58
|
<smart-loading wx:else custom-class="smart-action-sheet__loading" size="22px" />
|
59
59
|
</button>
|
60
|
-
</view>
|
60
|
+
</scroll-view>
|
61
61
|
<slot />
|
62
62
|
<block wx:if="{{ cancelText || confirmText }}">
|
63
63
|
<view class="smart-action-sheet__gap" />
|
package/dist/field/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-field{--cell-icon-size:var(--field-icon-size,16px)}.smart-field__left__body{align-items:center;display:flex;padding-right:var(--field-left-body-padding-right,16px);text-align:left}.smart-field__left__body--
|
1
|
+
@import '../common/index.css';.smart-field{--cell-icon-size:var(--field-icon-size,16px)}.smart-field__left__body{align-items:center;display:flex;padding-right:var(--field-left-body-padding-right,16px);text-align:left}.smart-field__left__body--disabled{opacity:var(--field-disabled-opacity,.7)}.smart-field__label{color:var(--field-label-color,var(--app-B6-N1,#000));font-size:var(--field-label-font-size,16px);line-height:var(--field-label-line-height,18px);text-align:left}.smart-field__label--required{color:var(--field-input-error-text-color,var(--app-M2,#f04c4c))}.smart-field__label:empty{display:none}.smart-field__left__icon{display:flex;margin-right:var(--field-left-icon-margin-right,10px)}.smart-field__left__icon:empty{display:none}.smart-field__label__card__subtitle{color:var(--field-subtitle-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));font-size:var(--field-sub-label-font-size,14px);line-height:var(--field-sub-label-line-height,16px);margin-top:4px}.smart-field__label__card__subtitle--error{color:var(--field-error-message-color,var(--app-M2,#f04c4c))}.smart-field__body__box{flex:1}.smart-field__body__box--disabled{opacity:var(--field-disabled-opacity,.7)}.smart-field__body{align-items:center;display:flex;justify-content:flex-end}.smart-field__control:empty+.smart-field__control{display:block}.smart-field__control{background-color:initial;border:0;box-sizing:border-box;color:var(--field-input-text-color,var(--app-B6-N1,#000));display:none;height:var(--cell-line-height,24px);line-height:inherit;margin:0;min-height:var(--cell-line-height,24px);padding:0;position:relative;resize:none;text-align:right;width:100%}.smart-field__control:empty{display:none}.smart-field__control--textarea{background-color:var(--field-textarea-background,var(--app-B3,#fff));border-radius:var(--field-textarea-border-radius,8px);height:var(--field-textarea-min-height,130px);min-height:var(--field-textarea-min-height,130px);padding:var(--field-textarea-padding,12px 8px);text-align:left}.smart-field__control--card{background:var(--field-card-background,var(--app-B6-N7,rgba(0,0,0,.1)));border-radius:var(--field-card-border-radius,8px);height:var(--field-card-height,38px);padding:var(--field-card-padding,0 10px);text-align:center;width:var(--field-card-width,105px)}.smart-field__control--limit{padding-bottom:var(--field-textarea-limit-padding-bottom,20px)}.smart-field__control--center{text-align:center}.smart-field__control--right{text-align:right}.smart-field__control--left{text-align:left}.smart-field__control--custom,.smart-field__icon-root{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__clear-root,.smart-field__icon-container{line-height:inherit;margin-right:calc(var(--padding-xs, 8px)*-1);padding:0 var(--padding-xs,8px);vertical-align:middle}.smart-field__button,.smart-field__clear-root,.smart-field__icon-container{flex-shrink:0}.smart-field__clear-root{--icon-color:var(--field-clear-icon-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--field-clear-icon-size,16px)}.smart-field__icon-container{--icon-color:var(--field-icon-container-color,#969799);font-size:var(--field-icon-size,16px)}.smart-field__icon-container:empty{display:none}.smart-field__button{padding-left:var(--padding-xs,8px)}.smart-field__button:empty{display:none}.smart-field__error-message{color:var(--field-error-message-color,var(--app-M2,#f04c4c));display:block;font-size:var(--field-error-message-text-font-size,14px);font-weight:400;line-height:var(--field-error-message-text-line-height,18px);text-align:right;white-space:nowrap}.smart-field__error-message--center{text-align:center}.smart-field__error-message--right{text-align:right}.smart-field--textarea{padding:0 16px}.smart-field--textarea .smart-field__left__body{margin-bottom:8px;width:100%}.smart-field--textarea .smart-field__body__box{position:relative}.smart-field__word-limit{bottom:8px;color:var(--field-word-limit-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--field-word-limit-font-size,10px);line-height:var(--field-word-limit-line-height,14px);margin-top:var(--padding-base,4px);position:absolute;right:8px;text-align:right}.smart-field__word-num{display:inline}.smart-field__word-num--full{color:var(--field-word-num-full-color,var(--app-M2,#f04c4c))}
|
package/dist/field/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-field{--cell-icon-size:var(--field-icon-size,16px)}.smart-field__left__body{align-items:center;display:flex;padding-right:var(--field-left-body-padding-right,16px);text-align:left}.smart-field__left__body--
|
1
|
+
@import '../common/index.wxss';.smart-field{--cell-icon-size:var(--field-icon-size,16px)}.smart-field__left__body{align-items:center;display:flex;padding-right:var(--field-left-body-padding-right,16px);text-align:left}.smart-field__left__body--disabled{opacity:var(--field-disabled-opacity,.7)}.smart-field__label{color:var(--field-label-color,var(--app-B6-N1,#000));font-size:var(--field-label-font-size,16px);line-height:var(--field-label-line-height,18px);text-align:left}.smart-field__label--required{color:var(--field-input-error-text-color,var(--app-M2,#f04c4c))}.smart-field__label:empty{display:none}.smart-field__left__icon{display:flex;margin-right:var(--field-left-icon-margin-right,10px)}.smart-field__left__icon:empty{display:none}.smart-field__label__card__subtitle{color:var(--field-subtitle-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));font-size:var(--field-sub-label-font-size,14px);line-height:var(--field-sub-label-line-height,16px);margin-top:4px}.smart-field__label__card__subtitle--error{color:var(--field-error-message-color,var(--app-M2,#f04c4c))}.smart-field__body__box{flex:1}.smart-field__body__box--disabled{opacity:var(--field-disabled-opacity,.7)}.smart-field__body{align-items:center;display:flex;justify-content:flex-end}.smart-field__control:empty+.smart-field__control{display:block}.smart-field__control{background-color:initial;border:0;box-sizing:border-box;color:var(--field-input-text-color,var(--app-B6-N1,#000));display:none;height:var(--cell-line-height,24px);line-height:inherit;margin:0;min-height:var(--cell-line-height,24px);padding:0;position:relative;resize:none;text-align:right;width:100%}.smart-field__control:empty{display:none}.smart-field__control--textarea{background-color:var(--field-textarea-background,var(--app-B3,#fff));border-radius:var(--field-textarea-border-radius,8px);height:var(--field-textarea-min-height,130px);min-height:var(--field-textarea-min-height,130px);padding:var(--field-textarea-padding,12px 8px);text-align:left}.smart-field__control--card{background:var(--field-card-background,var(--app-B6-N7,rgba(0,0,0,.1)));border-radius:var(--field-card-border-radius,8px);height:var(--field-card-height,38px);padding:var(--field-card-padding,0 10px);text-align:center;width:var(--field-card-width,105px)}.smart-field__control--limit{padding-bottom:var(--field-textarea-limit-padding-bottom,20px)}.smart-field__control--center{text-align:center}.smart-field__control--right{text-align:right}.smart-field__control--left{text-align:left}.smart-field__control--custom,.smart-field__icon-root{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__clear-root,.smart-field__icon-container{line-height:inherit;margin-right:calc(var(--padding-xs, 8px)*-1);padding:0 var(--padding-xs,8px);vertical-align:middle}.smart-field__button,.smart-field__clear-root,.smart-field__icon-container{flex-shrink:0}.smart-field__clear-root{--icon-color:var(--field-clear-icon-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--field-clear-icon-size,16px)}.smart-field__icon-container{--icon-color:var(--field-icon-container-color,#969799);font-size:var(--field-icon-size,16px)}.smart-field__icon-container:empty{display:none}.smart-field__button{padding-left:var(--padding-xs,8px)}.smart-field__button:empty{display:none}.smart-field__error-message{color:var(--field-error-message-color,var(--app-M2,#f04c4c));display:block;font-size:var(--field-error-message-text-font-size,14px);font-weight:400;line-height:var(--field-error-message-text-line-height,18px);text-align:right;white-space:nowrap}.smart-field__error-message--center{text-align:center}.smart-field__error-message--right{text-align:right}.smart-field--textarea{padding:0 16px}.smart-field--textarea .smart-field__left__body{margin-bottom:8px;width:100%}.smart-field--textarea .smart-field__body__box{position:relative}.smart-field__word-limit{bottom:8px;color:var(--field-word-limit-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--field-word-limit-font-size,10px);line-height:var(--field-word-limit-line-height,14px);margin-top:var(--padding-base,4px);position:absolute;right:8px;text-align:right}.smart-field__word-num{display:inline}.smart-field__word-num--full{color:var(--field-word-num-full-color,var(--app-M2,#f04c4c))}
|
package/dist/nav-bar/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;
|
1
|
+
@import '../common/index.css';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar--round{border-radius:var(--nav-bar-round-border-radius,16px 16px 0 0);min-height:var(--nav-bar-round-min-height,56px)}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__right{right:var(--padding-md,16px)}
|
package/dist/nav-bar/index.js
CHANGED
@@ -2,7 +2,7 @@ import Left from '@tuya-miniapp/icons/dist/svg/Left';
|
|
2
2
|
import { SmartComponent } from '../common/component';
|
3
3
|
import { getRect, getSystemInfoSync } from '../common/utils';
|
4
4
|
SmartComponent({
|
5
|
-
classes: ['title-class', 'left-icon-class'],
|
5
|
+
classes: ['title-class', 'right-text-class', 'left-icon-class'],
|
6
6
|
props: {
|
7
7
|
title: String,
|
8
8
|
fixed: {
|
@@ -30,6 +30,10 @@ SmartComponent({
|
|
30
30
|
type: Boolean,
|
31
31
|
value: true,
|
32
32
|
},
|
33
|
+
round: {
|
34
|
+
type: Boolean,
|
35
|
+
value: false,
|
36
|
+
},
|
33
37
|
zIndex: {
|
34
38
|
type: Number,
|
35
39
|
value: 1,
|
package/dist/nav-bar/index.wxml
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<view wx:if="{{ fixed && placeholder }}" style="height: {{ height }}px;" />
|
5
5
|
|
6
6
|
<view
|
7
|
-
class="{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'smart-hairline--bottom' : '' }}"
|
7
|
+
class="{{ utils.bem('nav-bar', { fixed, round }) }} custom-class {{ border ? 'smart-hairline--bottom' : '' }}"
|
8
8
|
style="{{ computed.barStyle({ zIndex, statusBarHeight, safeAreaInsetTop }) }}; {{ customStyle }}"
|
9
9
|
>
|
10
10
|
<view class="smart-nav-bar__content">
|
@@ -43,7 +43,7 @@
|
|
43
43
|
<view class="smart-nav-bar__right" bind:tap="onClickRight">
|
44
44
|
<view
|
45
45
|
wx:if="{{ rightText }}"
|
46
|
-
class="smart-nav-bar__text"
|
46
|
+
class="smart-nav-bar__text right-text-class"
|
47
47
|
hover-class="smart-nav-bar__text--hover"
|
48
48
|
hover-stay-time="70"
|
49
49
|
>{{ rightText }}</view>
|
package/dist/nav-bar/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;
|
1
|
+
@import '../common/index.wxss';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar--round{border-radius:var(--nav-bar-round-border-radius,16px 16px 0 0);min-height:var(--nav-bar-round-min-height,56px)}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__right{right:var(--padding-md,16px)}
|
@@ -34,6 +34,11 @@ var component_1 = require("../../common/component");
|
|
34
34
|
{ id: 0, name: 'Action', checked: true },
|
35
35
|
{ id: 1, name: 'Action', checked: false },
|
36
36
|
{ id: 2, name: 'Action', checked: false },
|
37
|
+
{ id: 3, name: 'Action', checked: false },
|
38
|
+
{ id: 4, name: 'Action', checked: false },
|
39
|
+
{ id: 5, name: 'Action', checked: false },
|
40
|
+
{ id: 6, name: 'Action', checked: false },
|
41
|
+
{ id: 7, name: 'Action', checked: false },
|
37
42
|
],
|
38
43
|
currentNumber: 0,
|
39
44
|
currentDate: new Date(2018, 0, 1),
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<view wx:if="{{ description }}" class="smart-action-sheet__description smart-hairline--bottom">
|
26
26
|
{{ description }}
|
27
27
|
</view>
|
28
|
-
<view wx:if="{{ actions && actions.length }}" class="smart-action-sheet__list list-class">
|
28
|
+
<scroll-view wx:if="{{ actions && actions.length }}" class="smart-action-sheet__list list-class">
|
29
29
|
<!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
|
30
30
|
<button
|
31
31
|
wx:for="{{ actions }}"
|
@@ -57,7 +57,7 @@
|
|
57
57
|
</block>
|
58
58
|
<smart-loading wx:else custom-class="smart-action-sheet__loading" size="22px" />
|
59
59
|
</button>
|
60
|
-
</view>
|
60
|
+
</scroll-view>
|
61
61
|
<slot />
|
62
62
|
<block wx:if="{{ cancelText || confirmText }}">
|
63
63
|
<view class="smart-action-sheet__gap" />
|
package/lib/field/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-field{--cell-icon-size:var(--field-icon-size,16px)}.smart-field__left__body{align-items:center;display:flex;padding-right:var(--field-left-body-padding-right,16px);text-align:left}.smart-field__left__body--
|
1
|
+
@import '../common/index.css';.smart-field{--cell-icon-size:var(--field-icon-size,16px)}.smart-field__left__body{align-items:center;display:flex;padding-right:var(--field-left-body-padding-right,16px);text-align:left}.smart-field__left__body--disabled{opacity:var(--field-disabled-opacity,.7)}.smart-field__label{color:var(--field-label-color,var(--app-B6-N1,#000));font-size:var(--field-label-font-size,16px);line-height:var(--field-label-line-height,18px);text-align:left}.smart-field__label--required{color:var(--field-input-error-text-color,var(--app-M2,#f04c4c))}.smart-field__label:empty{display:none}.smart-field__left__icon{display:flex;margin-right:var(--field-left-icon-margin-right,10px)}.smart-field__left__icon:empty{display:none}.smart-field__label__card__subtitle{color:var(--field-subtitle-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));font-size:var(--field-sub-label-font-size,14px);line-height:var(--field-sub-label-line-height,16px);margin-top:4px}.smart-field__label__card__subtitle--error{color:var(--field-error-message-color,var(--app-M2,#f04c4c))}.smart-field__body__box{flex:1}.smart-field__body__box--disabled{opacity:var(--field-disabled-opacity,.7)}.smart-field__body{align-items:center;display:flex;justify-content:flex-end}.smart-field__control:empty+.smart-field__control{display:block}.smart-field__control{background-color:initial;border:0;box-sizing:border-box;color:var(--field-input-text-color,var(--app-B6-N1,#000));display:none;height:var(--cell-line-height,24px);line-height:inherit;margin:0;min-height:var(--cell-line-height,24px);padding:0;position:relative;resize:none;text-align:right;width:100%}.smart-field__control:empty{display:none}.smart-field__control--textarea{background-color:var(--field-textarea-background,var(--app-B3,#fff));border-radius:var(--field-textarea-border-radius,8px);height:var(--field-textarea-min-height,130px);min-height:var(--field-textarea-min-height,130px);padding:var(--field-textarea-padding,12px 8px);text-align:left}.smart-field__control--card{background:var(--field-card-background,var(--app-B6-N7,rgba(0,0,0,.1)));border-radius:var(--field-card-border-radius,8px);height:var(--field-card-height,38px);padding:var(--field-card-padding,0 10px);text-align:center;width:var(--field-card-width,105px)}.smart-field__control--limit{padding-bottom:var(--field-textarea-limit-padding-bottom,20px)}.smart-field__control--center{text-align:center}.smart-field__control--right{text-align:right}.smart-field__control--left{text-align:left}.smart-field__control--custom,.smart-field__icon-root{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__clear-root,.smart-field__icon-container{line-height:inherit;margin-right:calc(var(--padding-xs, 8px)*-1);padding:0 var(--padding-xs,8px);vertical-align:middle}.smart-field__button,.smart-field__clear-root,.smart-field__icon-container{flex-shrink:0}.smart-field__clear-root{--icon-color:var(--field-clear-icon-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--field-clear-icon-size,16px)}.smart-field__icon-container{--icon-color:var(--field-icon-container-color,#969799);font-size:var(--field-icon-size,16px)}.smart-field__icon-container:empty{display:none}.smart-field__button{padding-left:var(--padding-xs,8px)}.smart-field__button:empty{display:none}.smart-field__error-message{color:var(--field-error-message-color,var(--app-M2,#f04c4c));display:block;font-size:var(--field-error-message-text-font-size,14px);font-weight:400;line-height:var(--field-error-message-text-line-height,18px);text-align:right;white-space:nowrap}.smart-field__error-message--center{text-align:center}.smart-field__error-message--right{text-align:right}.smart-field--textarea{padding:0 16px}.smart-field--textarea .smart-field__left__body{margin-bottom:8px;width:100%}.smart-field--textarea .smart-field__body__box{position:relative}.smart-field__word-limit{bottom:8px;color:var(--field-word-limit-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--field-word-limit-font-size,10px);line-height:var(--field-word-limit-line-height,14px);margin-top:var(--padding-base,4px);position:absolute;right:8px;text-align:right}.smart-field__word-num{display:inline}.smart-field__word-num--full{color:var(--field-word-num-full-color,var(--app-M2,#f04c4c))}
|
package/lib/field/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-field{--cell-icon-size:var(--field-icon-size,16px)}.smart-field__left__body{align-items:center;display:flex;padding-right:var(--field-left-body-padding-right,16px);text-align:left}.smart-field__left__body--
|
1
|
+
@import '../common/index.wxss';.smart-field{--cell-icon-size:var(--field-icon-size,16px)}.smart-field__left__body{align-items:center;display:flex;padding-right:var(--field-left-body-padding-right,16px);text-align:left}.smart-field__left__body--disabled{opacity:var(--field-disabled-opacity,.7)}.smart-field__label{color:var(--field-label-color,var(--app-B6-N1,#000));font-size:var(--field-label-font-size,16px);line-height:var(--field-label-line-height,18px);text-align:left}.smart-field__label--required{color:var(--field-input-error-text-color,var(--app-M2,#f04c4c))}.smart-field__label:empty{display:none}.smart-field__left__icon{display:flex;margin-right:var(--field-left-icon-margin-right,10px)}.smart-field__left__icon:empty{display:none}.smart-field__label__card__subtitle{color:var(--field-subtitle-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));font-size:var(--field-sub-label-font-size,14px);line-height:var(--field-sub-label-line-height,16px);margin-top:4px}.smart-field__label__card__subtitle--error{color:var(--field-error-message-color,var(--app-M2,#f04c4c))}.smart-field__body__box{flex:1}.smart-field__body__box--disabled{opacity:var(--field-disabled-opacity,.7)}.smart-field__body{align-items:center;display:flex;justify-content:flex-end}.smart-field__control:empty+.smart-field__control{display:block}.smart-field__control{background-color:initial;border:0;box-sizing:border-box;color:var(--field-input-text-color,var(--app-B6-N1,#000));display:none;height:var(--cell-line-height,24px);line-height:inherit;margin:0;min-height:var(--cell-line-height,24px);padding:0;position:relative;resize:none;text-align:right;width:100%}.smart-field__control:empty{display:none}.smart-field__control--textarea{background-color:var(--field-textarea-background,var(--app-B3,#fff));border-radius:var(--field-textarea-border-radius,8px);height:var(--field-textarea-min-height,130px);min-height:var(--field-textarea-min-height,130px);padding:var(--field-textarea-padding,12px 8px);text-align:left}.smart-field__control--card{background:var(--field-card-background,var(--app-B6-N7,rgba(0,0,0,.1)));border-radius:var(--field-card-border-radius,8px);height:var(--field-card-height,38px);padding:var(--field-card-padding,0 10px);text-align:center;width:var(--field-card-width,105px)}.smart-field__control--limit{padding-bottom:var(--field-textarea-limit-padding-bottom,20px)}.smart-field__control--center{text-align:center}.smart-field__control--right{text-align:right}.smart-field__control--left{text-align:left}.smart-field__control--custom,.smart-field__icon-root{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__clear-root,.smart-field__icon-container{line-height:inherit;margin-right:calc(var(--padding-xs, 8px)*-1);padding:0 var(--padding-xs,8px);vertical-align:middle}.smart-field__button,.smart-field__clear-root,.smart-field__icon-container{flex-shrink:0}.smart-field__clear-root{--icon-color:var(--field-clear-icon-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--field-clear-icon-size,16px)}.smart-field__icon-container{--icon-color:var(--field-icon-container-color,#969799);font-size:var(--field-icon-size,16px)}.smart-field__icon-container:empty{display:none}.smart-field__button{padding-left:var(--padding-xs,8px)}.smart-field__button:empty{display:none}.smart-field__error-message{color:var(--field-error-message-color,var(--app-M2,#f04c4c));display:block;font-size:var(--field-error-message-text-font-size,14px);font-weight:400;line-height:var(--field-error-message-text-line-height,18px);text-align:right;white-space:nowrap}.smart-field__error-message--center{text-align:center}.smart-field__error-message--right{text-align:right}.smart-field--textarea{padding:0 16px}.smart-field--textarea .smart-field__left__body{margin-bottom:8px;width:100%}.smart-field--textarea .smart-field__body__box{position:relative}.smart-field__word-limit{bottom:8px;color:var(--field-word-limit-color,var(--app-B6-N4,rgba(0,0,0,.4)));font-size:var(--field-word-limit-font-size,10px);line-height:var(--field-word-limit-line-height,14px);margin-top:var(--padding-base,4px);position:absolute;right:8px;text-align:right}.smart-field__word-num{display:inline}.smart-field__word-num--full{color:var(--field-word-num-full-color,var(--app-M2,#f04c4c))}
|
package/lib/nav-bar/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;
|
1
|
+
@import '../common/index.css';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar--round{border-radius:var(--nav-bar-round-border-radius,16px 16px 0 0);min-height:var(--nav-bar-round-min-height,56px)}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__right{right:var(--padding-md,16px)}
|
package/lib/nav-bar/index.js
CHANGED
@@ -7,7 +7,7 @@ var Left_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Left"));
|
|
7
7
|
var component_1 = require("../common/component");
|
8
8
|
var utils_1 = require("../common/utils");
|
9
9
|
(0, component_1.SmartComponent)({
|
10
|
-
classes: ['title-class', 'left-icon-class'],
|
10
|
+
classes: ['title-class', 'right-text-class', 'left-icon-class'],
|
11
11
|
props: {
|
12
12
|
title: String,
|
13
13
|
fixed: {
|
@@ -35,6 +35,10 @@ var utils_1 = require("../common/utils");
|
|
35
35
|
type: Boolean,
|
36
36
|
value: true,
|
37
37
|
},
|
38
|
+
round: {
|
39
|
+
type: Boolean,
|
40
|
+
value: false,
|
41
|
+
},
|
38
42
|
zIndex: {
|
39
43
|
type: Number,
|
40
44
|
value: 1,
|
package/lib/nav-bar/index.wxml
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<view wx:if="{{ fixed && placeholder }}" style="height: {{ height }}px;" />
|
5
5
|
|
6
6
|
<view
|
7
|
-
class="{{ utils.bem('nav-bar', { fixed }) }} custom-class {{ border ? 'smart-hairline--bottom' : '' }}"
|
7
|
+
class="{{ utils.bem('nav-bar', { fixed, round }) }} custom-class {{ border ? 'smart-hairline--bottom' : '' }}"
|
8
8
|
style="{{ computed.barStyle({ zIndex, statusBarHeight, safeAreaInsetTop }) }}; {{ customStyle }}"
|
9
9
|
>
|
10
10
|
<view class="smart-nav-bar__content">
|
@@ -43,7 +43,7 @@
|
|
43
43
|
<view class="smart-nav-bar__right" bind:tap="onClickRight">
|
44
44
|
<view
|
45
45
|
wx:if="{{ rightText }}"
|
46
|
-
class="smart-nav-bar__text"
|
46
|
+
class="smart-nav-bar__text right-text-class"
|
47
47
|
hover-class="smart-nav-bar__text--hover"
|
48
48
|
hover-stay-time="70"
|
49
49
|
>{{ rightText }}</view>
|
package/lib/nav-bar/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;
|
1
|
+
@import '../common/index.wxss';.smart-nav-bar{background-color:var(--nav-bar-background-color,var(--app-B2,#fff));box-sizing:initial;height:var(--nav-bar-height,46px);line-height:var(--nav-bar-height,46px);position:relative;text-align:center;-webkit-user-select:none;user-select:none}.smart-nav-bar__content{align-items:center;display:flex;height:100%;position:relative}.smart-nav-bar__text{color:var(--nav-bar-text-color,var(--app-B2-N1,#000));display:inline-block;font-size:var(--nav-bar-text-font-size,16px);margin:0 calc(var(--padding-md, 16px)*-1);padding:0 var(--padding-md,16px);vertical-align:middle}.smart-nav-bar__text--hover{opacity:.3}.smart-nav-bar__text--home{color:var(--nav-bar-home-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-home-font-size,22px);font-weight:var(--nav-bar-home-font-weight,600)}.smart-nav-bar__text--title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600)}.smart-nav-bar__arrow{vertical-align:middle}.smart-nav-bar__arrow>view{background:var(--nav-bar-arrow-color,var(--app-B2-N1,#000))}.smart-nav-bar__icon-wrap{align-items:center;display:flex;height:var(--nav-bar-icon-size,32px);justify-content:center;margin:var(--nav-bar-icon-margin,0);width:var(--nav-bar-icon-size,32px)}.smart-nav-bar__icon>view{background:var(--nav-bar-icon-color,var(--app-B2-N1,#000))}.smart-nav-bar--fixed{left:0;position:fixed;top:0;width:100%}.smart-nav-bar--round{border-radius:var(--nav-bar-round-border-radius,16px 16px 0 0);min-height:var(--nav-bar-round-min-height,56px)}.smart-nav-bar__title{color:var(--nav-bar-title-text-color,var(--app-B2-N1,#000));font-size:var(--nav-bar-title-font-size,16px);font-weight:var(--nav-bar-title-font-weight,600);margin:0 auto;max-width:60%}.smart-nav-bar__left,.smart-nav-bar__right{align-items:center;bottom:0;display:flex;position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__right{right:var(--padding-md,16px)}
|