mali-applet-ui 0.1.91 → 0.1.93

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.
@@ -18,6 +18,7 @@
18
18
  * under the License.
19
19
  */
20
20
 
21
+ /* eslint-disable */
21
22
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,(function(t){"use strict";
22
23
  /*! *****************************************************************************
23
24
  Copyright (c) Microsoft Corporation.
@@ -3,7 +3,8 @@
3
3
  <view class="ml-tabbar-item" v-for="(item) in options" :key="item.value" :class="{'is-active': value == item.value}" @tap="tapEvent(item)">
4
4
  <view class="ml-tabbar-icon">
5
5
  <ml-icon class="icon" :name="value == item.value ? item.activeIcon : item.icon"></ml-icon>
6
- <view v-if="item.showDot && item.dotNum > 0" class="ml-tabbar-num">{{ getDotNum(item.dotNum) }}</view>
6
+ <view v-if="item.showDot && item.dotNum > 0" class="ml-tabbar-dot-num">{{ getDotNum(item.dotNum) }}</view>
7
+ <view v-else-if="item.showDot" class="ml-tabbar-dot"></view>
7
8
  </view>
8
9
  <view class="ml-tabbar-name">{{ item.name }}</view>
9
10
  </view>
@@ -84,7 +85,7 @@ export default {
84
85
  color: $uni-color-primary;
85
86
  }
86
87
  }
87
- .ml-tabbar-num {
88
+ .ml-tabbar-dot-num {
88
89
  position: absolute;
89
90
  top: 0;
90
91
  left: 114rpx;
@@ -98,6 +99,17 @@ export default {
98
99
  font-size: 20rpx;
99
100
  line-height: 32rpx;
100
101
  }
102
+ .ml-tabbar-dot {
103
+ position: absolute;
104
+ top: 0;
105
+ left: 114rpx;
106
+ background-color: #f56c6c;
107
+ color: #fff;
108
+ border-radius: 20rpx;
109
+ display: inline-block;
110
+ width: 20rpx;
111
+ height: 20rpx;
112
+ }
101
113
  .ml-tabbar-icon {
102
114
  display: block;
103
115
  position: relative;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.91",
3
+ "version": "0.1.93",
4
4
  "description": "码里云小程序组件库",
5
5
  "scripts": {
6
6
  "release": "node script/release.js && npm publish"
package/utils/number.js CHANGED
@@ -100,6 +100,9 @@ export function toAmountString (value, fixed = 2) {
100
100
  * @returns
101
101
  */
102
102
  export function toWanAmountString (value, fixed = 2) {
103
+ if (value < 0) {
104
+ return XEUtils.commafy(XEUtils.ceil(value ? value / 10000 : 0, fixed), { digits: fixed })
105
+ }
103
106
  return XEUtils.commafy(XEUtils.floor(value ? value / 10000 : 0, fixed), { digits: fixed })
104
107
  }
105
108