@ecan-bi/datav 1.1.7 → 1.1.9

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.1.7 */
1
+ /*! @ecan-bi/datav@1.1.9 */
2
2
  var _a, _b, _c, _d;
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, onBeforeUnmount, toDisplayString, Fragment, renderList, createElementVNode, normalizeClass, pushScopeId, popScopeId, createSlots, resolveDynamicComponent, mergeProps, withModifiers, reactive, createTextVNode, withDirectives, vShow } from "vue";
4
4
  import { throttle, init, use, registerMap } from "echarts/core";
@@ -1493,7 +1493,7 @@ const props = {
1493
1493
  isOpenRequestTimer: false,
1494
1494
  requestInterval: 1,
1495
1495
  requestSort: 0,
1496
- requestParams: [{ key: "", value: { id: "", prop: "" } }],
1496
+ requestParams: [{ key: null, value: {} }],
1497
1497
  events: [],
1498
1498
  dataType: "static"
1499
1499
  };
@@ -2254,22 +2254,19 @@ const useValueFormatter = (formatter, value) => {
2254
2254
  break;
2255
2255
  let statement = variable.slice(1, -1);
2256
2256
  statement = statement == null ? void 0 : statement.replace(/value/g, value);
2257
- if (/[+\-*/%]+/g.test(value)) {
2258
- formatter = formatter.replace(variable, statement);
2259
- } else {
2260
- try {
2261
- let result = statement;
2262
- if (/[+\-*/%]+/g.test(statement)) {
2263
- const eval2 = eval;
2264
- result = eval2(statement);
2265
- }
2266
- formatter = formatter.replace(variable, result);
2267
- } catch (e) {
2268
- console.error(e);
2269
- return value;
2257
+ try {
2258
+ let result = statement;
2259
+ if (/[+\-*/%]+/g.test(statement)) {
2260
+ const eval2 = eval;
2261
+ result = eval2(statement);
2270
2262
  }
2263
+ formatter = formatter.replace(variable, result);
2264
+ } catch (e) {
2265
+ formatter = formatter.replace(variable, statement);
2266
+ console.warn(e);
2271
2267
  }
2272
2268
  }
2269
+ console.log("\u7ED3\u679C-formatter", formatter);
2273
2270
  return formatter;
2274
2271
  };
2275
2272
  const useIndicatorData = (props2 = {}) => {
@@ -5875,13 +5872,16 @@ const _sfc_main$7 = defineComponent({
5875
5872
  if (tooltipFormatter === "") {
5876
5873
  tooltipFormatter = "{marker} {a} {c}";
5877
5874
  }
5875
+ const seriesTypes = props2.seriesTypes;
5878
5876
  for (let i = 0; i < len; i++) {
5877
+ const seriesType = seriesTypes[i];
5878
+ const { tooltipFormatter: _tooltipFormatter } = seriesType || {};
5879
5879
  const { marker, seriesName, name, value, data } = params[i] || {};
5880
5880
  if (i === 0) {
5881
5881
  formatter += `${name}<br/>`;
5882
5882
  }
5883
5883
  formatter += useVariablesInText(
5884
- tooltipFormatter,
5884
+ _tooltipFormatter || tooltipFormatter,
5885
5885
  {
5886
5886
  marker,
5887
5887
  name,
@@ -5901,9 +5901,6 @@ const _sfc_main$7 = defineComponent({
5901
5901
  }
5902
5902
  return formatter;
5903
5903
  },
5904
- valueFormatter(value) {
5905
- return useValueFormatter(props2 == null ? void 0 : props2.tooltipFormatter, value);
5906
- },
5907
5904
  textStyle: {
5908
5905
  color: props2.tooltipTextStyleColor
5909
5906
  }