@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.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @ecan-bi/datav@1.1.2 */
1
+ /*! @ecan-bi/datav@1.1.4 */
2
2
  (function(global, factory) {
3
3
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("echarts/core"), require("resize-detector"), require("ant-design-vue"), require("ant-design-vue/es/spin/style"), require("ant-design-vue/es/skeleton/style"), require("lodash-es"), require("axios"), require("mitt"), require("dayjs"), require("ant-design-vue/es/progress/style"), require("ant-design-vue/es/input/style"), require("ant-design-vue/es/date-picker/style"), require("ant-design-vue/es/date-picker/locale/zh_CN"), require("ant-design-vue/es/select/style"), require("ant-design-vue/es/button/style"), require("ant-design-vue/es/checkbox/style"), require("echarts/renderers"), require("echarts/charts"), require("echarts/components"), require("echarts"), require("ant-design-vue/es/modal/style"), require("ant-design-vue/es/table/style")) : typeof define === "function" && define.amd ? define(["exports", "vue", "echarts/core", "resize-detector", "ant-design-vue", "ant-design-vue/es/spin/style", "ant-design-vue/es/skeleton/style", "lodash-es", "axios", "mitt", "dayjs", "ant-design-vue/es/progress/style", "ant-design-vue/es/input/style", "ant-design-vue/es/date-picker/style", "ant-design-vue/es/date-picker/locale/zh_CN", "ant-design-vue/es/select/style", "ant-design-vue/es/button/style", "ant-design-vue/es/checkbox/style", "echarts/renderers", "echarts/charts", "echarts/components", "echarts", "ant-design-vue/es/modal/style", "ant-design-vue/es/table/style"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["@ecan/bi-datav"] = {}, global.vue, global["echarts/core"], global["resize-detector"], global["ant-design-vue"], null, null, global["lodash-es"], global.axios, global.mitt, global.dayjs, null, null, null, global["ant-design-vue/es/date-picker/locale/zh_CN"], null, null, null, global["echarts/renderers"], global["echarts/charts"], global["echarts/components"], global.echarts));
4
4
  })(this, function(exports2, vue, core, resizeDetector, antDesignVue, style$1, style$2, lodashEs, axios, mitt, dayjs, style$3, style$4, style$5, locale, style$6, style$7, style$8, renderers, charts, components$1, echarts) {
@@ -2827,7 +2827,9 @@
2827
2827
  const v = (_a2 = variable == null ? void 0 : variable.slice(1, variable.length - 1)) == null ? void 0 : _a2.trim();
2828
2828
  let usedVariable = data[v];
2829
2829
  if (usedVariable != null) {
2830
- if (props2.format === "percentage") {
2830
+ const format = props2.format;
2831
+ console.log("format", format);
2832
+ if (format === "percentage") {
2831
2833
  usedVariable = +usedVariable;
2832
2834
  if (!isNaN(usedVariable)) {
2833
2835
  usedVariable = (usedVariable * 100).toFixed(2);
@@ -2839,6 +2841,13 @@
2839
2841
  } else {
2840
2842
  text = text.replace(variable, `<span style="color:${props2.variableColor};font-size:${props2.variableFontSize}">${0}%</span>`);
2841
2843
  }
2844
+ } else if (format === "percent") {
2845
+ console.log("format", format);
2846
+ usedVariable = +usedVariable;
2847
+ if (!isNaN(usedVariable)) {
2848
+ usedVariable = (usedVariable * 100).toFixed(2);
2849
+ text = text.replace(variable, `<span style="color:${props2.variableColor};font-size:${props2.variableFontSize}">${usedVariable}%</span>`);
2850
+ }
2842
2851
  } else if (props2.format === "money") {
2843
2852
  usedVariable = +usedVariable;
2844
2853
  if (!isNaN(usedVariable)) {
@@ -2921,7 +2930,7 @@
2921
2930
  };
2922
2931
  }
2923
2932
  });
2924
- const Text_vue_vue_type_style_index_0_scoped_860fa6ea_lang = "";
2933
+ const Text_vue_vue_type_style_index_0_scoped_0a5690c3_lang = "";
2925
2934
  const _hoisted_1$8 = ["innerHTML"];
2926
2935
  function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2927
2936
  const _component_skeleton = vue.resolveComponent("skeleton");
@@ -2939,7 +2948,7 @@
2939
2948
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.click && _ctx.click(...args))
2940
2949
  }, null, 12, _hoisted_1$8));
2941
2950
  }
2942
- const Text = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-860fa6ea"]]);
2951
+ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$n], ["__scopeId", "data-v-0a5690c3"]]);
2943
2952
  const EcanText = withInstall(Text);
2944
2953
  const _sfc_main$m = vue.defineComponent({
2945
2954
  name: "EcanScrollText",