xianniu-ui 2.0.5 → 2.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xianniu-ui",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -9,14 +9,10 @@
9
9
  <slot name="prefix">{{ prefix }}</slot>
10
10
  </i><!--
11
11
  --><template v-if="$slots.default">
12
- <slot :format-value="formatUserValue">
13
- <!-- 如果插槽内容只是简单文本,尝试格式化 -->
14
- <span v-if="slotTextContent !== null && !isNaN(slotTextContent)">
15
- {{ formatUserValue(parseFloat(slotTextContent)) }}
16
- </span>
17
- <!-- 否则显示原始插槽内容 -->
18
- <slot v-else></slot>
19
- </slot>
12
+ <template v-if="slotTextContent !== null && !isNaN(Number(slotTextContent))">
13
+ {{ formatUserValue(Number(slotTextContent)) }}
14
+ </template>
15
+ <slot v-else></slot>
20
16
  </template>
21
17
  <template v-else>
22
18
  {{ formattedValue }}