@tuya-miniapp/smart-ui 2.7.4-beta-2 → 2.7.4-beta-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/toast/index.js +5 -0
- package/dist/toast/index.wxml +5 -5
- package/dist/toast/toast.d.ts +2 -0
- package/lib/toast/index.js +5 -0
- package/lib/toast/index.wxml +5 -5
- package/lib/toast/toast.d.ts +2 -0
- package/package.json +1 -1
package/dist/toast/index.js
CHANGED
package/dist/toast/index.wxml
CHANGED
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
>
|
|
17
17
|
|
|
18
18
|
<!-- text only -->
|
|
19
|
-
<text class="smart-toast__text" wx:if="{{ type === 'text' }}">{{ message }}</text>
|
|
19
|
+
<text class="smart-toast__text" style="{{ textColor ? ('color: ' + textColor) : '' }}" wx:if="{{ type === 'text' }}">{{ message }}</text>
|
|
20
20
|
|
|
21
21
|
<!-- html only -->
|
|
22
|
-
<rich-text wx:elif="{{ type === 'html' }}" nodes="{{ message }}"></rich-text>
|
|
22
|
+
<rich-text wx:elif="{{ type === 'html' }}" nodes="{{ message }}" style="{{ textColor ? ('color: ' + textColor) : '' }}"></rich-text>
|
|
23
23
|
|
|
24
24
|
<!-- with icon -->
|
|
25
25
|
<block wx:else>
|
|
26
|
-
<smart-loading wx:if="{{ type === 'loading' }}" color="
|
|
27
|
-
<smart-icon wx:else color="
|
|
28
|
-
<text wx:if="{{ message }}" class="smart-toast__text">{{ message }}</text>
|
|
26
|
+
<smart-loading wx:if="{{ type === 'loading' }}" color="{{iconColor}}" style="transform:scale(1.6);" type="{{loadingType}}" />
|
|
27
|
+
<smart-icon wx:else color="{{iconColor}}" class="smart-toast__icon" style="transform:scale({{ type === 'success' ? 1.4 : type === 'fail' ? 1.1 : 1 }})" name="{{ type === 'success' ? success : type === 'fail' ? error : type === 'warn' ? warn : success }}" />
|
|
28
|
+
<text wx:if="{{ message }}" class="smart-toast__text" style="{{ textColor ? ('color: ' + textColor) : '' }}">{{ message }}</text>
|
|
29
29
|
</block>
|
|
30
30
|
|
|
31
31
|
<slot />
|
package/dist/toast/toast.d.ts
CHANGED
package/lib/toast/index.js
CHANGED
|
@@ -15,6 +15,11 @@ var appLog_1 = __importDefault(require("../common/appLog"));
|
|
|
15
15
|
message: String,
|
|
16
16
|
forbidClick: Boolean,
|
|
17
17
|
nativeDisabled: Boolean,
|
|
18
|
+
iconColor: {
|
|
19
|
+
type: String,
|
|
20
|
+
value: 'white',
|
|
21
|
+
},
|
|
22
|
+
textColor: String,
|
|
18
23
|
zIndex: {
|
|
19
24
|
type: Number,
|
|
20
25
|
value: 1000,
|
package/lib/toast/index.wxml
CHANGED
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
>
|
|
17
17
|
|
|
18
18
|
<!-- text only -->
|
|
19
|
-
<text class="smart-toast__text" wx:if="{{ type === 'text' }}">{{ message }}</text>
|
|
19
|
+
<text class="smart-toast__text" style="{{ textColor ? ('color: ' + textColor) : '' }}" wx:if="{{ type === 'text' }}">{{ message }}</text>
|
|
20
20
|
|
|
21
21
|
<!-- html only -->
|
|
22
|
-
<rich-text wx:elif="{{ type === 'html' }}" nodes="{{ message }}"></rich-text>
|
|
22
|
+
<rich-text wx:elif="{{ type === 'html' }}" nodes="{{ message }}" style="{{ textColor ? ('color: ' + textColor) : '' }}"></rich-text>
|
|
23
23
|
|
|
24
24
|
<!-- with icon -->
|
|
25
25
|
<block wx:else>
|
|
26
|
-
<smart-loading wx:if="{{ type === 'loading' }}" color="
|
|
27
|
-
<smart-icon wx:else color="
|
|
28
|
-
<text wx:if="{{ message }}" class="smart-toast__text">{{ message }}</text>
|
|
26
|
+
<smart-loading wx:if="{{ type === 'loading' }}" color="{{iconColor}}" style="transform:scale(1.6);" type="{{loadingType}}" />
|
|
27
|
+
<smart-icon wx:else color="{{iconColor}}" class="smart-toast__icon" style="transform:scale({{ type === 'success' ? 1.4 : type === 'fail' ? 1.1 : 1 }})" name="{{ type === 'success' ? success : type === 'fail' ? error : type === 'warn' ? warn : success }}" />
|
|
28
|
+
<text wx:if="{{ message }}" class="smart-toast__text" style="{{ textColor ? ('color: ' + textColor) : '' }}">{{ message }}</text>
|
|
29
29
|
</block>
|
|
30
30
|
|
|
31
31
|
<slot />
|
package/lib/toast/toast.d.ts
CHANGED