@ecan-bi/datav 1.1.2 → 1.1.4

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/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @ecan-bi/datav@1.1.2 */
1
+ /*! @ecan-bi/datav@1.1.4 */
2
2
  var _a, _b, _c, _d;
3
3
  import { watch, inject, computed, unref, watchEffect, defineComponent, shallowRef, toRefs, onMounted, onUnmounted, h, nextTick, createVNode, resolveComponent, openBlock, createElementBlock, createBlock, renderSlot, withCtx, ref, normalizeStyle, createCommentVNode, provide, onBeforeUnmount, toDisplayString, Fragment, renderList, createElementVNode, normalizeClass, pushScopeId, popScopeId, createSlots, resolveDynamicComponent, mergeProps, withModifiers, withDirectives, vShow } from "vue";
4
4
  import { throttle, init, use, registerMap } from "echarts/core";
@@ -2822,7 +2822,9 @@ const _sfc_main$n = defineComponent({
2822
2822
  const v = (_a2 = variable == null ? void 0 : variable.slice(1, variable.length - 1)) == null ? void 0 : _a2.trim();
2823
2823
  let usedVariable = data[v];
2824
2824
  if (usedVariable != null) {
2825
- if (props2.format === "percentage") {
2825
+ const format = props2.format;
2826
+ console.log("format", format);
2827
+ if (format === "percentage") {
2826
2828
  usedVariable = +usedVariable;
2827
2829
  if (!isNaN(usedVariable)) {
2828
2830
  usedVariable = (usedVariable * 100).toFixed(2);
@@ -2834,6 +2836,13 @@ const _sfc_main$n = defineComponent({
2834
2836
  } else {
2835
2837
  text = text.replace(variable, `<span style="color:${props2.variableColor};font-size:${props2.variableFontSize}">${0}%</span>`);
2836
2838
  }
2839
+ } else if (format === "percent") {
2840
+ console.log("format", format);
2841
+ usedVariable = +usedVariable;
2842
+ if (!isNaN(usedVariable)) {
2843
+ usedVariable = (usedVariable * 100).toFixed(2);
2844
+ text = text.replace(variable, `<span style="color:${props2.variableColor};font-size:${props2.variableFontSize}">${usedVariable}%</span>`);
2845
+ }
2837
2846
  } else if (props2.format === "money") {
2838
2847
  usedVariable = +usedVariable;
2839
2848
  if (!isNaN(usedVariable)) {
@@ -2916,7 +2925,7 @@ const _sfc_main$n = defineComponent({
2916
2925
  };
2917
2926
  }
2918
2927
  });
2919
- const Text_vue_vue_type_style_index_0_scoped_860fa6ea_lang = "";
2928
+ const Text_vue_vue_type_style_index_0_scoped_0a5690c3_lang = "";
2920
2929
  const _hoisted_1$8 = ["innerHTML"];
2921
2930
  function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2922
2931
  const _component_skeleton = resolveComponent("skeleton");
@@ -2934,7 +2943,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2934
2943
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.click && _ctx.click(...args))
2935
2944
  }, null, 12, _hoisted_1$8));
2936
2945
  }
2937
- const Text = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-860fa6ea"]]);
2946
+ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-0a5690c3"]]);
2938
2947
  const EcanText = withInstall(Text);
2939
2948
  const _sfc_main$m = defineComponent({
2940
2949
  name: "EcanScrollText",