@ecan-bi/datav 1.0.58 → 1.0.61
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 +29 -33
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +29 -33
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +9 -9
- package/package.json +1 -1
- package/types/table/table/Table.vue.d.ts +2 -1
- package/types/table/table/index.d.ts +2 -1
- package/types/text/text/Text.vue.d.ts +22 -0
- package/types/text/text/index.d.ts +22 -0
- package/types/text/text/props.d.ts +12 -0
package/dist/index.es.js
CHANGED
|
@@ -2694,32 +2694,39 @@ const textProps = __spreadProps(__spreadValues({}, props), {
|
|
|
2694
2694
|
justifyContent: "center",
|
|
2695
2695
|
alignItems: "center",
|
|
2696
2696
|
variableFontSize: "14px",
|
|
2697
|
-
data: {}
|
|
2697
|
+
data: {},
|
|
2698
|
+
variableDefaultValue: ""
|
|
2698
2699
|
});
|
|
2699
2700
|
const textComponentProps = transformToComponentProps(textProps);
|
|
2700
2701
|
const textEvents = ["refreshData", "click"];
|
|
2701
|
-
var Text_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".skeleton-wrapper[data-v-
|
|
2702
|
+
var Text_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".skeleton-wrapper[data-v-5a54b456] {\n overflow: hidden;\n}\n.ecan-text[data-v-5a54b456] {\n overflow: hidden;\n display: flex;\n}\n")();
|
|
2702
2703
|
const _sfc_main$l = defineComponent({
|
|
2703
2704
|
name: "EcanText",
|
|
2704
2705
|
components: { Skeleton },
|
|
2705
2706
|
props: __spreadValues({}, textComponentProps),
|
|
2706
2707
|
setup(props2) {
|
|
2707
2708
|
const style2 = usePickComponentStyle(props2);
|
|
2708
|
-
const myData = ref(props2.data);
|
|
2709
|
+
const myData = ref(props2.data || {});
|
|
2710
|
+
watch(() => [props2.data, props2.dataType], ([data, dataType]) => {
|
|
2711
|
+
if (dataType !== "static")
|
|
2712
|
+
return;
|
|
2713
|
+
myData.value = data;
|
|
2714
|
+
});
|
|
2709
2715
|
const myText = computed(() => {
|
|
2710
|
-
let text = props2.text;
|
|
2711
2716
|
const data = unref(myData);
|
|
2717
|
+
let text = props2.text;
|
|
2718
|
+
text = text == null ? void 0 : text.replace(/\n|\\n/g, "<br />");
|
|
2712
2719
|
const variables = text.match(/\{\w*\}/g);
|
|
2713
2720
|
if (variables == null || variables.length === 0)
|
|
2714
2721
|
return text;
|
|
2715
2722
|
for (let i = 0; i < variables.length; i++) {
|
|
2716
2723
|
const variable = variables[i];
|
|
2717
2724
|
const v = variable.slice(1, variable.length - 1);
|
|
2718
|
-
const usedVariables = data[v]
|
|
2725
|
+
const usedVariables = data[v];
|
|
2719
2726
|
if (usedVariables != null) {
|
|
2720
2727
|
text = text.replace(variable, `<span style="color:${props2.variableColor};font-size:${props2.variableFontSize}">${usedVariables}</span>`);
|
|
2721
2728
|
} else {
|
|
2722
|
-
text = text.replace(variable,
|
|
2729
|
+
text = text.replace(variable, props2.variableDefaultValue);
|
|
2723
2730
|
}
|
|
2724
2731
|
}
|
|
2725
2732
|
return `<span>${text}</span>`;
|
|
@@ -2784,7 +2791,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2784
2791
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.click && _ctx.click(...args))
|
|
2785
2792
|
}, null, 12, _hoisted_1$7));
|
|
2786
2793
|
}
|
|
2787
|
-
var Text = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-
|
|
2794
|
+
var Text = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$l], ["__scopeId", "data-v-5a54b456"]]);
|
|
2788
2795
|
const EcanText = withInstall(Text);
|
|
2789
2796
|
var ScrollText_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => ".red[data-v-0bb717eb] {\n color: red;\n}\n")();
|
|
2790
2797
|
const _sfc_main$k = defineComponent({
|
|
@@ -3682,15 +3689,7 @@ const _sfc_main$c = defineComponent({
|
|
|
3682
3689
|
}
|
|
3683
3690
|
});
|
|
3684
3691
|
const myText = computed(() => useVariablesInText(props2.text));
|
|
3685
|
-
const myHref = computed(() =>
|
|
3686
|
-
if (props2.target === "event")
|
|
3687
|
-
return void 0;
|
|
3688
|
-
const href = props2.href;
|
|
3689
|
-
if (href) {
|
|
3690
|
-
return useVariablesInText(href);
|
|
3691
|
-
}
|
|
3692
|
-
return void 0;
|
|
3693
|
-
});
|
|
3692
|
+
const myHref = computed(() => useVariablesInText(props2.href));
|
|
3694
3693
|
const myTarget = computed(() => {
|
|
3695
3694
|
const target = props2.target;
|
|
3696
3695
|
if (target === "event") {
|
|
@@ -6148,16 +6147,16 @@ const tableProps = __spreadProps(__spreadValues({}, props), {
|
|
|
6148
6147
|
});
|
|
6149
6148
|
const tableComponentProps = transformToComponentProps(tableProps);
|
|
6150
6149
|
const tableEvents = ["click", "refreshData"];
|
|
6151
|
-
var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `.table[data-v-
|
|
6150
|
+
var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `.table[data-v-227ea2a0] {
|
|
6152
6151
|
width: 100%;
|
|
6153
6152
|
}
|
|
6154
|
-
.goUp[data-v-
|
|
6153
|
+
.goUp[data-v-227ea2a0] {
|
|
6155
6154
|
color: #FF512E;
|
|
6156
6155
|
display: flex;
|
|
6157
6156
|
align-items: center;
|
|
6158
6157
|
justify-content: center;
|
|
6159
6158
|
}
|
|
6160
|
-
.goUp[data-v-
|
|
6159
|
+
.goUp[data-v-227ea2a0]:before {
|
|
6161
6160
|
content: '';
|
|
6162
6161
|
display: block;
|
|
6163
6162
|
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=");
|
|
@@ -6167,13 +6166,13 @@ var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `
|
|
|
6167
6166
|
background-size: cover;
|
|
6168
6167
|
margin-right: 2px;
|
|
6169
6168
|
}
|
|
6170
|
-
.goDown[data-v-
|
|
6169
|
+
.goDown[data-v-227ea2a0] {
|
|
6171
6170
|
color: #39cf93;
|
|
6172
6171
|
display: flex;
|
|
6173
6172
|
align-items: center;
|
|
6174
6173
|
justify-content: center;
|
|
6175
6174
|
}
|
|
6176
|
-
.goDown[data-v-
|
|
6175
|
+
.goDown[data-v-227ea2a0]:before {
|
|
6177
6176
|
content: '';
|
|
6178
6177
|
display: block;
|
|
6179
6178
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwO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ZDc4Zi00MjRmLWEzYzktNWU5NDI5MGNkY2YxIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNmRlNzg2MS1kNzhmLTQyNGYtYTNjOS01ZTk0MjkwY2RjZjEiIHN0RXZ0OndoZW49IjIwMjItMDctMjJUMDk6MzU6MTkrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6VDI+BAAABUUlEQVRIia3WPyhGURgG8B8pi0xisStKMioZLQaLiaQMBoxiVBImCwaLf6MssloUk8Gmb7GgJFKSUvIZ7qe+bvd89+A+03uf989z3nPPPe+tK5fLqtF3tSESzRjFAJ4vemams4IaYqulCq9gEo34QGco+LcCg9hHaxW3jpsiBIZxmMp5kXQTRH1k8S4cZCxoE6//FaiXbEtThm87JjkPI+jN4E9xW4TAQoA/isjNFehCT8B3VoTAUID/xHURAn0B/g5fRQh0B/j7mOJkf2gTaKvY7YG8FsxXPe/hIVbgCTs5C+vAasU+xlooMGuLTrCVI/CDR0zVCgi9gzmUIgQmBbYmT+AdY5LjGMKWpNuaqHWKLrEY8JUkXeYi75iu4DzFfUi6ey9C4AvjeKviliTdRSHmsrvBbMU+lzNg0oidaLvox7LIK+IHdem/iqIROzL/jG+NrT1BRsXKNQAAAABJRU5ErkJggg==");
|
|
@@ -6183,11 +6182,11 @@ var Table_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => `
|
|
|
6183
6182
|
background-size: cover;
|
|
6184
6183
|
margin-right: 2px;
|
|
6185
6184
|
}
|
|
6186
|
-
.action-list[data-v-
|
|
6185
|
+
.action-list[data-v-227ea2a0] {
|
|
6187
6186
|
display: flex;
|
|
6188
6187
|
width: 100%;
|
|
6189
6188
|
}
|
|
6190
|
-
.action[data-v-
|
|
6189
|
+
.action[data-v-227ea2a0] {
|
|
6191
6190
|
flex: 1;
|
|
6192
6191
|
}
|
|
6193
6192
|
`)();
|
|
@@ -6317,7 +6316,8 @@ const _sfc_main$1 = defineComponent({
|
|
|
6317
6316
|
position,
|
|
6318
6317
|
total: unref(total),
|
|
6319
6318
|
current: unref(pageNum),
|
|
6320
|
-
pageSize: unref(pageSize)
|
|
6319
|
+
pageSize: unref(pageSize),
|
|
6320
|
+
showSizeChanger: false
|
|
6321
6321
|
};
|
|
6322
6322
|
});
|
|
6323
6323
|
const formatBoolean = (value) => {
|
|
@@ -6442,12 +6442,8 @@ const _sfc_main$1 = defineComponent({
|
|
|
6442
6442
|
expose({
|
|
6443
6443
|
refreshData
|
|
6444
6444
|
});
|
|
6445
|
-
const handleHref = (
|
|
6446
|
-
|
|
6447
|
-
return void 0;
|
|
6448
|
-
} else {
|
|
6449
|
-
return useVariablesInText(href, data);
|
|
6450
|
-
}
|
|
6445
|
+
const handleHref = (href = "", data) => {
|
|
6446
|
+
return useVariablesInText(href, data);
|
|
6451
6447
|
};
|
|
6452
6448
|
const handleHrefTarget = (target) => {
|
|
6453
6449
|
if (target === "event") {
|
|
@@ -6533,14 +6529,14 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6533
6529
|
key: index22
|
|
6534
6530
|
}, [
|
|
6535
6531
|
createElementVNode("a", {
|
|
6536
|
-
href: _ctx.handleHref(action.
|
|
6532
|
+
href: _ctx.handleHref(action.href, record),
|
|
6537
6533
|
target: _ctx.handleHrefTarget(action.target),
|
|
6538
6534
|
style: normalizeStyle({
|
|
6539
6535
|
color: action.color,
|
|
6540
6536
|
fontSize: _ctx.fontSize,
|
|
6541
6537
|
fontWeight: _ctx.fontWeight
|
|
6542
6538
|
}),
|
|
6543
|
-
onClick: ($event) => _ctx.onTouchHrefEvent(action.target, _ctx.handleHref(action.
|
|
6539
|
+
onClick: ($event) => _ctx.onTouchHrefEvent(action.target, _ctx.handleHref(action.href, record))
|
|
6544
6540
|
}, toDisplayString(action.title), 13, _hoisted_2)
|
|
6545
6541
|
]);
|
|
6546
6542
|
}), 128))
|
|
@@ -6591,7 +6587,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6591
6587
|
}, 8, ["loading"])
|
|
6592
6588
|
], 4);
|
|
6593
6589
|
}
|
|
6594
|
-
var Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
6590
|
+
var Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-227ea2a0"]]);
|
|
6595
6591
|
const EcanTable = withInstall(Table);
|
|
6596
6592
|
const mapProps = __spreadProps(__spreadValues({}, props), {
|
|
6597
6593
|
mapJson: null,
|