@tuya-miniapp/smart-ui 2.1.0-beta-2 → 2.1.0-beta-4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cascader/index.css +1 -1
- package/dist/cascader/index.wxml +1 -1
- package/dist/cascader/index.wxss +1 -1
- package/dist/field/cell-input.wxml +3 -4
- package/dist/field/cell-textarea.wxml +3 -3
- package/dist/field/index.css +1 -1
- package/dist/field/index.wxss +1 -1
- package/dist/field/input.wxml +2 -2
- package/dist/field/textarea.wxml +2 -2
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.wxml +1 -1
- package/lib/cascader/index.wxss +1 -1
- package/lib/field/cell-input.wxml +3 -4
- package/lib/field/cell-textarea.wxml +3 -3
- package/lib/field/index.css +1 -1
- package/lib/field/index.wxss +1 -1
- package/lib/field/input.wxml +2 -2
- package/lib/field/textarea.wxml +2 -2
- package/package.json +1 -1
package/dist/cascader/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.smart-cascader__title{font-size:16px;font-weight:600;line-height:20px}.smart-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.smart-cascader__tabs-wrap{height:48px!important;padding:0 8px}.smart-cascader__tab{color
|
1
|
+
@import '../common/index.css';.smart-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.smart-cascader__title{font-size:16px;font-weight:600;line-height:20px}.smart-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.smart-cascader__tabs-wrap{height:48px!important;padding:0 8px}.smart-cascader__tab{--tabs-card-text-color:var(--cascader-tab-color,var(--app-B6-N1,#000));flex:none!important;font-weight:600!important;padding:0 8px!important}.smart-cascader__tab--unselected{color:#969799!important;font-weight:400!important}.smart-cascader__option{align-items:center;cursor:pointer;display:flex;font-size:14px;justify-content:space-between;line-height:20px;padding:10px 16px}.smart-cascader__option:active{background-color:#f2f3f5}.smart-cascader__option--selected{color:#1989fa;font-weight:600}.smart-cascader__option--disabled{color:#c8c9cc;cursor:not-allowed}.smart-cascader__option--disabled:active{background-color:initial}.smart-cascader__options{-webkit-overflow-scrolling:touch;box-sizing:border-box;height:384px;overflow-y:auto;padding-top:6px}
|
package/dist/cascader/index.wxml
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
wx:key="tabIndex"
|
31
31
|
title="{{ tab.selected ? tab.selected.text : placeholder }}"
|
32
32
|
style="width: 100%;"
|
33
|
-
title-style="{{ !tab.selected ? 'color:
|
33
|
+
title-style="{{ !tab.selected ? 'color: var(--cascader-tab-inactive-color, var(--app-B6-N5, rgba(0, 0, 0, 0.3)));font-weight:normal;' : '' }}"
|
34
34
|
>
|
35
35
|
<!-- 暂不支持 -->
|
36
36
|
<!-- <slot name="options-top"></slot> -->
|
package/dist/cascader/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.smart-cascader__title{font-size:16px;font-weight:600;line-height:20px}.smart-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.smart-cascader__tabs-wrap{height:48px!important;padding:0 8px}.smart-cascader__tab{color
|
1
|
+
@import '../common/index.wxss';.smart-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.smart-cascader__title{font-size:16px;font-weight:600;line-height:20px}.smart-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.smart-cascader__tabs-wrap{height:48px!important;padding:0 8px}.smart-cascader__tab{--tabs-card-text-color:var(--cascader-tab-color,var(--app-B6-N1,#000));flex:none!important;font-weight:600!important;padding:0 8px!important}.smart-cascader__tab--unselected{color:#969799!important;font-weight:400!important}.smart-cascader__option{align-items:center;cursor:pointer;display:flex;font-size:14px;justify-content:space-between;line-height:20px;padding:10px 16px}.smart-cascader__option:active{background-color:#f2f3f5}.smart-cascader__option--selected{color:#1989fa;font-weight:600}.smart-cascader__option--disabled{color:#c8c9cc;cursor:not-allowed}.smart-cascader__option--disabled:active{background-color:initial}.smart-cascader__options{-webkit-overflow-scrolling:touch;box-sizing:border-box;height:384px;overflow-y:auto;padding-top:6px}
|
@@ -9,21 +9,20 @@
|
|
9
9
|
is-link="{{ isLink }}"
|
10
10
|
clickable="{{ clickable }}"
|
11
11
|
title-width="{{ titleWidth }}"
|
12
|
-
title-style="margin-right: 12px;"
|
13
12
|
custom-style="{{ customStyle }}"
|
14
13
|
arrow-direction="{{ arrowDirection }}"
|
15
14
|
custom-class="custom-class smart-field"
|
16
15
|
>
|
17
16
|
<view wx:if="{{ !hiddenLabel }}" class="{{ utils.bem('field__left__body', { disabled, card: cardMode }) }}">
|
18
17
|
<view class="smart-field__left__icon">
|
19
|
-
<slot name="left-icon"
|
18
|
+
<slot name="left-icon" />
|
20
19
|
</view>
|
21
20
|
<view class="smart-field__label" >
|
22
21
|
<text wx:if="{{ required }}" class="smart-field__label--required">*</text>
|
23
|
-
<label for="{{ name }}" class="label-class" wx:if="{{ label }}"
|
22
|
+
<label for="{{ name }}" class="label-class" wx:if="{{ label }}">
|
24
23
|
{{ label }}
|
25
24
|
</label>
|
26
|
-
<slot wx:else name="label"
|
25
|
+
<slot wx:else name="label" />
|
27
26
|
<view wx:if="{{ subLabel && cardMode }}" class="{{ utils.bem('field__label__card__subtitle', { error: errorMessage }) }}">{{ errorMessage || subLabel }}</view>
|
28
27
|
</view>
|
29
28
|
</view>
|
@@ -3,14 +3,14 @@
|
|
3
3
|
<view class="smart-field smart-field--textarea">
|
4
4
|
<view wx:if="{{ !hiddenLabel }}" class="{{ utils.bem('field__left__body', { disabled, card: cardMode }) }}">
|
5
5
|
<view class="smart-field__left__icon">
|
6
|
-
<slot name="left-icon"
|
6
|
+
<slot name="left-icon"/>
|
7
7
|
</view>
|
8
8
|
<view class="smart-field__label" >
|
9
9
|
<text wx:if="{{ required }}" class="smart-field__label--required">*</text>
|
10
|
-
<label for="{{ name }}" class="label-class" wx:if="{{ label }}"
|
10
|
+
<label for="{{ name }}" class="label-class" wx:if="{{ label }}">
|
11
11
|
{{ label }}
|
12
12
|
</label>
|
13
|
-
<slot wx:else name="label"
|
13
|
+
<slot wx:else name="label" />
|
14
14
|
<view wx:if="{{ subLabel && cardMode }}" class="{{ utils.bem('field__label__card__subtitle', { error: errorMessage }) }}">{{ errorMessage || subLabel }}</view>
|
15
15
|
</view>
|
16
16
|
</view>
|
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--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
|
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;font-size:var(--field-input-text-font-size,16px);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{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__control--readonly{position:relative}.smart-field__control--readonly:after{content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:10}.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--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
|
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;font-size:var(--field-input-text-font-size,16px);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{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__control--readonly{position:relative}.smart-field__control--readonly:after{content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:10}.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/input.wxml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
2
|
<input
|
3
3
|
id="{{ name }}"
|
4
|
-
class="{{ utils.bem('field__control', [inputAlign, type, { card: cardMode }]) }} input-class"
|
4
|
+
class="{{ utils.bem('field__control', [inputAlign, type, { card: cardMode, readonly }]) }} input-class"
|
5
5
|
type="{{ type }}"
|
6
6
|
focus="{{ focus }}"
|
7
7
|
cursor="{{ cursor }}"
|
8
8
|
value="{{ innerValue }}"
|
9
9
|
auto-focus="{{ autoFocus }}"
|
10
|
-
disabled="{{ disabled
|
10
|
+
disabled="{{ disabled }}"
|
11
11
|
maxlength="{{ maxlength }}"
|
12
12
|
placeholder="{{ !interError ? placeholder : errorMessage || placeholder }}"
|
13
13
|
placeholder-style="{{ interError ? 'color: var(--field-input-error-text-color, var(--app-M2, #f04c4c));' : 'color: var(--field-placeholder-text-color, var(--app-B6-N4, rgba(0, 0, 0, 0.4));'}}{{ placeholderStyle }}"
|
package/dist/field/textarea.wxml
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
|
4
4
|
<textarea
|
5
5
|
id="{{ name }}"
|
6
|
-
class="{{ utils.bem('field__control', [inputAlign, type, { textarea: true, limit: showWordLimit && maxlength }]) }} input-class"
|
6
|
+
class="{{ utils.bem('field__control', [inputAlign, type, { textarea: true, limit: showWordLimit && maxlength, readonly }]) }} input-class"
|
7
7
|
fixed="{{ fixed }}"
|
8
8
|
focus="{{ focus }}"
|
9
9
|
cursor="{{ cursor }}"
|
10
10
|
value="{{ innerValue }}"
|
11
11
|
auto-focus="{{ autoFocus }}"
|
12
|
-
disabled="{{ disabled
|
12
|
+
disabled="{{ disabled }}"
|
13
13
|
maxlength="{{ maxlength }}"
|
14
14
|
placeholder="{{ !interError ? placeholder : errorMessage || placeholder }}"
|
15
15
|
placeholder-style="{{ interError ? 'color: var(--field-input-error-text-color, var(--app-M2, #f04c4c));' : 'color: var(--field-placeholder-text-color, var(--app-B6-N4, rgba(0, 0, 0, 0.4));'}}{{ placeholderStyle }}"
|
package/lib/cascader/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.smart-cascader__title{font-size:16px;font-weight:600;line-height:20px}.smart-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.smart-cascader__tabs-wrap{height:48px!important;padding:0 8px}.smart-cascader__tab{color
|
1
|
+
@import '../common/index.css';.smart-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.smart-cascader__title{font-size:16px;font-weight:600;line-height:20px}.smart-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.smart-cascader__tabs-wrap{height:48px!important;padding:0 8px}.smart-cascader__tab{--tabs-card-text-color:var(--cascader-tab-color,var(--app-B6-N1,#000));flex:none!important;font-weight:600!important;padding:0 8px!important}.smart-cascader__tab--unselected{color:#969799!important;font-weight:400!important}.smart-cascader__option{align-items:center;cursor:pointer;display:flex;font-size:14px;justify-content:space-between;line-height:20px;padding:10px 16px}.smart-cascader__option:active{background-color:#f2f3f5}.smart-cascader__option--selected{color:#1989fa;font-weight:600}.smart-cascader__option--disabled{color:#c8c9cc;cursor:not-allowed}.smart-cascader__option--disabled:active{background-color:initial}.smart-cascader__options{-webkit-overflow-scrolling:touch;box-sizing:border-box;height:384px;overflow-y:auto;padding-top:6px}
|
package/lib/cascader/index.wxml
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
wx:key="tabIndex"
|
31
31
|
title="{{ tab.selected ? tab.selected.text : placeholder }}"
|
32
32
|
style="width: 100%;"
|
33
|
-
title-style="{{ !tab.selected ? 'color:
|
33
|
+
title-style="{{ !tab.selected ? 'color: var(--cascader-tab-inactive-color, var(--app-B6-N5, rgba(0, 0, 0, 0.3)));font-weight:normal;' : '' }}"
|
34
34
|
>
|
35
35
|
<!-- 暂不支持 -->
|
36
36
|
<!-- <slot name="options-top"></slot> -->
|
package/lib/cascader/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.smart-cascader__title{font-size:16px;font-weight:600;line-height:20px}.smart-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.smart-cascader__tabs-wrap{height:48px!important;padding:0 8px}.smart-cascader__tab{color
|
1
|
+
@import '../common/index.wxss';.smart-cascader__header{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 16px}.smart-cascader__title{font-size:16px;font-weight:600;line-height:20px}.smart-cascader__close-icon{color:#c8c9cc;font-size:22px;height:22px}.smart-cascader__tabs-wrap{height:48px!important;padding:0 8px}.smart-cascader__tab{--tabs-card-text-color:var(--cascader-tab-color,var(--app-B6-N1,#000));flex:none!important;font-weight:600!important;padding:0 8px!important}.smart-cascader__tab--unselected{color:#969799!important;font-weight:400!important}.smart-cascader__option{align-items:center;cursor:pointer;display:flex;font-size:14px;justify-content:space-between;line-height:20px;padding:10px 16px}.smart-cascader__option:active{background-color:#f2f3f5}.smart-cascader__option--selected{color:#1989fa;font-weight:600}.smart-cascader__option--disabled{color:#c8c9cc;cursor:not-allowed}.smart-cascader__option--disabled:active{background-color:initial}.smart-cascader__options{-webkit-overflow-scrolling:touch;box-sizing:border-box;height:384px;overflow-y:auto;padding-top:6px}
|
@@ -9,21 +9,20 @@
|
|
9
9
|
is-link="{{ isLink }}"
|
10
10
|
clickable="{{ clickable }}"
|
11
11
|
title-width="{{ titleWidth }}"
|
12
|
-
title-style="margin-right: 12px;"
|
13
12
|
custom-style="{{ customStyle }}"
|
14
13
|
arrow-direction="{{ arrowDirection }}"
|
15
14
|
custom-class="custom-class smart-field"
|
16
15
|
>
|
17
16
|
<view wx:if="{{ !hiddenLabel }}" class="{{ utils.bem('field__left__body', { disabled, card: cardMode }) }}">
|
18
17
|
<view class="smart-field__left__icon">
|
19
|
-
<slot name="left-icon"
|
18
|
+
<slot name="left-icon" />
|
20
19
|
</view>
|
21
20
|
<view class="smart-field__label" >
|
22
21
|
<text wx:if="{{ required }}" class="smart-field__label--required">*</text>
|
23
|
-
<label for="{{ name }}" class="label-class" wx:if="{{ label }}"
|
22
|
+
<label for="{{ name }}" class="label-class" wx:if="{{ label }}">
|
24
23
|
{{ label }}
|
25
24
|
</label>
|
26
|
-
<slot wx:else name="label"
|
25
|
+
<slot wx:else name="label" />
|
27
26
|
<view wx:if="{{ subLabel && cardMode }}" class="{{ utils.bem('field__label__card__subtitle', { error: errorMessage }) }}">{{ errorMessage || subLabel }}</view>
|
28
27
|
</view>
|
29
28
|
</view>
|
@@ -3,14 +3,14 @@
|
|
3
3
|
<view class="smart-field smart-field--textarea">
|
4
4
|
<view wx:if="{{ !hiddenLabel }}" class="{{ utils.bem('field__left__body', { disabled, card: cardMode }) }}">
|
5
5
|
<view class="smart-field__left__icon">
|
6
|
-
<slot name="left-icon"
|
6
|
+
<slot name="left-icon"/>
|
7
7
|
</view>
|
8
8
|
<view class="smart-field__label" >
|
9
9
|
<text wx:if="{{ required }}" class="smart-field__label--required">*</text>
|
10
|
-
<label for="{{ name }}" class="label-class" wx:if="{{ label }}"
|
10
|
+
<label for="{{ name }}" class="label-class" wx:if="{{ label }}">
|
11
11
|
{{ label }}
|
12
12
|
</label>
|
13
|
-
<slot wx:else name="label"
|
13
|
+
<slot wx:else name="label" />
|
14
14
|
<view wx:if="{{ subLabel && cardMode }}" class="{{ utils.bem('field__label__card__subtitle', { error: errorMessage }) }}">{{ errorMessage || subLabel }}</view>
|
15
15
|
</view>
|
16
16
|
</view>
|
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--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
|
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;font-size:var(--field-input-text-font-size,16px);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{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__control--readonly{position:relative}.smart-field__control--readonly:after{content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:10}.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--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
|
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;font-size:var(--field-input-text-font-size,16px);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{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__control--readonly{position:relative}.smart-field__control--readonly:after{content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:10}.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/input.wxml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
<wxs src="../wxs/utils.wxs" module="utils" />
|
2
2
|
<input
|
3
3
|
id="{{ name }}"
|
4
|
-
class="{{ utils.bem('field__control', [inputAlign, type, { card: cardMode }]) }} input-class"
|
4
|
+
class="{{ utils.bem('field__control', [inputAlign, type, { card: cardMode, readonly }]) }} input-class"
|
5
5
|
type="{{ type }}"
|
6
6
|
focus="{{ focus }}"
|
7
7
|
cursor="{{ cursor }}"
|
8
8
|
value="{{ innerValue }}"
|
9
9
|
auto-focus="{{ autoFocus }}"
|
10
|
-
disabled="{{ disabled
|
10
|
+
disabled="{{ disabled }}"
|
11
11
|
maxlength="{{ maxlength }}"
|
12
12
|
placeholder="{{ !interError ? placeholder : errorMessage || placeholder }}"
|
13
13
|
placeholder-style="{{ interError ? 'color: var(--field-input-error-text-color, var(--app-M2, #f04c4c));' : 'color: var(--field-placeholder-text-color, var(--app-B6-N4, rgba(0, 0, 0, 0.4));'}}{{ placeholderStyle }}"
|
package/lib/field/textarea.wxml
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
|
4
4
|
<textarea
|
5
5
|
id="{{ name }}"
|
6
|
-
class="{{ utils.bem('field__control', [inputAlign, type, { textarea: true, limit: showWordLimit && maxlength }]) }} input-class"
|
6
|
+
class="{{ utils.bem('field__control', [inputAlign, type, { textarea: true, limit: showWordLimit && maxlength, readonly }]) }} input-class"
|
7
7
|
fixed="{{ fixed }}"
|
8
8
|
focus="{{ focus }}"
|
9
9
|
cursor="{{ cursor }}"
|
10
10
|
value="{{ innerValue }}"
|
11
11
|
auto-focus="{{ autoFocus }}"
|
12
|
-
disabled="{{ disabled
|
12
|
+
disabled="{{ disabled }}"
|
13
13
|
maxlength="{{ maxlength }}"
|
14
14
|
placeholder="{{ !interError ? placeholder : errorMessage || placeholder }}"
|
15
15
|
placeholder-style="{{ interError ? 'color: var(--field-input-error-text-color, var(--app-M2, #f04c4c));' : 'color: var(--field-placeholder-text-color, var(--app-B6-N4, rgba(0, 0, 0, 0.4));'}}{{ placeholderStyle }}"
|