@ecan-bi/datav 1.0.81 → 1.0.83

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.0.81 */
1
+ /*! @ecan-bi/datav@1.0.83 */
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) {
@@ -1718,13 +1718,22 @@
1718
1718
  record = getGlobalModel(id) || {};
1719
1719
  }
1720
1720
  const p = vue.unref(record[prop]);
1721
- const isNeedFormat = ["date", "range"].some((item) => lowerCaseIncludes(record == null ? void 0 : record.type, item));
1722
1721
  let v = "";
1722
+ const isNeedFormat = ["date", "range"].some((item) => lowerCaseIncludes(record == null ? void 0 : record.type, item));
1723
1723
  if (isNeedFormat) {
1724
1724
  v = ((_a2 = vue.unref(p)) == null ? void 0 : _a2.format((propKey == null ? void 0 : propKey.trim()) || record.format)) || "";
1725
1725
  } else {
1726
- v = p != null && typeof p === "object" ? p[propKey || "value"] : p;
1726
+ if (Object.prototype.toString.call(p) === "[object Object]") {
1727
+ v = p[propKey || "value"];
1728
+ } else if (Array.isArray(p)) {
1729
+ v = p.join(",");
1730
+ } else {
1731
+ v = p;
1732
+ }
1733
+ console.log(p);
1734
+ console.log("v", v);
1727
1735
  }
1736
+ console.log("v", v);
1728
1737
  _params[key] = v;
1729
1738
  } else if (typeof value === "string") {
1730
1739
  _params[key] = useVariablesInText(value);
@@ -3570,9 +3579,17 @@
3570
3579
  const myValue = vue.ref(props2.value || props2.data[0]);
3571
3580
  const dataFieldNames = props2.dataFieldNames;
3572
3581
  const filterOption = (input, option) => {
3573
- var _a2;
3574
3582
  const labelKey = dataFieldNames.label;
3575
- return ((_a2 = option[labelKey]) == null ? void 0 : _a2.toLowerCase().indexOf(input == null ? void 0 : input.toLowerCase())) >= 0;
3583
+ const valueKey = dataFieldNames.value;
3584
+ let value;
3585
+ const labelValue = option[labelKey];
3586
+ const valueValue = option[valueKey];
3587
+ if (labelValue != null) {
3588
+ value = labelValue;
3589
+ } else if (valueValue != null) {
3590
+ value = valueValue;
3591
+ }
3592
+ return !!((value == null ? void 0 : value.toLowerCase().indexOf(input == null ? void 0 : input.toLowerCase())) >= 0);
3576
3593
  };
3577
3594
  const handleRequestData = async () => {
3578
3595
  var _a2, _b2;
@@ -3635,7 +3652,7 @@
3635
3652
  }, null, 8, ["value", "options", "getPopupContainer", "field-names", "filter-option", "onChange"])
3636
3653
  ], 4);
3637
3654
  }
3638
- const Select = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-0a8df5d2"]]);
3655
+ const Select = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$f], ["__scopeId", "data-v-5e92066a"]]);
3639
3656
  const EcanSelect = withInstall(Select);
3640
3657
  const rangePickerProps = {
3641
3658
  ...props,
@@ -3819,7 +3836,7 @@
3819
3836
  keyName: "\u590D\u9009\u6846",
3820
3837
  rotate: "",
3821
3838
  type: "ecanCheckbox",
3822
- value: "",
3839
+ value: [],
3823
3840
  data: [
3824
3841
  { label: "\u9009\u9879\u4E00", value: "1", checked: true },
3825
3842
  { label: "\u9009\u9879\u4E8C", value: "2", checked: true },
@@ -3841,15 +3858,20 @@
3841
3858
  const style2 = usePickComponentStyle(props2);
3842
3859
  const myOption = vue.ref([]);
3843
3860
  const myValue = vue.ref([]);
3844
- vue.watch(() => props2.data, (data) => {
3845
- const value = [];
3861
+ vue.watch(() => [props2.data, props2.value], ([data, value]) => {
3862
+ let _value = [];
3846
3863
  data.forEach((item) => {
3847
3864
  if (item.checked) {
3848
- value.push(item.value);
3865
+ _value.push(item.value);
3849
3866
  }
3850
3867
  });
3868
+ if (typeof value === "string" && value !== "") {
3869
+ _value = _value.concat(value.split(","));
3870
+ } else if (Array.isArray(value)) {
3871
+ _value = _value.concat(value);
3872
+ }
3851
3873
  myOption.value = data;
3852
- myValue.value = value;
3874
+ myValue.value = _value;
3853
3875
  }, {
3854
3876
  immediate: true,
3855
3877
  deep: true