@ecan-bi/datav 1.0.44 → 1.0.47

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
@@ -1629,7 +1629,7 @@ const lowerCaseIncludes = (v1, v2) => {
1629
1629
  const useVariablesInText = (text, data = {}) => {
1630
1630
  const config2 = window.config || {};
1631
1631
  data = __spreadValues(__spreadValues({}, config2), data);
1632
- const variables = text.match(/\{.*?\}/g);
1632
+ const variables = text.match(/\{\w*\}/g);
1633
1633
  if (variables == null || variables.length === 0)
1634
1634
  return text;
1635
1635
  for (let i = 0; i < variables.length; i++) {
@@ -2618,9 +2618,10 @@ const _sfc_main$n = defineComponent({
2618
2618
  const requestFnList = requestModelArr[i][1];
2619
2619
  await handleRequestFnList(requestFnList);
2620
2620
  }
2621
- requestModel.clear();
2622
2621
  } catch (e) {
2623
2622
  console.error(e);
2623
+ } finally {
2624
+ requestModel.clear();
2624
2625
  }
2625
2626
  };
2626
2627
  provide(REQUEST_MODEL, {
@@ -2695,7 +2696,7 @@ const textProps = __spreadProps(__spreadValues({}, props), {
2695
2696
  });
2696
2697
  const textComponentProps = transformToComponentProps(textProps);
2697
2698
  const textEvents = ["refreshData", "click"];
2698
- var Text_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".skeleton-wrapper[data-v-e7487804] {\n overflow: hidden;\n}\n.ecan-text[data-v-e7487804] {\n overflow: hidden;\n display: flex;\n}\n")();
2699
+ var Text_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".skeleton-wrapper[data-v-9526cadc] {\n overflow: hidden;\n}\n.ecan-text[data-v-9526cadc] {\n overflow: hidden;\n display: flex;\n}\n")();
2699
2700
  const _sfc_main$l = defineComponent({
2700
2701
  name: "EcanText",
2701
2702
  components: { Skeleton },
@@ -2706,7 +2707,7 @@ const _sfc_main$l = defineComponent({
2706
2707
  const myText = computed(() => {
2707
2708
  let text = props2.text;
2708
2709
  const data = unref(myData);
2709
- const variables = text.match(/\{.*?\}/g);
2710
+ const variables = text.match(/\{\w*\}/g);
2710
2711
  if (variables == null || variables.length === 0)
2711
2712
  return text;
2712
2713
  for (let i = 0; i < variables.length; i++) {
@@ -2781,7 +2782,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
2781
2782
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.click && _ctx.click(...args))
2782
2783
  }, null, 12, _hoisted_1$6));
2783
2784
  }
2784
- var Text = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-e7487804"]]);
2785
+ var Text = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-9526cadc"]]);
2785
2786
  const EcanText = withInstall(Text);
2786
2787
  var ScrollText_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".red[data-v-0bb717eb] {\n color: red;\n}\n")();
2787
2788
  const _sfc_main$k = defineComponent({
@@ -3207,7 +3208,7 @@ const proportionProps = __spreadProps(__spreadValues({}, props), {
3207
3208
  });
3208
3209
  const proportionComponentProps = transformToComponentProps(proportionProps);
3209
3210
  const proportionEvents = ["refreshData", "click"];
3210
- var Proportion_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".ecan-proportion[data-v-02b500fa] {\n overflow: hidden;\n}\n.progress[data-v-02b500fa] {\n width: 100%;\n height: 100%;\n}\n.format[data-v-02b500fa] {\n margin: 0 auto;\n}\n")();
3211
+ var Proportion_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".ecan-proportion[data-v-8be86ed2] {\n overflow: hidden;\n}\n.progress[data-v-8be86ed2] {\n width: 100%;\n height: 100%;\n}\n.format[data-v-8be86ed2] {\n margin: 0 auto;\n}\n")();
3211
3212
  const _sfc_main$h = defineComponent({
3212
3213
  name: "EcanProportion",
3213
3214
  components: {
@@ -3239,7 +3240,7 @@ const _sfc_main$h = defineComponent({
3239
3240
  var _a2;
3240
3241
  let text2 = props2.text;
3241
3242
  const data = unref(myData);
3242
- const variables = text2.match(/\{.*?\}/g) || [];
3243
+ const variables = text2.match(/\{\w*\}/g) || [];
3243
3244
  if (text2 === "")
3244
3245
  return unref(value) + "%";
3245
3246
  for (let i = 0; i < variables.length; i++) {
@@ -3268,6 +3269,7 @@ const _sfc_main$h = defineComponent({
3268
3269
  var _a2;
3269
3270
  if (props2.dataType !== "request" || unref(pageMode) === "design")
3270
3271
  return;
3272
+ console.log("\u8BF7\u6C42");
3271
3273
  try {
3272
3274
  loading.value = true;
3273
3275
  const res = await requestData();
@@ -3340,7 +3342,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
3340
3342
  }, 8, ["percent", "width", "type", "strokeColor", "strokeLinecap", "trailColor", "strokeWidth", "gapDegree", "onClick"])
3341
3343
  ], 4);
3342
3344
  }
3343
- var Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-02b500fa"]]);
3345
+ var Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-8be86ed2"]]);
3344
3346
  const EcanProportion = withInstall(Proportion);
3345
3347
  const inputProps = __spreadProps(__spreadValues({}, props), {
3346
3348
  width: "200px",
@@ -3696,6 +3698,7 @@ const tabsProps = __spreadProps(__spreadValues({}, props), {
3696
3698
  name: "\u6807\u7B7E\u9875",
3697
3699
  keyName: "\u6807\u7B7E\u9875",
3698
3700
  width: "200px",
3701
+ height: "400px",
3699
3702
  tabFontSize: "14px",
3700
3703
  backgroundColor: "",
3701
3704
  activeTabColor: "#1890ff",
@@ -3703,7 +3706,6 @@ const tabsProps = __spreadProps(__spreadValues({}, props), {
3703
3706
  activeTabBackgroundImage: "",
3704
3707
  tabColor: "#333",
3705
3708
  tabBarGutter: "0px",
3706
- tabHeight: "30px",
3707
3709
  value: "",
3708
3710
  activeKey: 0,
3709
3711
  contains: [],
@@ -3721,7 +3723,7 @@ const tabsProps = __spreadProps(__spreadValues({}, props), {
3721
3723
  });
3722
3724
  const tabsComponentProps = transformToComponentProps(tabsProps);
3723
3725
  const tabsEvents = ["tabChange"];
3724
- var Tabs_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".ecan-tabs[data-v-27b19b45] {\n display: flex;\n flex-direction: column;\n width: 100%;\n}\n.tabs-header[data-v-27b19b45] {\n color: #333333;\n display: flex;\n width: 100%;\n}\n.tab[data-v-27b19b45] {\n display: flex;\n flex: 1;\n justify-content: center;\n align-items: center;\n background-size: 100% 100%;\n background-repeat: no-repeat;\n}\n.tab[data-v-27b19b45]:last-child {\n margin-right: 0 !important;\n}\n.tabs-content[data-v-27b19b45] {\n flex: 1;\n}\n")();
3726
+ var Tabs_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".ecan-tabs[data-v-55d33fb6] {\n display: flex;\n flex-direction: column;\n}\n.tabs-header[data-v-55d33fb6] {\n color: #333333;\n display: flex;\n width: 100%;\n}\n.tab[data-v-55d33fb6] {\n background-size: 100% 100%;\n background-repeat: no-repeat;\n padding: 0 12px;\n cursor: default;\n}\n.tab-inner[data-v-55d33fb6] {\n padding: 12px 0;\n}\n.tab[data-v-55d33fb6]:last-child {\n margin-right: 0 !important;\n}\n.tabs-content[data-v-55d33fb6] {\n flex: 1;\n}\n")();
3725
3727
  const _sfc_main$b = defineComponent({
3726
3728
  name: "EcanTabs",
3727
3729
  props: __spreadValues({}, tabsComponentProps),
@@ -3734,7 +3736,13 @@ const _sfc_main$b = defineComponent({
3734
3736
  }, {
3735
3737
  immediate: true
3736
3738
  });
3737
- const myData = ref(props2.data);
3739
+ const myData = ref([]);
3740
+ watch(() => props2.data, (data) => {
3741
+ myData.value = data;
3742
+ }, {
3743
+ immediate: true,
3744
+ deep: true
3745
+ });
3738
3746
  const isActive = (index2) => activeKey.value === index2;
3739
3747
  const myValue = ref(props2.value || unref(myData)[0] && ((_a2 = unref(myData)[0]) == null ? void 0 : _a2.value) || "");
3740
3748
  const events = props2.events;
@@ -3769,7 +3777,7 @@ const _sfc_main$b = defineComponent({
3769
3777
  };
3770
3778
  }
3771
3779
  });
3772
- const _withScopeId$1 = (n) => (pushScopeId("data-v-27b19b45"), n = n(), popScopeId(), n);
3780
+ const _withScopeId$1 = (n) => (pushScopeId("data-v-55d33fb6"), n = n(), popScopeId(), n);
3773
3781
  const _hoisted_1$3 = ["onClick"];
3774
3782
  const _hoisted_2$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "tabs-content" }, null, -1));
3775
3783
  function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
@@ -3789,18 +3797,24 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
3789
3797
  style: normalizeStyle({
3790
3798
  color: _ctx.isActive(index2) ? _ctx.activeTabColor : _ctx.tabColor,
3791
3799
  backgroundImage: _ctx.isActive(index2) ? _ctx.useImagePath(_ctx.activeTabBackgroundImage, true) : _ctx.useImagePath(_ctx.tabBackgroundImage, true),
3792
- marginRight: _ctx.tabBarGutter,
3793
- height: _ctx.tabHeight
3800
+ marginRight: _ctx.tabBarGutter
3794
3801
  }),
3795
3802
  key: index2,
3796
- onClick: withModifiers(($event) => _ctx.tabChange(tab, index2), ["stop"])
3797
- }, toDisplayString(tab.title), 13, _hoisted_1$3);
3803
+ onClick: withModifiers(($event) => _ctx.tabChange(tab, index2), ["prevent", "stop"])
3804
+ }, [
3805
+ createElementVNode("div", {
3806
+ class: "tab-inner",
3807
+ style: normalizeStyle({
3808
+ borderBottom: `1px solid ${_ctx.isActive(index2) ? _ctx.activeTabColor : "transparent"}`
3809
+ })
3810
+ }, toDisplayString(tab.title), 5)
3811
+ ], 12, _hoisted_1$3);
3798
3812
  }), 128))
3799
3813
  ], 4),
3800
3814
  _hoisted_2$1
3801
3815
  ], 4);
3802
3816
  }
3803
- var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-27b19b45"]]);
3817
+ var Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-55d33fb6"]]);
3804
3818
  const EcanTabs = withInstall(Tabs);
3805
3819
  const pieProps = __spreadProps(__spreadValues({}, props), {
3806
3820
  id: "",