@ecan-bi/datav 1.1.6 → 1.1.7
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 +36 -23
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +36 -23
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +10 -10
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/datav@1.1.
|
|
1
|
+
/*! @ecan-bi/datav@1.1.7 */
|
|
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) {
|
|
@@ -1724,21 +1724,34 @@
|
|
|
1724
1724
|
return;
|
|
1725
1725
|
let _params = {};
|
|
1726
1726
|
requestParams.forEach((param) => {
|
|
1727
|
-
var _a2;
|
|
1728
1727
|
const { key, value } = param;
|
|
1729
1728
|
if (typeof value === "object" && value.id) {
|
|
1730
1729
|
let record = {};
|
|
1731
|
-
const { id, prop, propKey } = value;
|
|
1730
|
+
const { id, prop, propKey, operate } = value;
|
|
1732
1731
|
if (id === "THIS") {
|
|
1733
1732
|
record = getGlobalModel(vue.unref(touchEventId)) || {};
|
|
1734
1733
|
} else {
|
|
1735
1734
|
record = getGlobalModel(id) || {};
|
|
1736
1735
|
}
|
|
1737
1736
|
const p = vue.unref(record[prop]);
|
|
1738
|
-
let v =
|
|
1737
|
+
let v = null;
|
|
1739
1738
|
const isNeedFormat = ["date", "range"].some((item) => lowerCaseIncludes(record == null ? void 0 : record.type, item));
|
|
1740
1739
|
if (isNeedFormat) {
|
|
1741
|
-
|
|
1740
|
+
const { value: value2, type, mode } = operate || {};
|
|
1741
|
+
if (value2 && type && mode) {
|
|
1742
|
+
switch (type) {
|
|
1743
|
+
case "add":
|
|
1744
|
+
v = vue.unref(p).add(value2, mode);
|
|
1745
|
+
break;
|
|
1746
|
+
case "minus":
|
|
1747
|
+
v = vue.unref(p).subtract(value2, mode);
|
|
1748
|
+
break;
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
if (v == null) {
|
|
1752
|
+
v = vue.unref(p);
|
|
1753
|
+
}
|
|
1754
|
+
v = (v == null ? void 0 : v.format((propKey == null ? void 0 : propKey.trim()) || record.format)) || "";
|
|
1742
1755
|
} else {
|
|
1743
1756
|
if (Object.prototype.toString.call(p) === "[object Object]") {
|
|
1744
1757
|
v = p[propKey || "value"];
|
|
@@ -6844,7 +6857,9 @@
|
|
|
6844
6857
|
cellColor,
|
|
6845
6858
|
dataIndex,
|
|
6846
6859
|
title,
|
|
6847
|
-
tableFilter
|
|
6860
|
+
tableFilter,
|
|
6861
|
+
headerCellAlign,
|
|
6862
|
+
headerCellColor
|
|
6848
6863
|
} = column;
|
|
6849
6864
|
if (tableFilter) {
|
|
6850
6865
|
filterDataIndexList.push(dataIndex);
|
|
@@ -6853,6 +6868,17 @@
|
|
|
6853
6868
|
column.customFilterDropdown = true;
|
|
6854
6869
|
column.onFilter = (value, record) => record[dataIndex].toString().toLowerCase().includes(value.toLowerCase());
|
|
6855
6870
|
}
|
|
6871
|
+
column.customHeaderCell = () => ({
|
|
6872
|
+
style: {
|
|
6873
|
+
display: "table-cell",
|
|
6874
|
+
verticalAlign: "middle",
|
|
6875
|
+
fontSize: props2.headerFontSize,
|
|
6876
|
+
fontWeight: props2.headerFontWeight,
|
|
6877
|
+
textAlign: headerCellAlign || "center",
|
|
6878
|
+
color: headerCellColor,
|
|
6879
|
+
borderBottomColor: props2.borderColor
|
|
6880
|
+
}
|
|
6881
|
+
});
|
|
6856
6882
|
column.customCell = (record, rowIndex) => ({
|
|
6857
6883
|
style: {
|
|
6858
6884
|
textAlign: cellAlign,
|
|
@@ -7236,7 +7262,7 @@
|
|
|
7236
7262
|
const _inputValue = vue.unref(column.filterOptionsInputValue).trim();
|
|
7237
7263
|
if (Array.isArray(filterOptions)) {
|
|
7238
7264
|
filterOptions = filterOptions.filter((filterOption) => {
|
|
7239
|
-
if (filterOption.label) {
|
|
7265
|
+
if (typeof filterOption.label === "string") {
|
|
7240
7266
|
return filterOption.label.toLowerCase().includes(_inputValue.toLowerCase());
|
|
7241
7267
|
}
|
|
7242
7268
|
return true;
|
|
@@ -7271,7 +7297,7 @@
|
|
|
7271
7297
|
};
|
|
7272
7298
|
}
|
|
7273
7299
|
});
|
|
7274
|
-
const
|
|
7300
|
+
const Table_vue_vue_type_style_index_0_scoped_2403ec91_lang = "";
|
|
7275
7301
|
const Table_vue_vue_type_style_index_1_lang = "";
|
|
7276
7302
|
const _hoisted_1$1 = /* @__PURE__ */ vue.createTextVNode(" \u641C\u7D22 ");
|
|
7277
7303
|
const _hoisted_2 = /* @__PURE__ */ vue.createTextVNode(" \u91CD\u7F6E ");
|
|
@@ -7310,19 +7336,6 @@
|
|
|
7310
7336
|
pagination: _ctx.pagination,
|
|
7311
7337
|
onChange: _ctx.tableChange
|
|
7312
7338
|
}, {
|
|
7313
|
-
headerCell: vue.withCtx(({ column }) => [
|
|
7314
|
-
vue.createElementVNode("div", {
|
|
7315
|
-
style: vue.normalizeStyle({
|
|
7316
|
-
fontSize: _ctx.headerFontSize,
|
|
7317
|
-
fontWeight: _ctx.headerFontWeight,
|
|
7318
|
-
width: "100%",
|
|
7319
|
-
height: "100%",
|
|
7320
|
-
textAlign: column.headerCellAlign || "center",
|
|
7321
|
-
color: column.headerCellColor,
|
|
7322
|
-
borderBottomColor: _ctx.borderColor
|
|
7323
|
-
})
|
|
7324
|
-
}, vue.toDisplayString(column.title), 5)
|
|
7325
|
-
]),
|
|
7326
7339
|
customFilterDropdown: vue.withCtx(({ column, selectedKeys, setSelectedKeys, confirm, clearFilters }) => [
|
|
7327
7340
|
vue.createElementVNode("div", {
|
|
7328
7341
|
class: "ecan-table-filter",
|
|
@@ -7359,7 +7372,7 @@
|
|
|
7359
7372
|
vue.createVNode(_component_a_button, {
|
|
7360
7373
|
size: "small",
|
|
7361
7374
|
style: { "width": "90px" },
|
|
7362
|
-
onClick: ($event) => _ctx.onResetFilter(clearFilters)
|
|
7375
|
+
onClick: ($event) => _ctx.onResetFilter(clearFilters, column)
|
|
7363
7376
|
}, {
|
|
7364
7377
|
default: vue.withCtx(() => [
|
|
7365
7378
|
_hoisted_2
|
|
@@ -7440,7 +7453,7 @@
|
|
|
7440
7453
|
}, 8, ["loading"])
|
|
7441
7454
|
], 4);
|
|
7442
7455
|
}
|
|
7443
|
-
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
7456
|
+
const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-2403ec91"]]);
|
|
7444
7457
|
const EcanTable = withInstall(Table);
|
|
7445
7458
|
const mapProps = {
|
|
7446
7459
|
...props,
|