@ecan-bi/datav 1.0.54 → 1.0.55
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 +78 -30
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +78 -30
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +10 -10
- package/package.json +2 -2
- package/types/control/button/Button.vue.d.ts +1 -0
- package/types/control/button/index.d.ts +1 -0
- package/types/control/button/props.d.ts +1 -1
- package/types/table/table/Table.vue.d.ts +4 -2
- package/types/table/table/index.d.ts +4 -2
- package/types/text/proportion/Proportion.vue.d.ts +2 -2
- package/types/text/proportion/index.d.ts +2 -2
- package/types/text/proportion/props.d.ts +2 -2
package/dist/index.es.js
CHANGED
|
@@ -3208,11 +3208,11 @@ const proportionProps = __spreadProps(__spreadValues({}, props), {
|
|
|
3208
3208
|
strokeTextWidth: "100%",
|
|
3209
3209
|
lineHeight: "26px",
|
|
3210
3210
|
decimalFormat: false,
|
|
3211
|
-
|
|
3211
|
+
variableDefaultValue: ""
|
|
3212
3212
|
});
|
|
3213
3213
|
const proportionComponentProps = transformToComponentProps(proportionProps);
|
|
3214
3214
|
const proportionEvents = ["refreshData", "click"];
|
|
3215
|
-
var Proportion_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".ecan-proportion[data-v-
|
|
3215
|
+
var Proportion_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".ecan-proportion[data-v-4a25add6] {\n overflow: hidden;\n}\n.progress[data-v-4a25add6] {\n width: 100%;\n height: 100%;\n}\n.format[data-v-4a25add6] {\n margin: 0 auto;\n}\n")();
|
|
3216
3216
|
const _sfc_main$h = defineComponent({
|
|
3217
3217
|
name: "EcanProportion",
|
|
3218
3218
|
components: {
|
|
@@ -3253,23 +3253,21 @@ const _sfc_main$h = defineComponent({
|
|
|
3253
3253
|
const text = computed(() => {
|
|
3254
3254
|
let text2 = props2.text;
|
|
3255
3255
|
const data = unref(myData);
|
|
3256
|
-
|
|
3257
|
-
const variables = text2.match(/\{.*\}/g) || [];
|
|
3256
|
+
const variables = text2.match(/\{.+\}/g) || [];
|
|
3258
3257
|
if (text2 === "")
|
|
3259
3258
|
return unref(value) + "%";
|
|
3260
|
-
for (let i = 0; i < variables.length; i++) {
|
|
3259
|
+
for (let i = 0; i < (variables == null ? void 0 : variables.length); i++) {
|
|
3261
3260
|
const variable = variables[i];
|
|
3262
3261
|
let statement = variable.slice(1, variable.length - 1);
|
|
3263
3262
|
const textVariables = statement.match(/[a-zA-Z]\w*/g);
|
|
3264
|
-
for (let j = 0; j < textVariables.length; j++) {
|
|
3263
|
+
for (let j = 0; j < (textVariables == null ? void 0 : textVariables.length); j++) {
|
|
3265
3264
|
const textVariable = textVariables[i];
|
|
3266
3265
|
if (data[textVariable] != null) {
|
|
3267
3266
|
statement = statement.replace(textVariable, data[textVariable]);
|
|
3268
3267
|
} else {
|
|
3269
|
-
statement = statement.replace(textVariable, props2.
|
|
3268
|
+
statement = statement.replace(textVariable, props2.variableDefaultValue);
|
|
3270
3269
|
}
|
|
3271
3270
|
}
|
|
3272
|
-
console.log("statement", statement);
|
|
3273
3271
|
let usedVariable = statement;
|
|
3274
3272
|
try {
|
|
3275
3273
|
if (/[+\-*/%]+/g.test(statement)) {
|
|
@@ -3282,10 +3280,8 @@ const _sfc_main$h = defineComponent({
|
|
|
3282
3280
|
if (props2.decimalFormat) {
|
|
3283
3281
|
usedVariable = usedVariable == null ? void 0 : usedVariable.toFixed(2);
|
|
3284
3282
|
}
|
|
3285
|
-
console.log("usedVariable", usedVariable);
|
|
3286
3283
|
text2 = text2.replace(variable, usedVariable + "");
|
|
3287
3284
|
}
|
|
3288
|
-
console.log("text", text2);
|
|
3289
3285
|
return text2;
|
|
3290
3286
|
});
|
|
3291
3287
|
const requestData = useRequestData(props2);
|
|
@@ -3366,7 +3362,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3366
3362
|
}, 8, ["percent", "width", "type", "strokeColor", "strokeLinecap", "trailColor", "strokeWidth", "gapDegree", "onClick"])
|
|
3367
3363
|
], 4);
|
|
3368
3364
|
}
|
|
3369
|
-
var Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-
|
|
3365
|
+
var Proportion = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-4a25add6"]]);
|
|
3370
3366
|
const EcanProportion = withInstall(Proportion);
|
|
3371
3367
|
const inputProps = __spreadProps(__spreadValues({}, props), {
|
|
3372
3368
|
width: "200px",
|
|
@@ -3660,7 +3656,7 @@ const buttonProps = __spreadProps(__spreadValues({}, props), {
|
|
|
3660
3656
|
danger: false,
|
|
3661
3657
|
shape: "default",
|
|
3662
3658
|
href: "",
|
|
3663
|
-
target: "
|
|
3659
|
+
target: "self",
|
|
3664
3660
|
fontSize: "14px",
|
|
3665
3661
|
fontWeight: 400
|
|
3666
3662
|
});
|
|
@@ -3677,20 +3673,43 @@ const _sfc_main$c = defineComponent({
|
|
|
3677
3673
|
const style2 = usePickComponentStyle(props2);
|
|
3678
3674
|
const events = props2.events;
|
|
3679
3675
|
const emitEvent = useEmitEvent(events);
|
|
3680
|
-
const click = emitEvent("click")
|
|
3676
|
+
const click = emitEvent("click", () => {
|
|
3677
|
+
if (props2.target === "event") {
|
|
3678
|
+
console.log("message");
|
|
3679
|
+
window.parent.postMessage({
|
|
3680
|
+
type: "openPage",
|
|
3681
|
+
url: props2.href
|
|
3682
|
+
}, "*");
|
|
3683
|
+
}
|
|
3684
|
+
});
|
|
3681
3685
|
const myText = computed(() => useVariablesInText(props2.text));
|
|
3682
3686
|
const myHref = computed(() => {
|
|
3687
|
+
if (props2.target === "event")
|
|
3688
|
+
return void 0;
|
|
3683
3689
|
const href = props2.href;
|
|
3684
3690
|
if (href) {
|
|
3685
3691
|
return useVariablesInText(href);
|
|
3686
3692
|
}
|
|
3687
3693
|
return void 0;
|
|
3688
3694
|
});
|
|
3695
|
+
const myTarget = computed(() => {
|
|
3696
|
+
const target = props2.target;
|
|
3697
|
+
if (target === "event") {
|
|
3698
|
+
return void 0;
|
|
3699
|
+
} else {
|
|
3700
|
+
const map = {
|
|
3701
|
+
self: "_self",
|
|
3702
|
+
blank: "_blank"
|
|
3703
|
+
};
|
|
3704
|
+
return map[target];
|
|
3705
|
+
}
|
|
3706
|
+
});
|
|
3689
3707
|
return {
|
|
3690
3708
|
style: style2,
|
|
3691
3709
|
click,
|
|
3692
3710
|
myText,
|
|
3693
|
-
myHref
|
|
3711
|
+
myHref,
|
|
3712
|
+
myTarget
|
|
3694
3713
|
};
|
|
3695
3714
|
}
|
|
3696
3715
|
});
|
|
@@ -3707,7 +3726,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
3707
3726
|
danger: _ctx.danger,
|
|
3708
3727
|
shape: _ctx.shape,
|
|
3709
3728
|
href: _ctx.myHref,
|
|
3710
|
-
target: _ctx.
|
|
3729
|
+
target: _ctx.myTarget
|
|
3711
3730
|
}, {
|
|
3712
3731
|
default: withCtx(() => [
|
|
3713
3732
|
createElementVNode("span", {
|
|
@@ -4489,7 +4508,7 @@ const barProps = __spreadProps(__spreadValues({}, props), {
|
|
|
4489
4508
|
valueTypeDataFieldNames: { name: "name", value: "value", type: "type" },
|
|
4490
4509
|
keyTypeDataFieldNames: { name: "name", types: [] },
|
|
4491
4510
|
dataFieldConfigType: "value",
|
|
4492
|
-
barWidth: "
|
|
4511
|
+
barWidth: "40%",
|
|
4493
4512
|
gridContainLabel: true,
|
|
4494
4513
|
gridTop: "10%",
|
|
4495
4514
|
gridBottom: "10%",
|
|
@@ -6084,7 +6103,7 @@ const tableProps = __spreadProps(__spreadValues({}, props), {
|
|
|
6084
6103
|
target: "",
|
|
6085
6104
|
color: ""
|
|
6086
6105
|
}],
|
|
6087
|
-
actionColumnWidth:
|
|
6106
|
+
actionColumnWidth: 100,
|
|
6088
6107
|
columns: [
|
|
6089
6108
|
{
|
|
6090
6109
|
title: "\u59D3\u540D",
|
|
@@ -6119,16 +6138,16 @@ const tableProps = __spreadProps(__spreadValues({}, props), {
|
|
|
6119
6138
|
});
|
|
6120
6139
|
const tableComponentProps = transformToComponentProps(tableProps);
|
|
6121
6140
|
const tableEvents = ["click", "refreshData"];
|
|
6122
|
-
var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `.table[data-v-
|
|
6141
|
+
var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `.table[data-v-e3b6ea7c] {
|
|
6123
6142
|
width: 100%;
|
|
6124
6143
|
}
|
|
6125
|
-
.goUp[data-v-
|
|
6144
|
+
.goUp[data-v-e3b6ea7c] {
|
|
6126
6145
|
color: #FF512E;
|
|
6127
6146
|
display: flex;
|
|
6128
6147
|
align-items: center;
|
|
6129
6148
|
justify-content: center;
|
|
6130
6149
|
}
|
|
6131
|
-
.goUp[data-v-
|
|
6150
|
+
.goUp[data-v-e3b6ea7c]:before {
|
|
6132
6151
|
content: '';
|
|
6133
6152
|
display: block;
|
|
6134
6153
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAV1BMVEUAAAD/WzT/WjP/WDD/WzT/WzP/WzT/WzT/WzT/WjT/WzT/WDT/YED/WzT/WzT/WjT/YED/WzT/WzT/WzT/XDT/WzT/WjX/WjP/XDT/XDT/WTL/Tif/WzReH8z5AAAAHHRSTlMA8RgS9W9YHbePZyME5sVjCP7bzcCxgndOQC4GFJJgKwAAAIJJREFUKM+Nkd0OgyAMRjvqcLA53fzXvv9zaokmxq8mnsue5ACFDjiy+XyjLZ7yyK35OxN5mSFZKa2QojEIKRhrZKM0QnsMQxirmJ0kBubTIZvAtUyiFAT4JFoUIYmIotZ5xjDPfyoCAV16nMPdFir8xZ16nM//tePtXw2ODOJY0V0WqQwM2rgKrU0AAAAASUVORK5CYII=");
|
|
@@ -6138,13 +6157,13 @@ var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `
|
|
|
6138
6157
|
background-size: cover;
|
|
6139
6158
|
margin-right: 2px;
|
|
6140
6159
|
}
|
|
6141
|
-
.goDown[data-v-
|
|
6160
|
+
.goDown[data-v-e3b6ea7c] {
|
|
6142
6161
|
color: #00F7B4;
|
|
6143
6162
|
display: flex;
|
|
6144
6163
|
align-items: center;
|
|
6145
6164
|
justify-content: center;
|
|
6146
6165
|
}
|
|
6147
|
-
.goDown[data-v-
|
|
6166
|
+
.goDown[data-v-e3b6ea7c]:before {
|
|
6148
6167
|
content: '';
|
|
6149
6168
|
display: block;
|
|
6150
6169
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAaVBMVEUAAAAA+b0A+LwA+L0A/6AA+LwA+L0A+L0A+b0A+LwA/78A+LwA+L0A+LwA+LwA+b0A+LsA970A+LwA+r0A9boA/7YA+LwA+LwA+LwA+L0A97wA+bwA970A970A+bwA+bwA+LsA9rkA+LzcCa+5AAAAInRSTlMAd/uVAvjYxCsiDvPp37F7aWBMNBgK7s/NvKidh4NXUEcdp9A1SAAAAI5JREFUKM+l0UcOwzAMRFGqWZbcW3rl/Q8ZhUGKMN7lLedD4EKUi/3BEIrGsQu432pmPuF+1WnfRNjLipMz7HbHT3cIF9n3BLYSerzAooSgZNcWQiuhIdBI8JQblNISCqXU/BNG/mqzJ+az13MWluIdRspNmgV+Rvc6vkCwPu1uIhQq5o7WDOwtrToG+ssDeh4QPgfT2X0AAAAASUVORK5CYII=");
|
|
@@ -6154,11 +6173,11 @@ var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `
|
|
|
6154
6173
|
background-size: cover;
|
|
6155
6174
|
margin-right: 2px;
|
|
6156
6175
|
}
|
|
6157
|
-
.action-list[data-v-
|
|
6176
|
+
.action-list[data-v-e3b6ea7c] {
|
|
6158
6177
|
display: flex;
|
|
6159
6178
|
width: 100%;
|
|
6160
6179
|
}
|
|
6161
|
-
.action[data-v-
|
|
6180
|
+
.action[data-v-e3b6ea7c] {
|
|
6162
6181
|
flex: 1;
|
|
6163
6182
|
}
|
|
6164
6183
|
`)();
|
|
@@ -6413,6 +6432,32 @@ const _sfc_main$1 = defineComponent({
|
|
|
6413
6432
|
expose({
|
|
6414
6433
|
refreshData
|
|
6415
6434
|
});
|
|
6435
|
+
const handleHref = (target, href = "", data) => {
|
|
6436
|
+
if (target === "event") {
|
|
6437
|
+
return void 0;
|
|
6438
|
+
} else {
|
|
6439
|
+
useVariablesInText(href, data);
|
|
6440
|
+
}
|
|
6441
|
+
};
|
|
6442
|
+
const handleHrefTarget = (target) => {
|
|
6443
|
+
if (target === "event") {
|
|
6444
|
+
return void 0;
|
|
6445
|
+
} else {
|
|
6446
|
+
const map = {
|
|
6447
|
+
self: "_self",
|
|
6448
|
+
blank: "_blank"
|
|
6449
|
+
};
|
|
6450
|
+
return map[target];
|
|
6451
|
+
}
|
|
6452
|
+
};
|
|
6453
|
+
const onTouchHrefEvent = (target, href = "") => {
|
|
6454
|
+
if (target === "event") {
|
|
6455
|
+
window.parent.postMessage({
|
|
6456
|
+
type: "openPage",
|
|
6457
|
+
url: href
|
|
6458
|
+
}, "*");
|
|
6459
|
+
}
|
|
6460
|
+
};
|
|
6416
6461
|
return {
|
|
6417
6462
|
x,
|
|
6418
6463
|
y,
|
|
@@ -6427,7 +6472,9 @@ const _sfc_main$1 = defineComponent({
|
|
|
6427
6472
|
dataSource,
|
|
6428
6473
|
summaryList,
|
|
6429
6474
|
loading,
|
|
6430
|
-
|
|
6475
|
+
onTouchHrefEvent,
|
|
6476
|
+
handleHref,
|
|
6477
|
+
handleHrefTarget
|
|
6431
6478
|
};
|
|
6432
6479
|
}
|
|
6433
6480
|
});
|
|
@@ -6435,7 +6482,7 @@ const _hoisted_1$1 = {
|
|
|
6435
6482
|
key: 1,
|
|
6436
6483
|
class: "action-list"
|
|
6437
6484
|
};
|
|
6438
|
-
const _hoisted_2 = ["href", "target"];
|
|
6485
|
+
const _hoisted_2 = ["href", "target", "onClick"];
|
|
6439
6486
|
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6440
6487
|
const _component_a_table_summary_cell = resolveComponent("a-table-summary-cell");
|
|
6441
6488
|
const _component_a_table_summary_row = resolveComponent("a-table-summary-row");
|
|
@@ -6476,13 +6523,14 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6476
6523
|
key: index22
|
|
6477
6524
|
}, [
|
|
6478
6525
|
createElementVNode("a", {
|
|
6479
|
-
href: _ctx.
|
|
6480
|
-
target: action.target,
|
|
6526
|
+
href: _ctx.handleHref(action.target, action.href, record),
|
|
6527
|
+
target: _ctx.handleHrefTarget(action.target),
|
|
6481
6528
|
style: normalizeStyle({
|
|
6482
6529
|
color: action.color,
|
|
6483
6530
|
fontSize: _ctx.fontSize,
|
|
6484
6531
|
fontWeight: _ctx.fontWeight
|
|
6485
|
-
})
|
|
6532
|
+
}),
|
|
6533
|
+
onClick: ($event) => _ctx.onTouchHrefEvent(action.target, action.href)
|
|
6486
6534
|
}, toDisplayString(action.title), 13, _hoisted_2)
|
|
6487
6535
|
]);
|
|
6488
6536
|
}), 128))
|
|
@@ -6533,7 +6581,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6533
6581
|
}, 8, ["loading"])
|
|
6534
6582
|
], 4);
|
|
6535
6583
|
}
|
|
6536
|
-
var Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
6584
|
+
var Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-e3b6ea7c"]]);
|
|
6537
6585
|
const EcanTable = withInstall(Table);
|
|
6538
6586
|
const mapProps = __spreadProps(__spreadValues({}, props), {
|
|
6539
6587
|
mapJson: null,
|