mali-applet-ui 1.1.66 → 1.1.67

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.
@@ -3,7 +3,7 @@
3
3
  <view v-if="showHeader || title" class="progress-bar-header">
4
4
  <slot name="header">
5
5
  <view v-if="title" class="progress-header-title" :class="{'is-underline': titleUnderline}">{{ title }}</view>
6
- <view v-if="showTitleNum" class="progress-header-num">{{ titleNum || (`${value || 0}${unit || ''}`) }}</view>
6
+ <view v-if="showTitleNum" class="progress-header-num">{{ titleNum || (`${percNum}${unit || ''}`) }}</view>
7
7
  </slot>
8
8
  </view>
9
9
  <view class="progress-bar-chart" @click="barClick">
@@ -20,10 +20,11 @@
20
20
  :strokeWidth="strokeWidth"
21
21
  :fontSize="fontSize"
22
22
  :border-radius="borderRadius" />
23
+ <view v-if="showBarRatio" class="progress-bar-ratio">{{ barRatio || `${value}/${max}` }}</view>
23
24
  </view>
24
25
  <view v-if="showBarNum" class="progress-bar-right">
25
26
  <slot name="bar_num">
26
- <text>{{ barNum || (`${value || 0}${unit || ''}`) }}</text>
27
+ <text>{{ barNum || (`${percNum}${unit || ''}`) }}</text>
27
28
  </slot>
28
29
  </view>
29
30
  </view>
@@ -55,7 +56,7 @@ export default {
55
56
  barTitleWidth: [Number, String],
56
57
  strokeWidth: {
57
58
  type: [Number, String],
58
- default: 14
59
+ default: 16
59
60
  },
60
61
  activeColor: String,
61
62
  fontSize: {
@@ -71,6 +72,8 @@ export default {
71
72
  titleNum: [Number, String],
72
73
  showBarNum: Boolean,
73
74
  barNum: Boolean,
75
+ showBarRatio: Boolean,
76
+ barRatio: Boolean,
74
77
  unit: String,
75
78
  className: String
76
79
  },
@@ -114,6 +117,7 @@ export default {
114
117
  .progress-bar-right {
115
118
  flex-shrink: 0;
116
119
  font-size: 24rpx;
120
+ line-height: 28rpx;
117
121
  padding: 0 4rpx;
118
122
  overflow: hidden;
119
123
  text-overflow: ellipsis;
@@ -128,6 +132,15 @@ export default {
128
132
  .progress-bar-content {
129
133
  flex-grow: 1;
130
134
  overflow: hidden;
135
+ position: relative;
136
+ }
137
+ .progress-bar-ratio {
138
+ position: absolute;
139
+ top: 0;
140
+ left: 4rpx;
141
+ font-size: 24rpx;
142
+ line-height: 28rpx;
143
+ color: #fff;
131
144
  }
132
145
  }
133
146
  .progress-header-title {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.66",
3
+ "version": "1.1.67",
4
4
  "description": "码里UI-小程序组件库(vue2)",
5
5
  "files": [
6
6
  "lib",