@ecan-bi/datav 1.0.66 → 1.0.68

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
@@ -3236,26 +3236,33 @@
3236
3236
  const myValue = vue.computed(() => {
3237
3237
  const data = vue.unref(myData);
3238
3238
  const defaultValue = +props2.variableDefaultValue;
3239
- if (data == null && !isNaN(defaultValue))
3240
- return defaultValue;
3239
+ if (data == null) {
3240
+ if (!isNaN(defaultValue)) {
3241
+ return defaultValue;
3242
+ } else {
3243
+ return 0;
3244
+ }
3245
+ }
3241
3246
  const variables = props2.text.match(/\{.+\}/g) || [];
3242
3247
  let value;
3243
- const valueSet = new Set(Object.values(data));
3248
+ const valueSet = new Set(Object.keys(data));
3244
3249
  for (let i = 0; i < variables.length; i++) {
3245
3250
  const variable = variables[i];
3246
- if (valueSet.has(variables[i])) {
3247
- value = variable;
3251
+ const key = variable.slice(1, variable.length - 1);
3252
+ if (valueSet.has(key)) {
3253
+ value = data[key];
3248
3254
  break;
3249
3255
  }
3250
3256
  }
3251
- if (typeof value === "string" && !isNaN(+value)) {
3252
- value = +value;
3257
+ if (typeof value === "number") {
3258
+ value = value * 100;
3259
+ } else if (typeof value === "string" && !isNaN(+value)) {
3260
+ value = +value * 100;
3253
3261
  } else if (!isNaN(defaultValue)) {
3254
- value = defaultValue;
3262
+ value = defaultValue * 100;
3255
3263
  } else {
3256
3264
  value = 0;
3257
3265
  }
3258
- value = value * 100;
3259
3266
  if (props2.decimalFormat) {
3260
3267
  value = +value.toFixed(2);
3261
3268
  }
@@ -3378,7 +3385,7 @@
3378
3385
  }, 8, ["percent", "width", "type", "strokeColor", "strokeLinecap", "trailColor", "strokeWidth", "gapDegree", "onClick"])
3379
3386
  ], 4);
3380
3387
  }
3381
- const Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-95ca32ca"]]);
3388
+ const Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-4f7958e8"]]);
3382
3389
  const EcanProportion = withInstall(Proportion);
3383
3390
  const inputProps = {
3384
3391
  ...props,
@@ -3701,18 +3708,19 @@
3701
3708
  const style2 = usePickComponentStyle(props2);
3702
3709
  const emitEvent = useEmitEvent(props2);
3703
3710
  const click = emitEvent("click", () => {
3711
+ const url = vue.unref(myHref);
3704
3712
  if (props2.target === "event") {
3705
3713
  window.parent.postMessage({
3706
3714
  type: "openPage",
3707
- url: vue.unref(myHref)
3715
+ url
3708
3716
  }, "*");
3709
3717
  }
3710
3718
  });
3711
3719
  const myText = vue.computed(() => useVariablesInText(props2.text));
3712
- const myHref = vue.computed(() => useVariablesInText(props2.href));
3720
+ const myHref = vue.computed(() => useVariablesInText(props2.href) || null);
3713
3721
  const myTarget = vue.computed(() => {
3714
3722
  const target = props2.target;
3715
- if (target === "event") {
3723
+ if (target === "event" || vue.unref(myHref) == null) {
3716
3724
  return void 0;
3717
3725
  } else {
3718
3726
  const map = {