@ecan-bi/datav 1.0.89 → 1.0.90

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.0.89 */
1
+ /*! @ecan-bi/datav@1.0.90 */
2
2
  var _a, _b, _c;
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, 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";
@@ -1698,7 +1698,6 @@ const useVariablesInText = (formatter = "", data = {}, { useNewline = false, use
1698
1698
  if (useSpace) {
1699
1699
  formatter = formatter == null ? void 0 : formatter.replace(/\s{2,}?/g, "  ");
1700
1700
  }
1701
- console.log("formatter", formatter);
1702
1701
  return formatter;
1703
1702
  };
1704
1703
  const useRequestData = (props2, callBack = () => {
@@ -3637,15 +3636,23 @@ const _sfc_main$f = defineComponent({
3637
3636
  }
3638
3637
  return !!((value == null ? void 0 : value.toLowerCase().indexOf(input == null ? void 0 : input.toLowerCase())) >= 0);
3639
3638
  };
3639
+ const loading = ref(false);
3640
3640
  const handleRequestData = async () => {
3641
3641
  var _a2, _b2;
3642
3642
  if (props2.dataType !== "request" || unref(pageMode) === "design")
3643
3643
  return;
3644
- const res = await requestData();
3645
- options.value = ((_b2 = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) || [];
3646
- const firstOption = unref(options)[0];
3647
- if (props2.value === "" && firstOption != null) {
3648
- myValue.value = firstOption[dataFieldNames.value];
3644
+ loading.value = true;
3645
+ try {
3646
+ const res = await requestData();
3647
+ options.value = ((_b2 = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) || [];
3648
+ const firstOption = unref(options)[0];
3649
+ if (props2.value === "" && firstOption != null) {
3650
+ myValue.value = firstOption[dataFieldNames.value];
3651
+ }
3652
+ } catch (e) {
3653
+ console.error(e);
3654
+ } finally {
3655
+ loading.value = false;
3649
3656
  }
3650
3657
  };
3651
3658
  const { getGlobalModel, setGlobalModel } = inject(GLOBAL_MODEL, {
@@ -3675,7 +3682,8 @@ const _sfc_main$f = defineComponent({
3675
3682
  myValue,
3676
3683
  selectChange,
3677
3684
  options,
3678
- filterOption
3685
+ filterOption,
3686
+ loading
3679
3687
  };
3680
3688
  }
3681
3689
  });
@@ -3694,11 +3702,12 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
3694
3702
  "field-names": _ctx.dataFieldNames,
3695
3703
  "show-search": "",
3696
3704
  "filter-option": _ctx.filterOption,
3697
- onChange: _ctx.selectChange
3698
- }, null, 8, ["value", "options", "getPopupContainer", "field-names", "filter-option", "onChange"])
3705
+ onChange: _ctx.selectChange,
3706
+ loading: _ctx.loading
3707
+ }, null, 8, ["value", "options", "getPopupContainer", "field-names", "filter-option", "onChange", "loading"])
3699
3708
  ], 4);
3700
3709
  }
3701
- const Select = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-38e47a34"]]);
3710
+ const Select = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-7ae9493f"]]);
3702
3711
  const EcanSelect = withInstall(Select);
3703
3712
  const rangePickerProps = {
3704
3713
  ...props,
@@ -6569,9 +6578,11 @@ const tableProps = {
6569
6578
  width: "400px",
6570
6579
  height: "240px",
6571
6580
  bordered: false,
6581
+ headerFontSize: "14px",
6572
6582
  fontSize: "14px",
6573
6583
  isUseSeq: false,
6574
6584
  size: "default",
6585
+ headerFontWeight: 400,
6575
6586
  fontWeight: 400,
6576
6587
  columnsFixedNum: 0,
6577
6588
  scrollX: 0,
@@ -6747,7 +6758,8 @@ const _sfc_main$1 = defineComponent({
6747
6758
  const _columns = [{
6748
6759
  title: firstColumns.title,
6749
6760
  dataIndex: "col0",
6750
- key: "col0"
6761
+ key: "col0",
6762
+ align: "center"
6751
6763
  }];
6752
6764
  for (let i = 0; i < dataSource.length; i++) {
6753
6765
  const data = dataSource[i];
@@ -6755,7 +6767,8 @@ const _sfc_main$1 = defineComponent({
6755
6767
  _columns.push({
6756
6768
  title: data[firstColumns.dataIndex],
6757
6769
  dataIndex,
6758
- key: dataIndex
6770
+ key: dataIndex,
6771
+ align: "center"
6759
6772
  });
6760
6773
  }
6761
6774
  const _dataSource = [];
@@ -7038,6 +7051,14 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7038
7051
  pagination: _ctx.pagination,
7039
7052
  onChange: _ctx.tableChange
7040
7053
  }, {
7054
+ headerCell: withCtx(({ column }) => [
7055
+ createElementVNode("span", {
7056
+ style: normalizeStyle({
7057
+ fontSize: _ctx.headerFontSize,
7058
+ fontWeight: _ctx.headerFontWeight
7059
+ })
7060
+ }, toDisplayString(column.title), 5)
7061
+ ]),
7041
7062
  bodyCell: withCtx(({ column, index: index2, text, record }) => [
7042
7063
  column.dataIndex === "SEQ" ? (openBlock(), createElementBlock("span", {
7043
7064
  key: 0,
@@ -7110,7 +7131,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
7110
7131
  }, 8, ["loading"])
7111
7132
  ], 4);
7112
7133
  }
7113
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-48569fe8"]]);
7134
+ const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-32101ced"]]);
7114
7135
  const EcanTable = withInstall(Table);
7115
7136
  const mapProps = {
7116
7137
  ...props,