@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.es.js +21 -13
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +21 -13
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +3 -3
- package/package.json +1 -1
- package/types/_utils/hooks/useEmitEvent.d.ts +4 -3
- package/types/container/border/Border.vue.d.ts +294 -137
- package/types/container/border/index.d.ts +226 -68
- package/types/container/border/props.d.ts +116 -34
- package/types/container/tabs/Tabs.vue.d.ts +14 -0
- package/types/container/tabs/index.d.ts +14 -0
- package/types/container/tabs/props.d.ts +8 -0
- package/types/control/button/Button.vue.d.ts +120 -121
- package/types/control/date-picker/DatePicker.vue.d.ts +104 -105
- package/types/control/range-picker/RangePicker.vue.d.ts +104 -105
- package/types/control/select/Select.vue.d.ts +100 -101
- package/types/graph/bar/Bar.vue.d.ts +133 -133
- package/types/table/table/Table.vue.d.ts +168 -169
- package/types/text/list/List.vue.d.ts +128 -129
- package/types/text/proportion/Proportion.vue.d.ts +146 -147
- package/types/text/proportion/index.d.ts +2 -2
- package/types/text/text/Text.vue.d.ts +140 -141
package/dist/index.es.js
CHANGED
|
@@ -3230,26 +3230,33 @@ const _sfc_main$h = defineComponent({
|
|
|
3230
3230
|
const myValue = computed(() => {
|
|
3231
3231
|
const data = unref(myData);
|
|
3232
3232
|
const defaultValue = +props2.variableDefaultValue;
|
|
3233
|
-
if (data == null
|
|
3234
|
-
|
|
3233
|
+
if (data == null) {
|
|
3234
|
+
if (!isNaN(defaultValue)) {
|
|
3235
|
+
return defaultValue;
|
|
3236
|
+
} else {
|
|
3237
|
+
return 0;
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3235
3240
|
const variables = props2.text.match(/\{.+\}/g) || [];
|
|
3236
3241
|
let value;
|
|
3237
|
-
const valueSet = new Set(Object.
|
|
3242
|
+
const valueSet = new Set(Object.keys(data));
|
|
3238
3243
|
for (let i = 0; i < variables.length; i++) {
|
|
3239
3244
|
const variable = variables[i];
|
|
3240
|
-
|
|
3241
|
-
|
|
3245
|
+
const key = variable.slice(1, variable.length - 1);
|
|
3246
|
+
if (valueSet.has(key)) {
|
|
3247
|
+
value = data[key];
|
|
3242
3248
|
break;
|
|
3243
3249
|
}
|
|
3244
3250
|
}
|
|
3245
|
-
if (typeof value === "
|
|
3246
|
-
value =
|
|
3251
|
+
if (typeof value === "number") {
|
|
3252
|
+
value = value * 100;
|
|
3253
|
+
} else if (typeof value === "string" && !isNaN(+value)) {
|
|
3254
|
+
value = +value * 100;
|
|
3247
3255
|
} else if (!isNaN(defaultValue)) {
|
|
3248
|
-
value = defaultValue;
|
|
3256
|
+
value = defaultValue * 100;
|
|
3249
3257
|
} else {
|
|
3250
3258
|
value = 0;
|
|
3251
3259
|
}
|
|
3252
|
-
value = value * 100;
|
|
3253
3260
|
if (props2.decimalFormat) {
|
|
3254
3261
|
value = +value.toFixed(2);
|
|
3255
3262
|
}
|
|
@@ -3372,7 +3379,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3372
3379
|
}, 8, ["percent", "width", "type", "strokeColor", "strokeLinecap", "trailColor", "strokeWidth", "gapDegree", "onClick"])
|
|
3373
3380
|
], 4);
|
|
3374
3381
|
}
|
|
3375
|
-
const Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-
|
|
3382
|
+
const Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-4f7958e8"]]);
|
|
3376
3383
|
const EcanProportion = withInstall(Proportion);
|
|
3377
3384
|
const inputProps = {
|
|
3378
3385
|
...props,
|
|
@@ -3695,18 +3702,19 @@ const _sfc_main$c = defineComponent({
|
|
|
3695
3702
|
const style2 = usePickComponentStyle(props2);
|
|
3696
3703
|
const emitEvent = useEmitEvent(props2);
|
|
3697
3704
|
const click = emitEvent("click", () => {
|
|
3705
|
+
const url = unref(myHref);
|
|
3698
3706
|
if (props2.target === "event") {
|
|
3699
3707
|
window.parent.postMessage({
|
|
3700
3708
|
type: "openPage",
|
|
3701
|
-
url
|
|
3709
|
+
url
|
|
3702
3710
|
}, "*");
|
|
3703
3711
|
}
|
|
3704
3712
|
});
|
|
3705
3713
|
const myText = computed(() => useVariablesInText(props2.text));
|
|
3706
|
-
const myHref = computed(() => useVariablesInText(props2.href));
|
|
3714
|
+
const myHref = computed(() => useVariablesInText(props2.href) || null);
|
|
3707
3715
|
const myTarget = computed(() => {
|
|
3708
3716
|
const target = props2.target;
|
|
3709
|
-
if (target === "event") {
|
|
3717
|
+
if (target === "event" || unref(myHref) == null) {
|
|
3710
3718
|
return void 0;
|
|
3711
3719
|
} else {
|
|
3712
3720
|
const map = {
|