mali-applet-ui 0.1.90 → 0.1.92

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.
@@ -1,9 +1,12 @@
1
1
  <template>
2
2
  <view class="ml-form-group" :class="className || ''">
3
- <view v-if="title || $slots.title" class="ml-form-group-title">
4
- <slot name="title">
5
- <text>{{ title }}</text>
6
- </slot>
3
+ <view v-if="title || showHeader" class="ml-form-group-header">
4
+ <view class="ml-form-group-title">
5
+ <slot name="title">{{ title }}</slot>
6
+ </view>
7
+ <view class="ml-form-group-extra">
8
+ <slot name="extra"></slot>
9
+ </view>
7
10
  </view>
8
11
  <view class="ml-form-group-content">
9
12
  <slot></slot>
@@ -19,6 +22,7 @@ export default {
19
22
  },
20
23
  props: {
21
24
  title: String,
25
+ showHeader: Boolean,
22
26
  className: String
23
27
  }
24
28
  }
@@ -26,18 +30,35 @@ export default {
26
30
 
27
31
  <style lang="scss">
28
32
  .ml-form-group {
29
- border-radius: $ml-border-radius;
30
- background: #ffffff;
31
33
  margin-bottom: 20rpx;
32
- .ml-form-group-title {
34
+ .ml-form-group-header {
33
35
  display: flex;
36
+ flex-direction: row;
34
37
  align-items: center;
35
38
  min-height: 80rpx;
36
- padding: 0 20rpx;
37
- border-bottom: 1px solid #e5e5e5;
39
+ padding: 20rpx;
40
+ .ml-form-group-title {
41
+ flex-grow: 1;
42
+ position: relative;
43
+ padding-left: 20rpx;
44
+ &:before {
45
+ content: "";
46
+ position: absolute;
47
+ top: 0;
48
+ left: 0;
49
+ width: 8rpx;
50
+ height: 30rpx;
51
+ background: $uni-color-primary;
52
+ }
53
+ }
54
+ .ml-form-group-extra {
55
+ flex-shrink: 0;
56
+ }
38
57
  }
39
58
  .ml-form-group-content {
40
59
  padding-bottom: 20rpx;
60
+ background: #ffffff;
61
+ border-radius: $ml-border-radius;
41
62
  }
42
63
  }
43
64
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.90",
3
+ "version": "0.1.92",
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