@tuya-miniapp/smart-ui 1.3.0-beta-2 → 1.3.1-beta-1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/action-sheet/index.js +3 -7
- package/dist/battery/index.js +3 -5
- package/dist/bottom-sheet/index.css +1 -0
- package/dist/bottom-sheet/index.d.ts +1 -0
- package/dist/bottom-sheet/index.js +70 -0
- package/dist/bottom-sheet/index.json +8 -0
- package/dist/bottom-sheet/index.wxml +26 -0
- package/dist/bottom-sheet/index.wxss +1 -0
- package/dist/button/index.js +1 -0
- package/dist/button/index.wxml +1 -1
- package/dist/calendar/calendar.wxml +53 -53
- package/dist/calendar/components/header/index.css +1 -1
- package/dist/calendar/components/header/index.js +18 -0
- package/dist/calendar/components/header/index.json +4 -1
- package/dist/calendar/components/header/index.wxml +15 -4
- package/dist/calendar/components/header/index.wxss +1 -1
- package/dist/calendar/components/month/index.css +1 -1
- package/dist/calendar/components/month/index.d.ts +0 -1
- package/dist/calendar/components/month/index.js +4 -7
- package/dist/calendar/components/month/index.wxml +0 -13
- package/dist/calendar/components/month/index.wxs +13 -7
- package/dist/calendar/components/month/index.wxss +1 -1
- package/dist/calendar/components/month-list/index.css +1 -0
- package/dist/calendar/components/month-list/index.d.ts +1 -0
- package/dist/calendar/components/month-list/index.js +112 -0
- package/dist/calendar/components/month-list/index.json +7 -0
- package/dist/calendar/components/month-list/index.wxml +9 -0
- package/dist/calendar/components/month-list/index.wxss +1 -0
- package/dist/calendar/components/year-list/index.css +1 -0
- package/dist/calendar/components/year-list/index.d.ts +1 -0
- package/dist/calendar/components/year-list/index.js +100 -0
- package/dist/calendar/components/year-list/index.json +7 -0
- package/dist/calendar/components/year-list/index.wxml +9 -0
- package/dist/calendar/components/year-list/index.wxss +1 -0
- package/dist/calendar/index.css +1 -1
- package/dist/calendar/index.js +100 -51
- package/dist/calendar/index.json +3 -1
- package/dist/calendar/index.wxml +1 -1
- package/dist/calendar/index.wxs +21 -3
- package/dist/calendar/index.wxss +1 -1
- package/dist/calendar/utils.d.ts +7 -2
- package/dist/calendar/utils.js +44 -8
- package/dist/checkbox/index.css +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox/index.wxml +2 -2
- package/dist/checkbox/index.wxss +1 -1
- package/dist/config-provider/index.wxs +2 -7
- package/dist/dropdown-item/index.css +1 -1
- package/dist/dropdown-item/index.js +10 -0
- package/dist/dropdown-item/index.wxml +9 -4
- package/dist/dropdown-item/index.wxss +1 -1
- package/dist/dropdown-menu/index.css +1 -1
- package/dist/dropdown-menu/index.js +15 -0
- package/dist/dropdown-menu/index.json +4 -1
- package/dist/dropdown-menu/index.wxml +2 -1
- package/dist/dropdown-menu/index.wxss +1 -1
- package/dist/empty/index.css +1 -1
- package/dist/empty/index.js +20 -1
- package/dist/empty/index.wxml +7 -7
- package/dist/empty/index.wxs +3 -16
- package/dist/empty/index.wxss +1 -1
- package/dist/field/index.css +1 -1
- package/dist/field/index.wxss +1 -1
- package/dist/loading/index.css +1 -1
- package/dist/loading/index.js +4 -4
- package/dist/loading/index.wxml +4 -6
- package/dist/loading/index.wxs +39 -8
- package/dist/loading/index.wxss +1 -1
- package/dist/nav-bar/index.css +1 -1
- package/dist/nav-bar/index.js +19 -1
- package/dist/nav-bar/index.wxml +16 -6
- package/dist/nav-bar/index.wxss +1 -1
- package/dist/normal-slider/index.css +1 -1
- package/dist/normal-slider/index.wxss +1 -1
- package/dist/notice-bar/index.css +1 -1
- package/dist/notice-bar/index.js +55 -2
- package/dist/notice-bar/index.wxml +28 -10
- package/dist/notice-bar/index.wxs +1 -5
- package/dist/notice-bar/index.wxss +1 -1
- package/dist/picker-column/index.js +8 -1
- package/dist/radio/index.css +1 -1
- package/dist/radio/index.js +1 -1
- package/dist/radio/index.wxml +2 -1
- package/dist/radio/index.wxss +1 -1
- package/dist/search/index.css +1 -1
- package/dist/search/index.js +14 -9
- package/dist/search/index.json +2 -1
- package/dist/search/index.wxml +7 -4
- package/dist/search/index.wxss +1 -1
- package/dist/switch/index.css +1 -1
- package/dist/switch/index.wxml +1 -0
- package/dist/switch/index.wxss +1 -1
- package/dist/tabs/index.css +1 -1
- package/dist/tabs/index.js +10 -7
- package/dist/tabs/index.wxml +1 -0
- package/dist/tabs/index.wxs +17 -0
- package/dist/tabs/index.wxss +1 -1
- package/dist/tag/index.css +1 -1
- package/dist/tag/index.wxss +1 -1
- package/dist/toast/icons.d.ts +3 -0
- package/dist/toast/icons.js +6 -0
- package/dist/toast/index.js +8 -4
- package/dist/toast/index.wxml +3 -7
- package/dist/toast/toast.d.ts +2 -0
- package/dist/toast/toast.js +2 -0
- package/dist/wxs/style.wxs +11 -5
- package/dist/wxs/utils.wxs +1 -3
- package/lib/action-sheet/index.js +3 -7
- package/lib/battery/index.js +3 -5
- package/lib/bottom-sheet/index.css +1 -0
- package/lib/bottom-sheet/index.d.ts +1 -0
- package/lib/bottom-sheet/index.js +75 -0
- package/lib/bottom-sheet/index.json +8 -0
- package/lib/bottom-sheet/index.wxml +26 -0
- package/lib/bottom-sheet/index.wxss +1 -0
- package/lib/button/index.js +1 -0
- package/lib/button/index.wxml +1 -1
- package/lib/calendar/calendar.wxml +53 -53
- package/lib/calendar/components/header/index.css +1 -1
- package/lib/calendar/components/header/index.js +21 -0
- package/lib/calendar/components/header/index.json +4 -1
- package/lib/calendar/components/header/index.wxml +15 -4
- package/lib/calendar/components/header/index.wxss +1 -1
- package/lib/calendar/components/month/index.css +1 -1
- package/lib/calendar/components/month/index.d.ts +0 -1
- package/lib/calendar/components/month/index.js +3 -6
- package/lib/calendar/components/month/index.wxml +0 -13
- package/lib/calendar/components/month/index.wxs +13 -7
- package/lib/calendar/components/month/index.wxss +1 -1
- package/lib/calendar/components/month-list/index.css +1 -0
- package/lib/calendar/components/month-list/index.d.ts +1 -0
- package/lib/calendar/components/month-list/index.js +114 -0
- package/lib/calendar/components/month-list/index.json +7 -0
- package/lib/calendar/components/month-list/index.wxml +9 -0
- package/lib/calendar/components/month-list/index.wxss +1 -0
- package/lib/calendar/components/year-list/index.css +1 -0
- package/lib/calendar/components/year-list/index.d.ts +1 -0
- package/lib/calendar/components/year-list/index.js +102 -0
- package/lib/calendar/components/year-list/index.json +7 -0
- package/lib/calendar/components/year-list/index.wxml +9 -0
- package/lib/calendar/components/year-list/index.wxss +1 -0
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.js +99 -52
- package/lib/calendar/index.json +3 -1
- package/lib/calendar/index.wxml +1 -1
- package/lib/calendar/index.wxs +21 -3
- package/lib/calendar/index.wxss +1 -1
- package/lib/calendar/utils.d.ts +7 -2
- package/lib/calendar/utils.js +48 -10
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/index.wxml +2 -2
- package/lib/checkbox/index.wxss +1 -1
- package/lib/config-provider/index.wxs +2 -7
- package/lib/dropdown-item/index.css +1 -1
- package/lib/dropdown-item/index.js +13 -0
- package/lib/dropdown-item/index.wxml +9 -4
- package/lib/dropdown-item/index.wxss +1 -1
- package/lib/dropdown-menu/index.css +1 -1
- package/lib/dropdown-menu/index.js +18 -0
- package/lib/dropdown-menu/index.json +4 -1
- package/lib/dropdown-menu/index.wxml +2 -1
- package/lib/dropdown-menu/index.wxss +1 -1
- package/lib/empty/index.css +1 -1
- package/lib/empty/index.js +20 -1
- package/lib/empty/index.wxml +7 -7
- package/lib/empty/index.wxs +3 -16
- package/lib/empty/index.wxss +1 -1
- package/lib/field/index.css +1 -1
- package/lib/field/index.wxss +1 -1
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.js +4 -4
- package/lib/loading/index.wxml +4 -6
- package/lib/loading/index.wxs +39 -8
- package/lib/loading/index.wxss +1 -1
- package/lib/nav-bar/index.css +1 -1
- package/lib/nav-bar/index.js +19 -1
- package/lib/nav-bar/index.wxml +16 -6
- package/lib/nav-bar/index.wxss +1 -1
- package/lib/normal-slider/index.css +1 -1
- package/lib/normal-slider/index.wxss +1 -1
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.js +58 -2
- package/lib/notice-bar/index.wxml +28 -10
- package/lib/notice-bar/index.wxs +1 -5
- package/lib/notice-bar/index.wxss +1 -1
- package/lib/picker-column/index.js +8 -1
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.js +1 -1
- package/lib/radio/index.wxml +2 -1
- package/lib/radio/index.wxss +1 -1
- package/lib/search/index.css +1 -1
- package/lib/search/index.js +17 -9
- package/lib/search/index.json +2 -1
- package/lib/search/index.wxml +7 -4
- package/lib/search/index.wxss +1 -1
- package/lib/switch/index.css +1 -1
- package/lib/switch/index.wxml +1 -0
- package/lib/switch/index.wxss +1 -1
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.js +10 -7
- package/lib/tabs/index.wxml +1 -0
- package/lib/tabs/index.wxs +17 -0
- package/lib/tabs/index.wxss +1 -1
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.wxss +1 -1
- package/lib/toast/icons.d.ts +3 -0
- package/lib/toast/icons.js +12 -0
- package/lib/toast/index.js +8 -7
- package/lib/toast/index.wxml +3 -7
- package/lib/toast/toast.d.ts +2 -0
- package/lib/toast/toast.js +2 -0
- package/lib/wxs/style.wxs +11 -5
- package/lib/wxs/utils.wxs +1 -3
- package/package.json +4 -8
- package/dist/common/theme/dark.d.ts +0 -344
- package/dist/common/theme/dark.js +0 -343
- package/dist/common/theme/light.d.ts +0 -344
- package/dist/common/theme/light.js +0 -343
- package/dist/wxs/is-app-theme-var.wxs +0 -8
- package/lib/common/theme/dark.d.ts +0 -344
- package/lib/common/theme/dark.js +0 -345
- package/lib/common/theme/light.d.ts +0 -344
- package/lib/common/theme/light.js +0 -345
- package/lib/wxs/is-app-theme-var.wxs +0 -8
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__label{color:var(--field-label-color,#646566)}.smart-field__label--disabled{color:var(--field-disabled-text-color,#c8c9cc)}.smart-field__body{align-items:center;display:flex}.smart-field__body--textarea{box-sizing:border-box;line-height:1.2em;min-height:var(--cell-line-height,24px);padding:3.6px 0}.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,#323233);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:left;width:100%}.smart-field__control:empty{display:none}.smart-field__control--textarea{height:var(--field-text-area-min-height,18px);min-height:var(--field-text-area-min-height,18px)}.smart-field__control--error{color:var(--field-input-error-text-color,#ee0a24)}.smart-field__control--disabled{background-color:initial;color:var(--field-input-disabled-text-color,#c8c9cc);opacity:1}.smart-field__control--center{text-align:center}.smart-field__control--right{text-align:right}.smart-field__control--custom{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__placeholder{color:var(--field-placeholder-text-color,#c8c9cc);left:0;pointer-events:none;position:absolute;right:0;top:0}.smart-field__placeholder--error{color:var(--field-error-message-color,#ee0a24)}.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{color:var(--field-clear-icon-color
|
1
|
+
@import '../common/index.wxss';.smart-field{--cell-icon-size:var(--field-icon-size,16px)}.smart-field__label{color:var(--field-label-color,#646566)}.smart-field__label--disabled{color:var(--field-disabled-text-color,#c8c9cc)}.smart-field__body{align-items:center;display:flex}.smart-field__body--textarea{box-sizing:border-box;line-height:1.2em;min-height:var(--cell-line-height,24px);padding:3.6px 0}.smart-field__body--search{flex:1}.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,#323233);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:left;width:100%}.smart-field__control:empty{display:none}.smart-field__control--textarea{height:var(--field-text-area-min-height,18px);min-height:var(--field-text-area-min-height,18px)}.smart-field__control--error{color:var(--field-input-error-text-color,#ee0a24)}.smart-field__control--disabled{background-color:initial;color:var(--field-input-disabled-text-color,#c8c9cc);opacity:1}.smart-field__control--center{text-align:center}.smart-field__control--right{text-align:right}.smart-field__control--custom{align-items:center;display:flex;min-height:var(--cell-line-height,24px)}.smart-field__placeholder{color:var(--field-placeholder-text-color,#c8c9cc);left:0;pointer-events:none;position:absolute;right:0;top:0}.smart-field__placeholder--error{color:var(--field-error-message-color,#ee0a24)}.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-B4-N4,rgba(0,0,0,.4)));font-size:var(--field-clear-icon-size,16px)}.smart-field__icon-container{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,#ee0a24);display:block;font-size:var(--field-error-message-text-font-size,12px);margin-left:4px;text-align:left;white-space:nowrap}.smart-field__error-message--center{text-align:center}.smart-field__error-message--right{text-align:right}.smart-field__word-limit{color:var(--field-word-limit-color,#646566);font-size:var(--field-word-limit-font-size,12px);line-height:var(--field-word-limit-line-height,16px);margin-top:var(--padding-base,4px);text-align:right}.smart-field__word-num{display:inline}.smart-field__word-num--full{color:var(--field-word-num-full-color,#ee0a24)}
|
package/lib/loading/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#c8c9cc);display:inline-flex;justify-content:center}.smart-loading__spinner{animation:smart-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.smart-loading__spinner--spinner{animation-timing-function:steps(12)}.smart-
|
1
|
+
@import '../common/index.css';:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#c8c9cc);display:inline-flex;justify-content:center}.smart-loading__spinner{animation:smart-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.smart-loading__spinner--spinner{animation-timing-function:steps(12)}.smart-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.smart-loading__text:empty{display:none}.smart-loading--vertical{flex-direction:column}.smart-loading--vertical .smart-loading__text{margin:var(--padding-xs,8px) 0 0}@keyframes smart-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
package/lib/loading/index.js
CHANGED
@@ -9,10 +9,10 @@ var component_1 = require("../common/component");
|
|
9
9
|
type: String,
|
10
10
|
value: 'circular',
|
11
11
|
},
|
12
|
-
size:
|
12
|
+
size: {
|
13
|
+
type: String,
|
14
|
+
value: '30',
|
15
|
+
},
|
13
16
|
textSize: String,
|
14
17
|
},
|
15
|
-
data: {
|
16
|
-
array12: Array.from({ length: 12 }),
|
17
|
-
},
|
18
18
|
});
|
package/lib/loading/index.wxml
CHANGED
@@ -4,16 +4,14 @@
|
|
4
4
|
<view class="custom-class {{ utils.bem('loading', { vertical }) }}">
|
5
5
|
<view
|
6
6
|
class="smart-loading__spinner smart-loading__spinner--{{ type }}"
|
7
|
-
style="{{ computed.
|
7
|
+
style="{{ computed.loadingStyle({ size, type, color }) }}"
|
8
8
|
>
|
9
9
|
<view
|
10
|
-
|
11
|
-
|
12
|
-
wx:key="index"
|
13
|
-
class="smart-loading__dot"
|
10
|
+
class="smart-switch__loading"
|
11
|
+
style="{{ computed.loadingStyle({ size, type, color }) }}"
|
14
12
|
/>
|
15
13
|
</view>
|
16
|
-
<view class="smart-loading__text" style="{{ computed.textStyle({ textSize }) }}">
|
14
|
+
<view class="smart-loading__text" style="{{ computed.textStyle({ textSize, color }) }}">
|
17
15
|
<slot />
|
18
16
|
</view>
|
19
17
|
</view>
|
package/lib/loading/index.wxs
CHANGED
@@ -2,21 +2,52 @@
|
|
2
2
|
var style = require('../wxs/style.wxs');
|
3
3
|
var addUnit = require('../wxs/add-unit.wxs');
|
4
4
|
|
5
|
-
function
|
6
|
-
|
5
|
+
function textStyle(data) {
|
6
|
+
const ret = style({
|
7
|
+
'font-size': addUnit(data.textSize),
|
7
8
|
color: data.color,
|
8
|
-
width: addUnit(data.size),
|
9
|
-
height: addUnit(data.size),
|
10
9
|
});
|
10
|
+
|
11
|
+
return ret;
|
11
12
|
}
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
const createSvgIcon = (svg) =>
|
15
|
+
`data:image/svg+xml,${encodeURIComponent(
|
16
|
+
`<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">${svg}`
|
17
|
+
)}`;
|
18
|
+
|
19
|
+
const CircularLoading = ({ color }) =>
|
20
|
+
createSvgIcon(
|
21
|
+
`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><defs><clipPath id="master_svg0_452_31565"><rect x="0" y="0" width="24" height="24" rx="0"/></clipPath><linearGradient x1="0.5" y1="0.5" x2="0.5" y2="0.8999999761581421" id="master_svg1_452_31641"><stop offset="0%" stop-color="${color}" stop-opacity="1"/><stop offset="100%" stop-color="${color}" stop-opacity="0"/></linearGradient></defs><g clip-path="url(#master_svg0_452_31565)"><g style="opacity:0.20000000298023224;"><path d="M12,18.4C15.5346,18.4,18.4,15.5346,18.4,12C18.4,8.46538,15.5346,5.6,12,5.6C8.46538,5.6,5.6,8.46538,5.6,12C5.6,15.5346,8.46538,18.4,12,18.4ZM12,20C16.418300000000002,20,20,16.418300000000002,20,12C20,7.58172,16.418300000000002,4,12,4C7.58172,4,4,7.58172,4,12C4,16.418300000000002,7.58172,20,12,20Z" fill-rule="evenodd" fill="${color}" fill-opacity="1"/></g><g><path d="M12,5.6C8.46538,5.6,5.6,8.46538,5.6,12C5.6,15.5346,8.46538,18.4,12,18.4C12.44183,18.4,12.8,18.758200000000002,12.8,19.2C12.8,19.6418,12.44183,20,12,20C7.58172,20,4,16.418300000000002,4,12C4,7.58172,7.58172,4,12,4C16.418300000000002,4,20,7.58172,20,12C20,12.44183,19.6418,12.8,19.2,12.8C18.758200000000002,12.8,18.4,12.44183,18.4,12C18.4,8.46538,15.5346,5.6,12,5.6Z" fill-rule="evenodd" fill="url(#master_svg1_452_31641)" fill-opacity="1"/></g></g></svg>`
|
22
|
+
);
|
23
|
+
|
24
|
+
const SpinnerLoading = ({ color }) =>
|
25
|
+
createSvgIcon(
|
26
|
+
`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="32" height="32" viewBox="0 0 32 32"><g><g><g></g><g><g><path d="M23.5413973046875,21.023418836669922L21.6560673046875,19.138091836669922C21.1360673046875,18.618087836669922,20.2933963046875,18.618087836669922,19.7707393046875,19.138091836669922C19.2507363046875,19.658095836669922,19.2507363046875,20.503418836669923,19.7707393046875,21.023418836669922L21.6560673046875,22.908748836669922C22.1760673046875,23.42875883666992,23.0213873046875,23.42875883666992,23.5413973046875,22.908748836669922C24.0613973046875,22.388748836669922,24.0613973046875,21.54342883666992,23.5413973046875,21.023418836669922Z" fill-rule="evenodd" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.699999988079071;"><path d="M15,6.3333200000000005L15,8.99994C15,9.7359,15.597301,10.33326,16.33332,10.33326C17.06927,10.33326,17.66664,9.73596,17.66664,8.99994L17.66664,6.3333200000000005C17.66664,5.597364,17.06927,5,16.33332,5C15.597363,5,15,5.597301,15,6.3333200000000005Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.6000000238418579;"><path d="M8.390002,8.389983926513672C7.869999,8.909987926513672,7.869999,9.755310926513673,8.390002,10.275310926513672L10.27533,12.160640926513672C10.79533,12.680650926513671,11.638,12.680650926513671,12.16066,12.160640926513672C12.68066,11.640640926513672,12.68066,10.795320926513671,12.16066,10.275310926513672L10.27533,8.389983926513672C9.75533,7.869979926513672,8.910006,7.869979926513672,8.390002,8.389983926513672Z" fill="${color}" fill-opacity="1"/></g><g transform="matrix(-1,0,0,1,49.101318359375,0)" style="opacity:0.800000011920929;"><path d="M24.9406611796875,8.389983926513672C24.4206581796875,8.909987926513672,24.4206581796875,9.755310926513673,24.9406611796875,10.275310926513672L26.8259891796875,12.160640926513672C27.3459891796875,12.680650926513671,28.188659179687498,12.680650926513671,28.7113191796875,12.160640926513672C29.2313191796875,11.640640926513672,29.2313191796875,10.795320926513671,28.7113191796875,10.275310926513672L26.8259891796875,8.389983926513672C26.3059891796875,7.869979926513672,25.4606651796875,7.869979926513672,24.9406611796875,8.389983926513672Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.5;"><path d="M6,15.666644432373047C6,16.402604432373046,6.5973,16.999964432373048,7.3333200000000005,16.999964432373048L9.99994,16.999964432373048C10.735890000000001,16.999964432373048,11.33325,16.402664432373047,11.33325,15.666644432373047C11.33325,14.930688432373048,10.735949999999999,14.333324432373047,9.99994,14.333324432373047L7.3333200000000005,14.333324432373047C6.597364,14.333324432373047,6,14.930688432373048,6,15.666644432373047Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.8999999761581421;"><path d="M21,15.666644432373047C21,16.402604432373046,21.5973,16.999964432373048,22.33332,16.999964432373048L24.99994,16.999964432373048C25.73589,16.999964432373048,26.33325,16.402664432373047,26.33325,15.666644432373047C26.33325,14.930688432373048,25.73595,14.333324432373047,24.99994,14.333324432373047L22.33332,14.333324432373047C21.597364,14.333324432373047,21,14.930688432373048,21,15.666644432373047Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.4000000059604645;"><path d="M8.45866655078125,21.023418836669922C7.93866355078125,21.54342883666992,7.93866355078125,22.388748836669922,8.45866655078125,22.908748836669922C8.97867055078125,23.42875883666992,9.82399455078125,23.42875883666992,10.34399455078125,22.908748836669922L12.22932455078125,21.023418836669922C12.74932455078125,20.503418836669923,12.74932455078125,19.658095836669922,12.22932455078125,19.138091836669922C11.70931455078125,18.618087836669922,10.86399455078125,18.618087836669922,10.34399455078125,19.138091836669922L8.45866655078125,21.023418836669922Z" fill="${color}" fill-opacity="1"/></g><g style="opacity:0.20000000298023224;"><path d="M15,22.33332L15,24.99994C15,25.7359,15.597301,26.33326,16.33332,26.33326C17.06927,26.33326,17.66664,25.73596,17.66664,24.99994L17.66664,22.33332C17.66664,21.597364,17.06927,21,16.33332,21C15.597363,21,15,21.597301,15,22.33332Z" fill="${color}" fill-opacity="1"/></g></g></g></g></svg>`
|
27
|
+
);
|
28
|
+
|
29
|
+
function loadingStyle(data) {
|
30
|
+
let iconSrc = '';
|
31
|
+
|
32
|
+
if (data.type === 'spinner') {
|
33
|
+
iconSrc = SpinnerLoading({ color: data.color || '#1989FA' });
|
34
|
+
}
|
35
|
+
|
36
|
+
if (data.type === 'circular') {
|
37
|
+
iconSrc = CircularLoading({ color: data.color || '#3678E3' });
|
38
|
+
}
|
39
|
+
|
40
|
+
const ret = style({
|
41
|
+
'background-image': `url('${iconSrc}')`,
|
42
|
+
width: addUnit(data.size),
|
43
|
+
height: addUnit(data.size),
|
44
|
+
'background-size': addUnit(data.size),
|
16
45
|
});
|
46
|
+
|
47
|
+
return ret;
|
17
48
|
}
|
18
49
|
|
19
50
|
module.exports = {
|
20
|
-
spinnerStyle: spinnerStyle,
|
21
51
|
textStyle: textStyle,
|
52
|
+
loadingStyle: loadingStyle,
|
22
53
|
};
|
package/lib/loading/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#c8c9cc);display:inline-flex;justify-content:center}.smart-loading__spinner{animation:smart-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.smart-loading__spinner--spinner{animation-timing-function:steps(12)}.smart-
|
1
|
+
@import '../common/index.wxss';:host{font-size:0;line-height:1}.smart-loading{align-items:center;color:var(--loading-spinner-color,#c8c9cc);display:inline-flex;justify-content:center}.smart-loading__spinner{animation:smart-rotate var(--loading-spinner-animation-duration,.8s) linear infinite;box-sizing:border-box;height:var(--loading-spinner-size,30px);max-height:100%;max-width:100%;position:relative;width:var(--loading-spinner-size,30px)}.smart-loading__spinner--spinner{animation-timing-function:steps(12)}.smart-loading__text{color:var(--loading-text-color,#969799);font-size:var(--loading-text-font-size,14px);line-height:var(--loading-text-line-height,20px);margin-left:var(--padding-xs,8px)}.smart-loading__text:empty{display:none}.smart-loading--vertical{flex-direction:column}.smart-loading--vertical .smart-loading__text{margin:var(--padding-xs,8px) 0 0}@keyframes smart-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}
|
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-
|
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{background-color:#f2f3f5}.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__arrow+.smart-nav-bar__text{margin-left:-20px;padding-left:25px}.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-wrap>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;font-size:var(--font-size-md,14px);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'],
|
10
|
+
classes: ['title-class', 'left-icon-class'],
|
11
11
|
props: {
|
12
12
|
title: String,
|
13
13
|
fixed: {
|
@@ -18,7 +18,16 @@ var utils_1 = require("../common/utils");
|
|
18
18
|
type: Boolean,
|
19
19
|
observer: 'setHeight',
|
20
20
|
},
|
21
|
+
leftTextType: {
|
22
|
+
type: String,
|
23
|
+
value: 'back',
|
24
|
+
},
|
21
25
|
leftText: String,
|
26
|
+
leftIcon: String,
|
27
|
+
leftIconSize: {
|
28
|
+
type: null,
|
29
|
+
value: 32,
|
30
|
+
},
|
22
31
|
rightText: String,
|
23
32
|
customStyle: String,
|
24
33
|
leftArrow: Boolean,
|
@@ -56,6 +65,15 @@ var utils_1 = require("../common/utils");
|
|
56
65
|
onClickRight: function () {
|
57
66
|
this.$emit('click-right');
|
58
67
|
},
|
68
|
+
onClickTitle: function () {
|
69
|
+
this.$emit('click-title');
|
70
|
+
},
|
71
|
+
onClickLeftIcon: function () {
|
72
|
+
this.$emit('click-left-icon');
|
73
|
+
},
|
74
|
+
onClickLeftText: function () {
|
75
|
+
this.$emit('click-left-text');
|
76
|
+
},
|
59
77
|
setHeight: function () {
|
60
78
|
var _this = this;
|
61
79
|
if (!this.data.fixed || !this.data.placeholder) {
|
package/lib/nav-bar/index.wxml
CHANGED
@@ -9,23 +9,33 @@
|
|
9
9
|
>
|
10
10
|
<view class="smart-nav-bar__content">
|
11
11
|
<view class="smart-nav-bar__left" bind:tap="onClickLeft">
|
12
|
-
<block wx:if="{{ leftArrow || leftText }}">
|
12
|
+
<block wx:if="{{ leftArrow || leftText || leftIcon }}">
|
13
13
|
<smart-icon
|
14
14
|
wx:if="{{ leftArrow }}"
|
15
|
-
size="
|
16
|
-
name="
|
15
|
+
size="32px"
|
16
|
+
name="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSJub25lIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj48ZGVmcz48Y2xpcFBhdGggaWQ9Im1hc3Rlcl9zdmcwXzQ1Ml8yODM5NC8wXzgwODgiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgcng9IjAiLz48L2NsaXBQYXRoPjwvZGVmcz48ZyBjbGlwLXBhdGg9InVybCgjbWFzdGVyX3N2ZzBfNDUyXzI4Mzk0LzBfODA4OCkiPjxnIHN0eWxlPSJvcGFjaXR5OjAuNjk5OTk5OTg4MDc5MDcxOyI+PHBhdGggZD0iTTYuMDkxOTYsMTYuNDk5ODJDNi4wOTE5NiwxNi40OTk4MiwxMy4zMjA4MSwyMy41Mzk3LDEzLjMyMDgxLDIzLjUzOTdDMTMuNDgzOCwyMy43MTU3LDEzLjU2NDgsMjMuOTE5NywxMy41NjQ4LDI0LjE0OTdDMTMuNTY0OCwyNC4zNzk3LDEzLjQ3ODgsMjQuNTc5NiwxMy4zMDY4MSwyNC43NDc2QzEzLjIyNzEyLDI0LjgyODUsMTMuMTMxOTUsMjQuODkyNiwxMy4wMjY5NywyNC45MzU5QzEyLjkyMiwyNC45NzkyLDEyLjgwOTM3LDI1LjAwMDgsMTIuNjk1ODIsMjQuOTk5NkMxMi40NjQ3MywyNS4wMDExLDEyLjI0MTU4LDI0LjkxNTQsMTIuMDcwODMsMjQuNzU5NkMxMi4wNzA4MywyNC43NTk2LDQuMjQ0OTk4LDE3LjEwOTgxLDQuMjQ0OTk4LDE3LjEwOTgxQzQuMDg3MjQ2NCwxNi45NDU5OTAwMDAwMDAwMDIsMy45OTkzODg5MzUsMTYuNzI3MjQwMDAwMDAwMDAyLDQuMDAwMDAzMTk5NDMsMTYuNDk5ODJDNC4wMDAwMDMxOTk0MywxNi4yNjk4Myw0LjA4MjAwMTUsMTYuMDY1ODMsNC4yNDQ5OTgsMTUuODg5ODNDNC4yNDQ5OTgsMTUuODg5ODMsMTIuMDY5ODMsOC4yMzk5OTUsMTIuMDY5ODMsOC4yMzk5OTVDMTIuMjQ5ODMsOC4wNzk5OTgzLDEyLjQ1OTgyLDgsMTIuNjk0ODIsOEMxMi45Mjk4MSw4LDEzLjEzMzgxLDguMDgzOTk4MiwxMy4zMDU4MSw4LjI1MTk5NUMxMy4zODc5NSw4LjMyODMxMywxMy40NTMzMSw4LjQyMDg5MiwxMy40OTc3Miw4LjUyMzg0M0MxMy41NDIxNCw4LjYyNjc5NCwxMy41NjQ2NCw4LjczNzg2MiwxMy41NjM4LDguODQ5OTgyQzEzLjU2MzgsOS4wNzk5Nzk5OTk5OTk5OTksMTMuNDgyOCw5LjI4Mzk3LDEzLjMxOTgxLDkuNDU5OTdDMTMuMzE5ODEsOS40NTk5Nyw2LjA5MTk2LDE2LjQ5OTgyLDYuMDkxOTYsMTYuNDk5ODJaIiBmaWxsPSIjMDAwMDAwIiBmaWxsLW9wYWNpdHk9IjAuODk5OTk5OTc2MTU4MTQyMSIvPjwvZz48L2c+PC9zdmc+"
|
17
|
+
data-type="leftArrow"
|
17
18
|
custom-class="smart-nav-bar__arrow"
|
18
19
|
/>
|
20
|
+
<view
|
21
|
+
wx:if="{{ leftIcon }}"
|
22
|
+
data-type="leftIcon"
|
23
|
+
class="smart-nav-bar__icon-wrap"
|
24
|
+
catch:tap="onClickLeftIcon"
|
25
|
+
>
|
26
|
+
<smart-icon class="left-icon-class" size="{{ leftIconSize }}" name="{{ leftIcon }}" />
|
27
|
+
</view>
|
19
28
|
<view
|
20
29
|
wx:if="{{ leftText }}"
|
21
|
-
class="
|
22
|
-
|
30
|
+
class="{{ utils.bem('nav-bar__text', { home: leftTextType === 'home', title: leftTextType === 'title' }) }}"
|
31
|
+
catch:tap="onClickLeftText"
|
32
|
+
hover-class="{{ leftTextType === 'back' ? 'smart-nav-bar__text--hover' : '' }}"
|
23
33
|
hover-stay-time="70"
|
24
34
|
>{{ leftText }}</view>
|
25
35
|
</block>
|
26
36
|
<slot wx:else name="left" />
|
27
37
|
</view>
|
28
|
-
<view class="smart-nav-bar__title title-class smart-ellipsis">
|
38
|
+
<view class="smart-nav-bar__title title-class smart-ellipsis" bind:tap="onClickTitle">
|
29
39
|
<block wx:if="{{ title }}">{{ title }}</block>
|
30
40
|
|
31
41
|
<slot wx:else name="title" />
|
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-
|
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{background-color:#f2f3f5}.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__arrow+.smart-nav-bar__text{margin-left:-20px;padding-left:25px}.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-wrap>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;font-size:var(--font-size-md,14px);position:absolute;top:0}.smart-nav-bar__left{left:var(--padding-md,16px)}.smart-nav-bar__right{right:var(--padding-md,16px)}
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.contain{--thumb-active-color:var(
|
1
|
+
@import '../common/index.css';.contain{--thumb-active-color:var(--app-B3,#fff)}
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.contain{--thumb-active-color:var(
|
1
|
+
@import '../common/index.wxss';.contain{--thumb-active-color:var(--app-B3,#fff)}
|
package/lib/notice-bar/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-notice-bar{align-items:center;background-color:var(--notice-bar-background-color
|
1
|
+
@import '../common/index.css';.smart-notice-bar{--notice-bar-info-color:#1989fa;--notice-bar-warning-color:#ffa000;--notice-bar-error-color:#f04c4c;--notice-bar-right-icon-color:rgba(0,0,0,.2);align-items:center;background-color:var(--notice-bar-background-color,rgba(25,137,250,.1));color:var(--notice-bar-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;font-size:var(--notice-bar-font-size,12px);height:var(--notice-bar-height,40px);line-height:var(--notice-bar-line-height,14px);padding:var(--notice-bar-padding,0 16px)}.smart-notice-bar--warning{background-color:var(--notice-bar-background-warning-color,rgba(255,160,0,.1))}.smart-notice-bar--error{background-color:var(--notice-bar-background-error-color,rgba(240,76,76,.1))}.smart-notice-bar--hover{opacity:.6}.smart-notice-bar--wrapable{height:auto;padding:var(--notice-bar-wrapable-padding,8px 16px)}.smart-notice-bar--wrapable .smart-notice-bar__wrap{height:auto}.smart-notice-bar--wrapable .smart-notice-bar__content{position:relative;white-space:normal}.smart-notice-bar__left-icon{align-items:center;display:flex;font-size:var(--notice-bar-icon-size,16px);margin-right:var(--notice-bar-left-icon-margin-right,8px);vertical-align:middle}.smart-notice-bar__right-icon{font-size:var(--notice-bar-icon-size,16px);margin-left:var(--notice-bar-right-icon-margin-left,8px)}.smart-notice-bar__wrap{flex:1;height:var(--notice-bar-line-height,14px);overflow:hidden;position:relative}.smart-notice-bar__content{position:absolute;white-space:nowrap}.smart-notice-bar__content.smart-ellipsis{max-width:100%}.smart-notice-bar__content__btn{color:#1989fa;display:inline-block}
|
package/lib/notice-bar/index.js
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
6
|
var component_1 = require("../common/component");
|
4
7
|
var utils_1 = require("../common/utils");
|
8
|
+
var Xmark_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Xmark"));
|
9
|
+
var Right_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Right"));
|
5
10
|
(0, component_1.SmartComponent)({
|
6
11
|
props: {
|
7
12
|
text: {
|
@@ -9,22 +14,60 @@ var utils_1 = require("../common/utils");
|
|
9
14
|
value: '',
|
10
15
|
observer: 'init',
|
11
16
|
},
|
17
|
+
btnText: {
|
18
|
+
type: String,
|
19
|
+
value: '',
|
20
|
+
observer: 'init',
|
21
|
+
},
|
22
|
+
btnTextColor: {
|
23
|
+
type: String,
|
24
|
+
value: '',
|
25
|
+
observer: 'init',
|
26
|
+
},
|
12
27
|
mode: {
|
13
28
|
type: String,
|
14
29
|
value: '',
|
15
30
|
},
|
31
|
+
type: {
|
32
|
+
type: String,
|
33
|
+
value: 'info'
|
34
|
+
},
|
16
35
|
url: {
|
17
36
|
type: String,
|
18
37
|
value: '',
|
19
38
|
},
|
20
39
|
openType: {
|
21
40
|
type: String,
|
22
|
-
value: '
|
41
|
+
value: 'navigateTo',
|
42
|
+
},
|
43
|
+
rightIconColor: {
|
44
|
+
type: String,
|
45
|
+
value: 'var(--notice-bar-right-icon-color)',
|
46
|
+
},
|
47
|
+
leftIconColor: {
|
48
|
+
type: String,
|
49
|
+
value: '',
|
23
50
|
},
|
24
51
|
delay: {
|
25
52
|
type: Number,
|
26
53
|
value: 1,
|
27
54
|
},
|
55
|
+
customStyle: {
|
56
|
+
type: String,
|
57
|
+
value: '',
|
58
|
+
},
|
59
|
+
customHoverClass: {
|
60
|
+
type: String,
|
61
|
+
value: '',
|
62
|
+
},
|
63
|
+
rightIconStyle: {
|
64
|
+
type: String,
|
65
|
+
value: '',
|
66
|
+
},
|
67
|
+
leftIconStyle: {
|
68
|
+
type: String,
|
69
|
+
value: '',
|
70
|
+
},
|
28
71
|
speed: {
|
29
72
|
type: Number,
|
30
73
|
value: 60,
|
@@ -36,11 +79,12 @@ var utils_1 = require("../common/utils");
|
|
36
79
|
value: '',
|
37
80
|
},
|
38
81
|
color: String,
|
39
|
-
backgroundColor: String,
|
40
82
|
background: String,
|
41
83
|
wrapable: Boolean,
|
42
84
|
},
|
43
85
|
data: {
|
86
|
+
Xmark: Xmark_1.default,
|
87
|
+
Right: Right_1.default,
|
44
88
|
show: true,
|
45
89
|
},
|
46
90
|
created: function () {
|
@@ -118,7 +162,19 @@ var utils_1 = require("../common/utils");
|
|
118
162
|
this.$emit('close', event.detail);
|
119
163
|
}
|
120
164
|
},
|
165
|
+
onClickBtnText: function (event) {
|
166
|
+
this.$emit('btnClick', event);
|
167
|
+
},
|
121
168
|
onClick: function (event) {
|
169
|
+
var _a = this.data, url = _a.url, mode = _a.mode, openType = _a.openType;
|
170
|
+
if (mode === 'link' && url) {
|
171
|
+
if (openType === 'redirectTo') {
|
172
|
+
wx.redirectTo({ url: url });
|
173
|
+
}
|
174
|
+
else if (openType === 'navigateTo') {
|
175
|
+
wx.navigateTo({ url: url });
|
176
|
+
}
|
177
|
+
}
|
122
178
|
this.$emit('click', event);
|
123
179
|
},
|
124
180
|
},
|
@@ -3,20 +3,36 @@
|
|
3
3
|
|
4
4
|
<view
|
5
5
|
wx:if="{{ show }}"
|
6
|
-
class="custom-class {{ utils.bem('notice-bar', {
|
7
|
-
|
6
|
+
class="custom-class {{ utils.bem('notice-bar', {
|
7
|
+
wrapable,
|
8
|
+
warning: type === 'warning',
|
9
|
+
error: type === 'error'
|
10
|
+
}) }}"
|
11
|
+
hover-class="{{ mode === 'link' ? 'smart-notice-bar--hover' : ''}} {{ customHoverClass }}"
|
12
|
+
style="{{ computed.rootStyle([{ color, background }, customStyle]) }}"
|
8
13
|
bind:tap="onClick"
|
9
14
|
>
|
10
15
|
<smart-icon
|
11
16
|
wx:if="{{ leftIcon }}"
|
12
17
|
name="{{ leftIcon }}"
|
13
18
|
class="smart-notice-bar__left-icon"
|
19
|
+
style="{{ computed.rootStyle(leftIconStyle) }}"
|
20
|
+
color="{{ leftIconColor || (type === 'info' ? 'var(--notice-bar-info-color)' : type === 'warning' ? 'var(--notice-bar-warning-color)' : type === 'error' ? 'var(--notice-bar-error-color)' : '') }}"
|
14
21
|
/>
|
15
22
|
<slot wx:else name="left-icon" />
|
16
23
|
|
17
24
|
<view class="smart-notice-bar__wrap">
|
18
25
|
<view class="smart-notice-bar__content {{ scrollable === false && !wrapable ? 'smart-ellipsis' : '' }}" animation="{{ animationData }}">
|
19
26
|
{{ text }}
|
27
|
+
<view
|
28
|
+
wx:if="{{ btnText }}"
|
29
|
+
class="smart-notice-bar__content__btn"
|
30
|
+
hover-class="smart-notice-bar--hover"
|
31
|
+
catch:tap="onClickBtnText"
|
32
|
+
style="{{ btnTextColor ? 'color: ' + btnTextColor : ''}}"
|
33
|
+
>
|
34
|
+
{{ btnText }}
|
35
|
+
</view>
|
20
36
|
<slot wx:if="{{ !text }}"></slot>
|
21
37
|
</view>
|
22
38
|
</view>
|
@@ -24,15 +40,17 @@
|
|
24
40
|
<smart-icon
|
25
41
|
wx:if="{{ mode === 'closeable' }}"
|
26
42
|
class="smart-notice-bar__right-icon"
|
27
|
-
name="
|
43
|
+
name="{{ Xmark }}"
|
44
|
+
style="{{ computed.rootStyle(rightIconStyle) }}"
|
45
|
+
color=" {{ rightIconColor }} "
|
28
46
|
catch:tap="onClickIcon"
|
29
47
|
/>
|
30
|
-
<
|
31
|
-
wx:elif="{{ mode === 'link' }}"
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
48
|
+
<smart-icon
|
49
|
+
wx:elif="{{ mode === 'link' }}"
|
50
|
+
color=" {{ rightIconColor }} "
|
51
|
+
class="smart-notice-bar__right-icon"
|
52
|
+
name="{{ Right }}"
|
53
|
+
style="{{ computed.rootStyle(rightIconStyle) }}"
|
54
|
+
/>
|
37
55
|
<slot wx:else name="right-icon" />
|
38
56
|
</view>
|
package/lib/notice-bar/index.wxs
CHANGED
@@ -3,11 +3,7 @@ var style = require('../wxs/style.wxs');
|
|
3
3
|
var addUnit = require('../wxs/add-unit.wxs');
|
4
4
|
|
5
5
|
function rootStyle(data) {
|
6
|
-
return style(
|
7
|
-
color: data.color,
|
8
|
-
'background-color': data.backgroundColor,
|
9
|
-
background: data.background,
|
10
|
-
});
|
6
|
+
return style(data);
|
11
7
|
}
|
12
8
|
|
13
9
|
module.exports = {
|
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-notice-bar{align-items:center;background-color:var(--notice-bar-background-color
|
1
|
+
@import '../common/index.wxss';.smart-notice-bar{--notice-bar-info-color:#1989fa;--notice-bar-warning-color:#ffa000;--notice-bar-error-color:#f04c4c;--notice-bar-right-icon-color:rgba(0,0,0,.2);align-items:center;background-color:var(--notice-bar-background-color,rgba(25,137,250,.1));color:var(--notice-bar-text-color,var(--app-B6-N3,rgba(0,0,0,.5)));display:flex;font-size:var(--notice-bar-font-size,12px);height:var(--notice-bar-height,40px);line-height:var(--notice-bar-line-height,14px);padding:var(--notice-bar-padding,0 16px)}.smart-notice-bar--warning{background-color:var(--notice-bar-background-warning-color,rgba(255,160,0,.1))}.smart-notice-bar--error{background-color:var(--notice-bar-background-error-color,rgba(240,76,76,.1))}.smart-notice-bar--hover{opacity:.6}.smart-notice-bar--wrapable{height:auto;padding:var(--notice-bar-wrapable-padding,8px 16px)}.smart-notice-bar--wrapable .smart-notice-bar__wrap{height:auto}.smart-notice-bar--wrapable .smart-notice-bar__content{position:relative;white-space:normal}.smart-notice-bar__left-icon{align-items:center;display:flex;font-size:var(--notice-bar-icon-size,16px);margin-right:var(--notice-bar-left-icon-margin-right,8px);vertical-align:middle}.smart-notice-bar__right-icon{font-size:var(--notice-bar-icon-size,16px);margin-left:var(--notice-bar-right-icon-margin-left,8px)}.smart-notice-bar__wrap{flex:1;height:var(--notice-bar-line-height,14px);overflow:hidden;position:relative}.smart-notice-bar__content{position:absolute;white-space:nowrap}.smart-notice-bar__content.smart-ellipsis{max-width:100%}.smart-notice-bar__content__btn{color:#1989fa;display:inline-block}
|
@@ -177,7 +177,14 @@ var DEFAULT_DURATION = 200;
|
|
177
177
|
animate: true,
|
178
178
|
duration: DEFAULT_DURATION,
|
179
179
|
}).then(function () {
|
180
|
-
|
180
|
+
if (!userAction)
|
181
|
+
return;
|
182
|
+
if ([0, data.optionsV.length - 1].includes(index)) {
|
183
|
+
_this.$emit('change', index);
|
184
|
+
return;
|
185
|
+
}
|
186
|
+
;
|
187
|
+
_this.fireChange = true;
|
181
188
|
});
|
182
189
|
});
|
183
190
|
}
|
package/lib/radio/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-radio{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.smart-radio__icon-wrap{flex:none}.smart-radio--horizontal{margin-right:var(--padding-sm,12px)}.smart-radio__icon{align-items:center;border:
|
1
|
+
@import '../common/index.css';.smart-radio{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.smart-radio__icon-wrap{display:flex;flex:none}.smart-radio--horizontal{margin-right:var(--padding-sm,12px)}.smart-radio__icon{align-items:center;border:2px solid var(--radio-border-color,var(--app-B6-N6,rgba(0,0,0,.2)));border-radius:var(--radio-border-radius,4px);box-sizing:border-box;color:transparent;display:flex;font-size:var(--radio-size,24px);height:1em;justify-content:center;text-align:center;transition-duration:var(--radio-transition-duration,.2s);transition-property:color,border,background-color;width:1em}.smart-radio__icon--round{border-radius:100%}.smart-radio__icon--checked{background-color:var(--radio-checked-icon-color,var(--app-M4,#1989fa));border-color:var(--radio-checked-icon-color,var(--app-M4,#1989fa));color:#fff}.smart-radio__icon--disabled{opacity:.3}.smart-radio__label{word-wrap:break-word;color:var(--radio-label-color,var(--app-B6-N1,#000));font-size:var(--radio-label-size,12px);padding-left:var(--radio-label-margin,10px)}.smart-radio__label--left{float:left;margin:0 var(--radio-label-margin,10px) 0 0}.smart-radio__label--disabled{color:var(--radio-disabled-label-color,var(--app-B6-N5,rgba(0,0,0,.3)))}.smart-radio__label:empty{margin:0}
|
package/lib/radio/index.js
CHANGED
package/lib/radio/index.wxml
CHANGED
@@ -14,7 +14,8 @@
|
|
14
14
|
<smart-icon
|
15
15
|
wx:else
|
16
16
|
name="{{ icon }}"
|
17
|
-
|
17
|
+
size="1em"
|
18
|
+
color="{{ value === name ? '#fff' : 'none'}}"
|
18
19
|
class="{{ utils.bem('radio__icon', [shape, { disabled: disabled || parentDisabled, checked: value === name }]) }}"
|
19
20
|
style="{{ computed.iconStyle({ iconSize, checkedColor, disabled, parentDisabled, value, name }) }}"
|
20
21
|
custom-class="icon-class"
|
package/lib/radio/index.wxss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.wxss';.smart-radio{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.smart-radio__icon-wrap{flex:none}.smart-radio--horizontal{margin-right:var(--padding-sm,12px)}.smart-radio__icon{align-items:center;border:
|
1
|
+
@import '../common/index.wxss';.smart-radio{align-items:center;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.smart-radio__icon-wrap{display:flex;flex:none}.smart-radio--horizontal{margin-right:var(--padding-sm,12px)}.smart-radio__icon{align-items:center;border:2px solid var(--radio-border-color,var(--app-B6-N6,rgba(0,0,0,.2)));border-radius:var(--radio-border-radius,4px);box-sizing:border-box;color:transparent;display:flex;font-size:var(--radio-size,24px);height:1em;justify-content:center;text-align:center;transition-duration:var(--radio-transition-duration,.2s);transition-property:color,border,background-color;width:1em}.smart-radio__icon--round{border-radius:100%}.smart-radio__icon--checked{background-color:var(--radio-checked-icon-color,var(--app-M4,#1989fa));border-color:var(--radio-checked-icon-color,var(--app-M4,#1989fa));color:#fff}.smart-radio__icon--disabled{opacity:.3}.smart-radio__label{word-wrap:break-word;color:var(--radio-label-color,var(--app-B6-N1,#000));font-size:var(--radio-label-size,12px);padding-left:var(--radio-label-margin,10px)}.smart-radio__label--left{float:left;margin:0 var(--radio-label-margin,10px) 0 0}.smart-radio__label--disabled{color:var(--radio-disabled-label-color,var(--app-B6-N5,rgba(0,0,0,.3)))}.smart-radio__label:empty{margin:0}
|
package/lib/search/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
@import '../common/index.css';.smart-search{align-items:center;box-sizing:border-box;display:flex;padding:var(--search-padding,
|
1
|
+
@import '../common/index.css';.smart-search{align-items:center;background-color:var(--search-background-color,var(--app-B3,#fff));box-sizing:border-box;display:flex;padding:var(--search-padding,12px 16px)}.smart-search__content{align-items:center;background-color:var(--search-body-background-color,var(--app-B4-N9,rgba(0,0,0,.05)));display:flex;flex:1;flex-direction:row;padding:12px 16px}.smart-search__content--round{border-radius:999px}.smart-search__label{color:var(--search-label-color,var(--app-B4-N1,#000));font-size:var(--search-label-font-size,14px);line-height:var(--search-input-height,24px);padding:var(--search-label-padding,0 5px)}.smart-search__field{flex:1}.smart-search__field__left-icon{--icon-color:var(--search-left-icon-color,var(--app-B4-N4,rgba(0,0,0,.4)));margin-left:2px}.smart-search__input{font-size:var(--search-value-font-size,14px)}.smart-search--withaction{padding-right:0}.smart-search__action{color:var(--search-action-text-color,var(--app-B4-N3,rgba(0,0,0,.5)));font-size:var(--search-action-font-size,14px);line-height:var(--search-input-height,24px)}.smart-search__action--hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:.4}.smart-search__action-button{padding:var(--search-action-padding,0 16px 0 12px)}.smart-search__hover{background-color:var(--app-B4-N9,rgba(0,0,0,.05));opacity:.4}.smart-search__submit{align-items:center;color:var(--search-submit-color,var(--app-M1,#3678e3));display:flex;flex-direction:row;font-size:var(--search-submit-font-size,14px)}.smart-search__submit:before{background-color:var(--search-submit-color,var(--app-M1,#3678e3));content:"";display:block;height:12px;margin-right:12px;width:1px}
|
package/lib/search/index.js
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
6
|
var component_1 = require("../common/component");
|
4
7
|
var version_1 = require("../common/version");
|
8
|
+
var Search_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Search"));
|
9
|
+
var Close_1 = __importDefault(require("@tuya-miniapp/icons/dist/svg/Close"));
|
5
10
|
(0, component_1.SmartComponent)({
|
6
11
|
field: true,
|
7
12
|
classes: ['field-class', 'input-class', 'cancel-class'],
|
@@ -22,18 +27,20 @@ var version_1 = require("../common/version");
|
|
22
27
|
useRightIconSlot: Boolean,
|
23
28
|
leftIcon: {
|
24
29
|
type: String,
|
25
|
-
value:
|
30
|
+
value: Search_1.default,
|
26
31
|
},
|
27
32
|
rightIcon: String,
|
28
33
|
placeholder: String,
|
29
34
|
placeholderStyle: String,
|
30
|
-
|
35
|
+
searchText: {
|
31
36
|
type: String,
|
32
|
-
value: '
|
37
|
+
value: 'Search',
|
33
38
|
},
|
34
|
-
|
39
|
+
showSearchButton: Boolean,
|
40
|
+
background: String,
|
41
|
+
actionText: {
|
35
42
|
type: String,
|
36
|
-
value: '
|
43
|
+
value: 'Cancel',
|
37
44
|
},
|
38
45
|
maxlength: {
|
39
46
|
type: Number,
|
@@ -53,7 +60,7 @@ var version_1 = require("../common/version");
|
|
53
60
|
},
|
54
61
|
clearIcon: {
|
55
62
|
type: String,
|
56
|
-
value:
|
63
|
+
value: Close_1.default,
|
57
64
|
},
|
58
65
|
cursorSpacing: {
|
59
66
|
type: Number,
|
@@ -62,9 +69,7 @@ var version_1 = require("../common/version");
|
|
62
69
|
},
|
63
70
|
methods: {
|
64
71
|
onChange: function (event) {
|
65
|
-
|
66
|
-
this.setData({ value: event.detail });
|
67
|
-
}
|
72
|
+
this.setData({ value: event.detail });
|
68
73
|
this.$emit('change', event.detail);
|
69
74
|
},
|
70
75
|
onCancel: function () {
|
@@ -83,6 +88,9 @@ var version_1 = require("../common/version");
|
|
83
88
|
onSearch: function (event) {
|
84
89
|
this.$emit('search', event.detail);
|
85
90
|
},
|
91
|
+
goSearch: function () {
|
92
|
+
this.$emit('search', this.data.value);
|
93
|
+
},
|
86
94
|
onFocus: function (event) {
|
87
95
|
this.$emit('focus', event.detail);
|
88
96
|
},
|