@ecan-bi/datav 1.0.85 → 1.0.87
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 +30 -34
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +30 -34
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/types/control/date-picker/DatePicker.vue.d.ts +59 -1
- package/types/control/date-picker/index.d.ts +59 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.0.
|
|
1
|
+
/*! @ecan-bi/datav@1.0.87 */
|
|
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) {
|
|
@@ -1725,15 +1725,10 @@
|
|
|
1725
1725
|
} else {
|
|
1726
1726
|
if (Object.prototype.toString.call(p) === "[object Object]") {
|
|
1727
1727
|
v = p[propKey || "value"];
|
|
1728
|
-
} else if (Array.isArray(p)) {
|
|
1729
|
-
v = p.join(",");
|
|
1730
1728
|
} else {
|
|
1731
1729
|
v = p;
|
|
1732
1730
|
}
|
|
1733
|
-
console.log(p);
|
|
1734
|
-
console.log("v", v);
|
|
1735
1731
|
}
|
|
1736
|
-
console.log("v", v);
|
|
1737
1732
|
_params[key] = v;
|
|
1738
1733
|
} else if (typeof value === "string") {
|
|
1739
1734
|
_params[key] = useVariablesInText(value);
|
|
@@ -2223,23 +2218,29 @@
|
|
|
2223
2218
|
if (formatter == null)
|
|
2224
2219
|
return value;
|
|
2225
2220
|
const variables = formatter.match(/\{.*\}/g);
|
|
2226
|
-
if (variables == null || variables.length === 0)
|
|
2221
|
+
if (variables == null || variables.length === 0) {
|
|
2227
2222
|
return value;
|
|
2223
|
+
}
|
|
2228
2224
|
for (let i = 0; i < variables.length; i++) {
|
|
2229
2225
|
const variable = variables[i];
|
|
2230
2226
|
if (variable == null || variable === "")
|
|
2231
2227
|
break;
|
|
2232
2228
|
let statement = variable.slice(1, -1);
|
|
2233
2229
|
statement = statement == null ? void 0 : statement.replace(/value/g, value);
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
result =
|
|
2230
|
+
if (/[+\-*/%]+/g.test(value)) {
|
|
2231
|
+
formatter = formatter.replace(variable, statement);
|
|
2232
|
+
} else {
|
|
2233
|
+
try {
|
|
2234
|
+
let result = statement;
|
|
2235
|
+
if (/[+\-*/%]+/g.test(statement)) {
|
|
2236
|
+
const eval2 = eval;
|
|
2237
|
+
result = eval2(statement);
|
|
2238
|
+
}
|
|
2239
|
+
formatter = formatter.replace(variable, result);
|
|
2240
|
+
} catch (e) {
|
|
2241
|
+
console.error(e);
|
|
2242
|
+
return value;
|
|
2239
2243
|
}
|
|
2240
|
-
formatter = formatter.replace(variable, result);
|
|
2241
|
-
} catch (e) {
|
|
2242
|
-
console.error(e);
|
|
2243
2244
|
}
|
|
2244
2245
|
}
|
|
2245
2246
|
return formatter;
|
|
@@ -3482,8 +3483,7 @@
|
|
|
3482
3483
|
};
|
|
3483
3484
|
const datePickerComponentProps = transformToComponentProps(datePickerProps);
|
|
3484
3485
|
const datePickerEvents = ["dateChange"];
|
|
3485
|
-
const
|
|
3486
|
-
const DatePicker_vue_vue_type_style_index_1_lang = "";
|
|
3486
|
+
const DatePicker_vue_vue_type_style_index_0_lang = "";
|
|
3487
3487
|
const _sfc_main$g = vue.defineComponent({
|
|
3488
3488
|
name: "EcanDatePicker",
|
|
3489
3489
|
props: {
|
|
@@ -3495,7 +3495,12 @@
|
|
|
3495
3495
|
setup(props2) {
|
|
3496
3496
|
const style2 = usePickComponentStyle(props2);
|
|
3497
3497
|
const getPopupContainer = () => document.getElementById("ProviderConfig") || document.body;
|
|
3498
|
-
const myValue = vue.
|
|
3498
|
+
const myValue = vue.ref(null);
|
|
3499
|
+
vue.watch(() => props2.value, () => {
|
|
3500
|
+
myValue.value = props2.value ? dayjs__default.default(props2.value) : null;
|
|
3501
|
+
}, {
|
|
3502
|
+
immediate: true
|
|
3503
|
+
});
|
|
3499
3504
|
const { setGlobalModel } = vue.inject(GLOBAL_MODEL, {
|
|
3500
3505
|
setGlobalModel: (key, value) => void 0
|
|
3501
3506
|
});
|
|
@@ -3539,7 +3544,7 @@
|
|
|
3539
3544
|
}, null, 8, ["value", "format", "picker", "showTime", "locale", "onChange", "getPopupContainer"])
|
|
3540
3545
|
], 4);
|
|
3541
3546
|
}
|
|
3542
|
-
const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g]
|
|
3547
|
+
const DatePicker = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$g]]);
|
|
3543
3548
|
const EcanDatePicker = withInstall(DatePicker);
|
|
3544
3549
|
const selectProps = {
|
|
3545
3550
|
...props,
|
|
@@ -3858,7 +3863,8 @@
|
|
|
3858
3863
|
const style2 = usePickComponentStyle(props2);
|
|
3859
3864
|
const myOption = vue.ref([]);
|
|
3860
3865
|
const myValue = vue.ref([]);
|
|
3861
|
-
|
|
3866
|
+
const handleDataAndOption = (data) => {
|
|
3867
|
+
const value = props2.value;
|
|
3862
3868
|
let _value = [];
|
|
3863
3869
|
data.forEach((item) => {
|
|
3864
3870
|
if (item.checked) {
|
|
@@ -3872,6 +3878,9 @@
|
|
|
3872
3878
|
}
|
|
3873
3879
|
myOption.value = data;
|
|
3874
3880
|
myValue.value = _value;
|
|
3881
|
+
};
|
|
3882
|
+
vue.watch(() => [props2.data, props2.value], ([data]) => {
|
|
3883
|
+
handleDataAndOption(data);
|
|
3875
3884
|
}, {
|
|
3876
3885
|
immediate: true,
|
|
3877
3886
|
deep: true
|
|
@@ -3886,20 +3895,7 @@
|
|
|
3886
3895
|
return;
|
|
3887
3896
|
const res = await requestData();
|
|
3888
3897
|
const data = ((_b2 = (_a2 = res == null ? void 0 : res.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) || [];
|
|
3889
|
-
|
|
3890
|
-
let _value = [];
|
|
3891
|
-
data.forEach((item) => {
|
|
3892
|
-
if (item.checked) {
|
|
3893
|
-
_value.push(item.value);
|
|
3894
|
-
}
|
|
3895
|
-
});
|
|
3896
|
-
if (typeof value === "string" && value !== "") {
|
|
3897
|
-
_value = _value.concat(value.split(","));
|
|
3898
|
-
} else if (Array.isArray(value)) {
|
|
3899
|
-
_value = _value.concat(value);
|
|
3900
|
-
}
|
|
3901
|
-
myOption.value = data;
|
|
3902
|
-
myValue.value = _value;
|
|
3898
|
+
handleDataAndOption(data);
|
|
3903
3899
|
};
|
|
3904
3900
|
const id = props2.id;
|
|
3905
3901
|
const { getGlobalModel, setGlobalModel } = vue.inject(GLOBAL_MODEL, {
|