@ecan-bi/datav 1.0.85 → 1.0.86

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.85 */
1
+ /*! @ecan-bi/datav@1.0.86 */
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";
@@ -1720,15 +1720,10 @@ const useRequestData = (props2, callBack = () => {
1720
1720
  } else {
1721
1721
  if (Object.prototype.toString.call(p) === "[object Object]") {
1722
1722
  v = p[propKey || "value"];
1723
- } else if (Array.isArray(p)) {
1724
- v = p.join(",");
1725
1723
  } else {
1726
1724
  v = p;
1727
1725
  }
1728
- console.log(p);
1729
- console.log("v", v);
1730
1726
  }
1731
- console.log("v", v);
1732
1727
  _params[key] = v;
1733
1728
  } else if (typeof value === "string") {
1734
1729
  _params[key] = useVariablesInText(value);
@@ -3477,8 +3472,7 @@ const datePickerProps = {
3477
3472
  };
3478
3473
  const datePickerComponentProps = transformToComponentProps(datePickerProps);
3479
3474
  const datePickerEvents = ["dateChange"];
3480
- const DatePicker_vue_vue_type_style_index_0_scoped_true_lang = "";
3481
- const DatePicker_vue_vue_type_style_index_1_lang = "";
3475
+ const DatePicker_vue_vue_type_style_index_0_lang = "";
3482
3476
  const _sfc_main$g = defineComponent({
3483
3477
  name: "EcanDatePicker",
3484
3478
  props: {
@@ -3490,7 +3484,12 @@ const _sfc_main$g = defineComponent({
3490
3484
  setup(props2) {
3491
3485
  const style2 = usePickComponentStyle(props2);
3492
3486
  const getPopupContainer = () => document.getElementById("ProviderConfig") || document.body;
3493
- const myValue = computed(() => props2.value ? dayjs(props2.value) : null);
3487
+ const myValue = ref(null);
3488
+ watch(() => props2.value, () => {
3489
+ myValue.value = props2.value ? dayjs(props2.value) : null;
3490
+ }, {
3491
+ immediate: true
3492
+ });
3494
3493
  const { setGlobalModel } = inject(GLOBAL_MODEL, {
3495
3494
  setGlobalModel: (key, value) => void 0
3496
3495
  });
@@ -3534,7 +3533,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
3534
3533
  }, null, 8, ["value", "format", "picker", "showTime", "locale", "onChange", "getPopupContainer"])
3535
3534
  ], 4);
3536
3535
  }
3537
- const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g], ["__scopeId", "data-v-6e240054"]]);
3536
+ const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g]]);
3538
3537
  const EcanDatePicker = withInstall(DatePicker);
3539
3538
  const selectProps = {
3540
3539
  ...props,
@@ -3853,7 +3852,8 @@ const _sfc_main$c = defineComponent({
3853
3852
  const style2 = usePickComponentStyle(props2);
3854
3853
  const myOption = ref([]);
3855
3854
  const myValue = ref([]);
3856
- watch(() => [props2.data, props2.value], ([data, value]) => {
3855
+ const handleDataAndOption = (data) => {
3856
+ const value = props2.value;
3857
3857
  let _value = [];
3858
3858
  data.forEach((item) => {
3859
3859
  if (item.checked) {
@@ -3867,6 +3867,9 @@ const _sfc_main$c = defineComponent({
3867
3867
  }
3868
3868
  myOption.value = data;
3869
3869
  myValue.value = _value;
3870
+ };
3871
+ watch(() => [props2.data, props2.value], ([data]) => {
3872
+ handleDataAndOption(data);
3870
3873
  }, {
3871
3874
  immediate: true,
3872
3875
  deep: true
@@ -3881,20 +3884,7 @@ const _sfc_main$c = defineComponent({
3881
3884
  return;
3882
3885
  const res = await requestData();
3883
3886
  const data = ((_b2 = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) || [];
3884
- const value = props2.value;
3885
- let _value = [];
3886
- data.forEach((item) => {
3887
- if (item.checked) {
3888
- _value.push(item.value);
3889
- }
3890
- });
3891
- if (typeof value === "string" && value !== "") {
3892
- _value = _value.concat(value.split(","));
3893
- } else if (Array.isArray(value)) {
3894
- _value = _value.concat(value);
3895
- }
3896
- myOption.value = data;
3897
- myValue.value = _value;
3887
+ handleDataAndOption(data);
3898
3888
  };
3899
3889
  const id = props2.id;
3900
3890
  const { getGlobalModel, setGlobalModel } = inject(GLOBAL_MODEL, {