sctj-components 1.0.36 → 1.0.38
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/README.md +92 -0
- package/lib/sctj-components.es.js +410 -56
- package/lib/sctj-components.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as computed$1, resolveComponent, openBlock, createElementBlock, Fragment, renderList, unref, normalizeClass, toDisplayString, createBlock, withCtx, createTextVNode, createCommentVNode, createElementVNode, ref as ref$1, watch, mergeProps, createSlots, renderSlot, createVNode, TransitionGroup, useCssVars, withModifiers, normalizeStyle, nextTick, onMounted as onMounted$1, onUnmounted, isRef, withDirectives, vShow, onBeforeMount, getCurrentInstance, reactive, resolveDirective, toRefs, resolveDynamicComponent, withKeys, pushScopeId, popScopeId, useSlots, onBeforeUnmount, markRaw
|
|
1
|
+
import { computed as computed$1, resolveComponent, openBlock, createElementBlock, Fragment, renderList, unref, normalizeClass, toDisplayString, createBlock, withCtx, createTextVNode, createCommentVNode, createElementVNode, ref as ref$1, watch, mergeProps, createSlots, renderSlot, createVNode, TransitionGroup, useCssVars, withModifiers, normalizeStyle, nextTick, onMounted as onMounted$1, onUnmounted, isRef, withDirectives, vShow, onBeforeMount, getCurrentInstance, reactive, resolveDirective, toRefs, resolveDynamicComponent, withKeys, pushScopeId, popScopeId, shallowRef, useSlots, onBeforeUnmount, markRaw } from "vue";
|
|
2
2
|
import VueOfficePdf from "@vue-office/pdf";
|
|
3
3
|
import VueOfficeDocx from "@vue-office/docx";
|
|
4
4
|
import VueOfficeExcel from "@vue-office/excel";
|
|
@@ -38,9 +38,9 @@ const _export_sfc = (sfc, props) => {
|
|
|
38
38
|
}
|
|
39
39
|
return target;
|
|
40
40
|
};
|
|
41
|
-
const _hoisted_1$
|
|
41
|
+
const _hoisted_1$l = { class: "dict-tag-container" };
|
|
42
42
|
const _hoisted_2$c = ["index"];
|
|
43
|
-
const _sfc_main$
|
|
43
|
+
const _sfc_main$r = {
|
|
44
44
|
__name: "index",
|
|
45
45
|
props: {
|
|
46
46
|
options: {
|
|
@@ -60,7 +60,7 @@ const _sfc_main$q = {
|
|
|
60
60
|
});
|
|
61
61
|
return (_ctx, _cache) => {
|
|
62
62
|
const _component_el_tag = resolveComponent("el-tag");
|
|
63
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
63
|
+
return openBlock(), createElementBlock("div", _hoisted_1$l, [
|
|
64
64
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index2) => {
|
|
65
65
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
66
66
|
unref(values).includes(item.value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -87,10 +87,10 @@ const _sfc_main$q = {
|
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
const SCTJDictTag = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
90
|
+
const SCTJDictTag = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-659e1d01"]]);
|
|
91
91
|
const index_vue_vue_type_style_index_0_scope_true_lang = "";
|
|
92
|
-
const _hoisted_1$
|
|
93
|
-
const _sfc_main$
|
|
92
|
+
const _hoisted_1$k = ["xlink:href", "fill"];
|
|
93
|
+
const _sfc_main$q = {
|
|
94
94
|
__name: "index",
|
|
95
95
|
props: {
|
|
96
96
|
iconClass: {
|
|
@@ -123,7 +123,7 @@ const _sfc_main$p = {
|
|
|
123
123
|
createElementVNode("use", {
|
|
124
124
|
"xlink:href": unref(iconName),
|
|
125
125
|
fill: __props.color
|
|
126
|
-
}, null, 8, _hoisted_1$
|
|
126
|
+
}, null, 8, _hoisted_1$k)
|
|
127
127
|
], 2);
|
|
128
128
|
};
|
|
129
129
|
}
|
|
@@ -132,14 +132,14 @@ const index$2 = "";
|
|
|
132
132
|
const index$1 = "";
|
|
133
133
|
const index_vue_vue_type_style_index_0_scoped_006fbc77_lang = "";
|
|
134
134
|
const index_vue_vue_type_style_index_1_lang = "";
|
|
135
|
-
const _hoisted_1$
|
|
135
|
+
const _hoisted_1$j = { class: "upload-file" };
|
|
136
136
|
const _hoisted_2$b = { class: "el-upload__tip" };
|
|
137
137
|
const _hoisted_3$9 = { style: { "color": "#f56c6c" } };
|
|
138
138
|
const _hoisted_4$7 = { style: { "color": "#f56c6c" } };
|
|
139
139
|
const _hoisted_5$6 = ["title"];
|
|
140
140
|
const _hoisted_6$3 = { class: "ele-upload-list__item-content-action" };
|
|
141
141
|
const _hoisted_7$3 = { style: { "width": "100%", "height": "100%", "overflow": "auto" } };
|
|
142
|
-
const _sfc_main$
|
|
142
|
+
const _sfc_main$p = {
|
|
143
143
|
__name: "index",
|
|
144
144
|
props: {
|
|
145
145
|
modelValue: [String, Object, Array],
|
|
@@ -371,7 +371,7 @@ const _sfc_main$o = {
|
|
|
371
371
|
const _component_el_icon = resolveComponent("el-icon");
|
|
372
372
|
const _component_el_image = resolveComponent("el-image");
|
|
373
373
|
const _component_el_dialog = resolveComponent("el-dialog");
|
|
374
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
374
|
+
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
375
375
|
!__props.disabled ? (openBlock(), createBlock(_component_el_upload, mergeProps({
|
|
376
376
|
key: 0,
|
|
377
377
|
multiple: "",
|
|
@@ -517,9 +517,9 @@ const _sfc_main$o = {
|
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
519
|
};
|
|
520
|
-
const SCTJFileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
520
|
+
const SCTJFileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-006fbc77"]]);
|
|
521
521
|
const index_vue_vue_type_style_index_0_scoped_672e5149_lang = "";
|
|
522
|
-
const _hoisted_1$
|
|
522
|
+
const _hoisted_1$i = { class: "component-upload-image" };
|
|
523
523
|
const _hoisted_2$a = {
|
|
524
524
|
key: 0,
|
|
525
525
|
class: "el-upload__tip"
|
|
@@ -527,7 +527,7 @@ const _hoisted_2$a = {
|
|
|
527
527
|
const _hoisted_3$8 = { style: { "color": "#f56c6c" } };
|
|
528
528
|
const _hoisted_4$6 = { style: { "color": "#f56c6c" } };
|
|
529
529
|
const _hoisted_5$5 = ["src"];
|
|
530
|
-
const _sfc_main$
|
|
530
|
+
const _sfc_main$o = {
|
|
531
531
|
__name: "index",
|
|
532
532
|
props: {
|
|
533
533
|
modelValue: {
|
|
@@ -728,7 +728,7 @@ const _sfc_main$n = {
|
|
|
728
728
|
const _component_el_icon = resolveComponent("el-icon");
|
|
729
729
|
const _component_el_upload = resolveComponent("el-upload");
|
|
730
730
|
const _component_el_dialog = resolveComponent("el-dialog");
|
|
731
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
731
|
+
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
732
732
|
createVNode(_component_el_upload, mergeProps({
|
|
733
733
|
disabled: props.disabled,
|
|
734
734
|
multiple: "",
|
|
@@ -791,10 +791,10 @@ const _sfc_main$n = {
|
|
|
791
791
|
};
|
|
792
792
|
}
|
|
793
793
|
};
|
|
794
|
-
const SCTJImageUpload = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
795
|
-
const
|
|
796
|
-
const _hoisted_1$
|
|
797
|
-
const _sfc_main$
|
|
794
|
+
const SCTJImageUpload = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-672e5149"]]);
|
|
795
|
+
const index_vue_vue_type_style_index_0_scoped_e91fd2ba_lang = "";
|
|
796
|
+
const _hoisted_1$h = { class: "image-slot" };
|
|
797
|
+
const _sfc_main$n = {
|
|
798
798
|
__name: "index",
|
|
799
799
|
props: {
|
|
800
800
|
enableDelete: {
|
|
@@ -903,11 +903,12 @@ const _sfc_main$m = {
|
|
|
903
903
|
onClick: withModifiers(clickImage, ["stop", "prevent"]),
|
|
904
904
|
src: `${unref(realSrc)}`,
|
|
905
905
|
fit: "cover",
|
|
906
|
+
"show-progress": "",
|
|
906
907
|
style: normalizeStyle(`width:${unref(realWidth)};height:${unref(realHeight)};`),
|
|
907
908
|
"preview-src-list": unref(realSrcList)
|
|
908
909
|
}, {
|
|
909
910
|
error: withCtx(() => [
|
|
910
|
-
createElementVNode("div", _hoisted_1$
|
|
911
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
911
912
|
createVNode(_component_el_icon, { class: "el-icon-picture-outline" }, {
|
|
912
913
|
default: withCtx(() => [
|
|
913
914
|
createVNode(unref(Picture))
|
|
@@ -924,7 +925,7 @@ const _sfc_main$m = {
|
|
|
924
925
|
};
|
|
925
926
|
}
|
|
926
927
|
};
|
|
927
|
-
const SCTJImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
928
|
+
const SCTJImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-e91fd2ba"]]);
|
|
928
929
|
const icons = [
|
|
929
930
|
"404",
|
|
930
931
|
"bug",
|
|
@@ -1013,10 +1014,10 @@ const icons = [
|
|
|
1013
1014
|
"zip"
|
|
1014
1015
|
];
|
|
1015
1016
|
const index_vue_vue_type_style_index_0_scoped_37029e19_lang = "";
|
|
1016
|
-
const _hoisted_1$
|
|
1017
|
+
const _hoisted_1$g = { class: "icon-content" };
|
|
1017
1018
|
const _hoisted_2$9 = { class: "icon-list" };
|
|
1018
1019
|
const _hoisted_3$7 = ["onClick"];
|
|
1019
|
-
const _sfc_main$
|
|
1020
|
+
const _sfc_main$m = {
|
|
1020
1021
|
__name: "index",
|
|
1021
1022
|
props: {
|
|
1022
1023
|
modelValue: {
|
|
@@ -1107,12 +1108,12 @@ const _sfc_main$l = {
|
|
|
1107
1108
|
unref(iconName) ? {
|
|
1108
1109
|
name: "prefix",
|
|
1109
1110
|
fn: withCtx(() => [
|
|
1110
|
-
createVNode(_sfc_main$
|
|
1111
|
+
createVNode(_sfc_main$q, { "icon-class": unref(iconName) }, null, 8, ["icon-class"])
|
|
1111
1112
|
]),
|
|
1112
1113
|
key: "0"
|
|
1113
1114
|
} : void 0
|
|
1114
1115
|
]), 1032, ["modelValue"]),
|
|
1115
|
-
withDirectives(createElementVNode("div", _hoisted_1$
|
|
1116
|
+
withDirectives(createElementVNode("div", _hoisted_1$g, [
|
|
1116
1117
|
createElementVNode("div", null, [
|
|
1117
1118
|
createVNode(_component_el_input, {
|
|
1118
1119
|
modelValue: keyWord.value,
|
|
@@ -1140,7 +1141,7 @@ const _sfc_main$l = {
|
|
|
1140
1141
|
key: index2,
|
|
1141
1142
|
onClick: ($event) => selectedIcon(item)
|
|
1142
1143
|
}, [
|
|
1143
|
-
createVNode(_sfc_main$
|
|
1144
|
+
createVNode(_sfc_main$q, {
|
|
1144
1145
|
"icon-class": item,
|
|
1145
1146
|
style: { "height": "30px", "width": "16px", "flex-shrink": "0" }
|
|
1146
1147
|
}, null, 8, ["icon-class"]),
|
|
@@ -1155,7 +1156,7 @@ const _sfc_main$l = {
|
|
|
1155
1156
|
};
|
|
1156
1157
|
}
|
|
1157
1158
|
};
|
|
1158
|
-
const SCTJIconSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1159
|
+
const SCTJIconSelect = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-37029e19"]]);
|
|
1159
1160
|
function useMobile() {
|
|
1160
1161
|
const isMobile = ref$1(false);
|
|
1161
1162
|
const checkIsMobile = () => {
|
|
@@ -1182,7 +1183,7 @@ function useMobile() {
|
|
|
1182
1183
|
checkIsMobile
|
|
1183
1184
|
};
|
|
1184
1185
|
}
|
|
1185
|
-
const _sfc_main$
|
|
1186
|
+
const _sfc_main$l = {
|
|
1186
1187
|
__name: "index",
|
|
1187
1188
|
props: {
|
|
1188
1189
|
modelValue: {
|
|
@@ -1287,8 +1288,8 @@ const _sfc_main$k = {
|
|
|
1287
1288
|
}
|
|
1288
1289
|
};
|
|
1289
1290
|
const index_vue_vue_type_style_index_0_scoped_a2fe1763_lang = "";
|
|
1290
|
-
const _hoisted_1$
|
|
1291
|
-
const _sfc_main$
|
|
1291
|
+
const _hoisted_1$f = { class: "el-tree-select" };
|
|
1292
|
+
const _sfc_main$k = {
|
|
1292
1293
|
__name: "index",
|
|
1293
1294
|
props: {
|
|
1294
1295
|
objMap: {
|
|
@@ -1382,7 +1383,7 @@ const _sfc_main$j = {
|
|
|
1382
1383
|
const _component_el_tree = resolveComponent("el-tree");
|
|
1383
1384
|
const _component_el_option = resolveComponent("el-option");
|
|
1384
1385
|
const _component_el_select = resolveComponent("el-select");
|
|
1385
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1386
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
1386
1387
|
createVNode(_component_el_select, {
|
|
1387
1388
|
style: { "width": "100%" },
|
|
1388
1389
|
modelValue: unref(valueId),
|
|
@@ -1422,10 +1423,10 @@ const _sfc_main$j = {
|
|
|
1422
1423
|
};
|
|
1423
1424
|
}
|
|
1424
1425
|
};
|
|
1425
|
-
const SCTJTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1426
|
+
const SCTJTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-a2fe1763"]]);
|
|
1426
1427
|
const index_vue_vue_type_style_index_0_scoped_8906f38f_lang = "";
|
|
1427
|
-
const _hoisted_1$
|
|
1428
|
-
const _sfc_main$
|
|
1428
|
+
const _hoisted_1$e = { class: "table-container" };
|
|
1429
|
+
const _sfc_main$j = {
|
|
1429
1430
|
__name: "index",
|
|
1430
1431
|
props: {
|
|
1431
1432
|
request: {
|
|
@@ -1665,7 +1666,7 @@ const _sfc_main$i = {
|
|
|
1665
1666
|
class: "TJ-table-container",
|
|
1666
1667
|
style: normalizeStyle({ height: __props.height })
|
|
1667
1668
|
}, [
|
|
1668
|
-
createElementVNode("div", _hoisted_1$
|
|
1669
|
+
createElementVNode("div", _hoisted_1$e, [
|
|
1669
1670
|
createVNode(_component_el_table, mergeProps({
|
|
1670
1671
|
ref_key: "tableRef",
|
|
1671
1672
|
ref: tableRef,
|
|
@@ -1745,18 +1746,18 @@ const _sfc_main$i = {
|
|
|
1745
1746
|
};
|
|
1746
1747
|
}
|
|
1747
1748
|
};
|
|
1748
|
-
const SCTJTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1749
|
+
const SCTJTable = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-8906f38f"]]);
|
|
1749
1750
|
const index_vue_vue_type_style_index_0_scoped_45fb95db_lang = "";
|
|
1750
|
-
const _sfc_main$
|
|
1751
|
-
const _hoisted_1$
|
|
1751
|
+
const _sfc_main$i = {};
|
|
1752
|
+
const _hoisted_1$d = { class: "table-container" };
|
|
1752
1753
|
function _sfc_render(_ctx, _cache) {
|
|
1753
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1754
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
1754
1755
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
1755
1756
|
]);
|
|
1756
1757
|
}
|
|
1757
|
-
const SCTJTableContainer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1758
|
+
const SCTJTableContainer = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render], ["__scopeId", "data-v-45fb95db"]]);
|
|
1758
1759
|
const index_vue_vue_type_style_index_0_scoped_46df4461_lang = "";
|
|
1759
|
-
const _sfc_main$
|
|
1760
|
+
const _sfc_main$h = {
|
|
1760
1761
|
__name: "index",
|
|
1761
1762
|
props: {
|
|
1762
1763
|
showSearch: {
|
|
@@ -1900,10 +1901,10 @@ const _sfc_main$g = {
|
|
|
1900
1901
|
};
|
|
1901
1902
|
}
|
|
1902
1903
|
};
|
|
1903
|
-
const SCTJRightToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1904
|
+
const SCTJRightToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-46df4461"]]);
|
|
1904
1905
|
const index_vue_vue_type_style_index_0_scoped_056cfdde_lang = "";
|
|
1905
|
-
const _hoisted_1$
|
|
1906
|
-
const _sfc_main$
|
|
1906
|
+
const _hoisted_1$c = { class: "table-top-action-container" };
|
|
1907
|
+
const _sfc_main$g = {
|
|
1907
1908
|
__name: "index",
|
|
1908
1909
|
props: {
|
|
1909
1910
|
showSearch: {
|
|
@@ -1930,7 +1931,7 @@ const _sfc_main$f = {
|
|
|
1930
1931
|
emit("refresh");
|
|
1931
1932
|
};
|
|
1932
1933
|
return (_ctx, _cache) => {
|
|
1933
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1934
|
+
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
1934
1935
|
renderSlot(_ctx.$slots, "left", {}, void 0, true),
|
|
1935
1936
|
renderSlot(_ctx.$slots, "right", {}, () => [
|
|
1936
1937
|
createVNode(SCTJRightToolbar, {
|
|
@@ -1944,10 +1945,10 @@ const _sfc_main$f = {
|
|
|
1944
1945
|
};
|
|
1945
1946
|
}
|
|
1946
1947
|
};
|
|
1947
|
-
const SCTJTableTopActionContainer = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1948
|
+
const SCTJTableTopActionContainer = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-056cfdde"]]);
|
|
1948
1949
|
const index_vue_vue_type_style_index_0_scoped_d913f5c9_lang = "";
|
|
1949
1950
|
const _withScopeId$4 = (n) => (pushScopeId("data-v-d913f5c9"), n = n(), popScopeId(), n);
|
|
1950
|
-
const _hoisted_1$
|
|
1951
|
+
const _hoisted_1$b = {
|
|
1951
1952
|
key: 0,
|
|
1952
1953
|
class: "search-container"
|
|
1953
1954
|
};
|
|
@@ -1961,7 +1962,7 @@ const _hoisted_5$4 = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ create
|
|
|
1961
1962
|
const _hoisted_6$2 = { class: "tag-container" };
|
|
1962
1963
|
const _hoisted_7$2 = { class: "tag-name" };
|
|
1963
1964
|
const _hoisted_8$2 = { class: "dialog-footer" };
|
|
1964
|
-
const _sfc_main$
|
|
1965
|
+
const _sfc_main$f = {
|
|
1965
1966
|
__name: "index",
|
|
1966
1967
|
props: {
|
|
1967
1968
|
mode: {
|
|
@@ -2225,7 +2226,7 @@ const _sfc_main$e = {
|
|
|
2225
2226
|
])
|
|
2226
2227
|
]),
|
|
2227
2228
|
default: withCtx(() => [
|
|
2228
|
-
unref(queryColumns).length ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2229
|
+
unref(queryColumns).length ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
2229
2230
|
createVNode(_component_el_card, { shadow: "hover" }, {
|
|
2230
2231
|
default: withCtx(() => [
|
|
2231
2232
|
createVNode(_component_el_form, {
|
|
@@ -2453,7 +2454,357 @@ const _sfc_main$e = {
|
|
|
2453
2454
|
};
|
|
2454
2455
|
}
|
|
2455
2456
|
};
|
|
2456
|
-
const SCTJDialogTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2457
|
+
const SCTJDialogTable = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-d913f5c9"]]);
|
|
2458
|
+
const index_vue_vue_type_style_index_0_scoped_80cb4921_lang = "";
|
|
2459
|
+
const _hoisted_1$a = { style: { "background": "#fff" } };
|
|
2460
|
+
const _sfc_main$e = {
|
|
2461
|
+
__name: "index",
|
|
2462
|
+
props: {
|
|
2463
|
+
tableData: {
|
|
2464
|
+
type: Array,
|
|
2465
|
+
default: () => []
|
|
2466
|
+
},
|
|
2467
|
+
showPagination: {
|
|
2468
|
+
type: Boolean,
|
|
2469
|
+
default: true
|
|
2470
|
+
},
|
|
2471
|
+
total: {
|
|
2472
|
+
type: Number,
|
|
2473
|
+
default: 0
|
|
2474
|
+
},
|
|
2475
|
+
stripe: {
|
|
2476
|
+
type: Boolean,
|
|
2477
|
+
default: true
|
|
2478
|
+
},
|
|
2479
|
+
currentPage: {
|
|
2480
|
+
type: Number,
|
|
2481
|
+
default: 1
|
|
2482
|
+
},
|
|
2483
|
+
pageSize: {
|
|
2484
|
+
type: Number,
|
|
2485
|
+
default: 5
|
|
2486
|
+
},
|
|
2487
|
+
loading: {
|
|
2488
|
+
type: Boolean,
|
|
2489
|
+
default: false
|
|
2490
|
+
},
|
|
2491
|
+
autoScroll: {
|
|
2492
|
+
type: Boolean,
|
|
2493
|
+
default: false
|
|
2494
|
+
},
|
|
2495
|
+
scrollSpeed: {
|
|
2496
|
+
type: Number,
|
|
2497
|
+
default: 50
|
|
2498
|
+
},
|
|
2499
|
+
scrollStep: {
|
|
2500
|
+
type: [Number, null],
|
|
2501
|
+
default: null
|
|
2502
|
+
},
|
|
2503
|
+
pauseOnHover: {
|
|
2504
|
+
type: Boolean,
|
|
2505
|
+
default: true
|
|
2506
|
+
},
|
|
2507
|
+
tableHeight: {
|
|
2508
|
+
type: [String, Number],
|
|
2509
|
+
default: 300
|
|
2510
|
+
},
|
|
2511
|
+
debug: {
|
|
2512
|
+
type: Boolean,
|
|
2513
|
+
default: false
|
|
2514
|
+
},
|
|
2515
|
+
summaryMethod: {
|
|
2516
|
+
type: Function
|
|
2517
|
+
},
|
|
2518
|
+
showSummary: {
|
|
2519
|
+
type: Boolean,
|
|
2520
|
+
default: false
|
|
2521
|
+
}
|
|
2522
|
+
},
|
|
2523
|
+
emits: ["query", "sortChange", "update:currentPage", "update:pageSize"],
|
|
2524
|
+
setup(__props, { expose, emit }) {
|
|
2525
|
+
const props = __props;
|
|
2526
|
+
const { isMobile } = useMobile();
|
|
2527
|
+
const tableRef = ref$1(null);
|
|
2528
|
+
const isHovered = ref$1(false);
|
|
2529
|
+
const scrollContainer = ref$1(null);
|
|
2530
|
+
const canAutoScroll = ref$1(false);
|
|
2531
|
+
const tableBodyWrapper = shallowRef(null);
|
|
2532
|
+
const animationFrameId = ref$1(null);
|
|
2533
|
+
const lastScrollTime = ref$1(0);
|
|
2534
|
+
const scrollMetrics = ref$1({
|
|
2535
|
+
scrollHeight: 0,
|
|
2536
|
+
clientHeight: 0,
|
|
2537
|
+
isScrollable: false
|
|
2538
|
+
});
|
|
2539
|
+
const current = computed$1({
|
|
2540
|
+
get() {
|
|
2541
|
+
return props.currentPage;
|
|
2542
|
+
},
|
|
2543
|
+
set(val) {
|
|
2544
|
+
emit("update:currentPage", val);
|
|
2545
|
+
}
|
|
2546
|
+
});
|
|
2547
|
+
const size = computed$1({
|
|
2548
|
+
get() {
|
|
2549
|
+
return props.pageSize;
|
|
2550
|
+
},
|
|
2551
|
+
set(val) {
|
|
2552
|
+
emit("update:pageSize", val);
|
|
2553
|
+
}
|
|
2554
|
+
});
|
|
2555
|
+
const getTableData = () => {
|
|
2556
|
+
emit("query");
|
|
2557
|
+
};
|
|
2558
|
+
const debounce = (func, wait) => {
|
|
2559
|
+
let timeout;
|
|
2560
|
+
return function executedFunction(...args) {
|
|
2561
|
+
const later = () => {
|
|
2562
|
+
clearTimeout(timeout);
|
|
2563
|
+
func(...args);
|
|
2564
|
+
};
|
|
2565
|
+
clearTimeout(timeout);
|
|
2566
|
+
timeout = setTimeout(later, wait);
|
|
2567
|
+
};
|
|
2568
|
+
};
|
|
2569
|
+
const debugLog = (message, data) => {
|
|
2570
|
+
};
|
|
2571
|
+
const getScrollContainer = () => {
|
|
2572
|
+
if (!tableBodyWrapper.value && scrollContainer.value) {
|
|
2573
|
+
tableBodyWrapper.value = scrollContainer.value.querySelector(".el-scrollbar__wrap");
|
|
2574
|
+
}
|
|
2575
|
+
return tableBodyWrapper.value;
|
|
2576
|
+
};
|
|
2577
|
+
const getScrollStep = () => {
|
|
2578
|
+
var _a;
|
|
2579
|
+
if (props.scrollStep)
|
|
2580
|
+
return props.scrollStep;
|
|
2581
|
+
if (scrollContainer.value) {
|
|
2582
|
+
let cell = scrollContainer.value.querySelector("td");
|
|
2583
|
+
return (_a = cell == null ? void 0 : cell.clientHeight) != null ? _a : 33;
|
|
2584
|
+
}
|
|
2585
|
+
};
|
|
2586
|
+
const updateScrollMetrics = () => {
|
|
2587
|
+
const wrapper = getScrollContainer();
|
|
2588
|
+
if (!wrapper)
|
|
2589
|
+
return false;
|
|
2590
|
+
const scrollHeight = wrapper.scrollHeight;
|
|
2591
|
+
const clientHeight = wrapper.clientHeight;
|
|
2592
|
+
const isScrollable = scrollHeight > clientHeight;
|
|
2593
|
+
if (scrollMetrics.value.scrollHeight !== scrollHeight || scrollMetrics.value.clientHeight !== clientHeight) {
|
|
2594
|
+
scrollMetrics.value = {
|
|
2595
|
+
scrollHeight,
|
|
2596
|
+
clientHeight,
|
|
2597
|
+
isScrollable
|
|
2598
|
+
};
|
|
2599
|
+
}
|
|
2600
|
+
return isScrollable;
|
|
2601
|
+
};
|
|
2602
|
+
const checkScrollable = () => {
|
|
2603
|
+
if (props.tableData.length === 0) {
|
|
2604
|
+
canAutoScroll.value = false;
|
|
2605
|
+
return false;
|
|
2606
|
+
}
|
|
2607
|
+
const isScrollable = updateScrollMetrics();
|
|
2608
|
+
canAutoScroll.value = isScrollable;
|
|
2609
|
+
return isScrollable;
|
|
2610
|
+
};
|
|
2611
|
+
const sortChange = (column) => {
|
|
2612
|
+
emit("sortChange", column);
|
|
2613
|
+
};
|
|
2614
|
+
const handleMouseEnter = () => {
|
|
2615
|
+
if (props.pauseOnHover) {
|
|
2616
|
+
isHovered.value = true;
|
|
2617
|
+
stopAutoScroll();
|
|
2618
|
+
}
|
|
2619
|
+
};
|
|
2620
|
+
const handleMouseLeave = () => {
|
|
2621
|
+
if (props.pauseOnHover) {
|
|
2622
|
+
isHovered.value = false;
|
|
2623
|
+
if (props.autoScroll && canAutoScroll.value) {
|
|
2624
|
+
startAutoScroll();
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
};
|
|
2628
|
+
const scrollAnimation = (timestamp) => {
|
|
2629
|
+
if (!props.autoScroll || isHovered.value && props.pauseOnHover) {
|
|
2630
|
+
animationFrameId.value = null;
|
|
2631
|
+
return;
|
|
2632
|
+
}
|
|
2633
|
+
if (timestamp - lastScrollTime.value < props.scrollSpeed) {
|
|
2634
|
+
animationFrameId.value = requestAnimationFrame(scrollAnimation);
|
|
2635
|
+
return;
|
|
2636
|
+
}
|
|
2637
|
+
lastScrollTime.value = timestamp;
|
|
2638
|
+
const wrapper = getScrollContainer();
|
|
2639
|
+
if (!wrapper) {
|
|
2640
|
+
stopAutoScroll();
|
|
2641
|
+
return;
|
|
2642
|
+
}
|
|
2643
|
+
const scrollStep = getScrollStep();
|
|
2644
|
+
const currentScrollTop = wrapper.scrollTop;
|
|
2645
|
+
const { scrollHeight, clientHeight } = scrollMetrics.value;
|
|
2646
|
+
const newScrollTop = currentScrollTop + scrollStep;
|
|
2647
|
+
const maxScrollTop = scrollHeight - clientHeight;
|
|
2648
|
+
if (newScrollTop >= maxScrollTop) {
|
|
2649
|
+
wrapper.scrollTop = 0;
|
|
2650
|
+
} else {
|
|
2651
|
+
wrapper.scrollTop = newScrollTop;
|
|
2652
|
+
}
|
|
2653
|
+
animationFrameId.value = requestAnimationFrame(scrollAnimation);
|
|
2654
|
+
};
|
|
2655
|
+
const startAutoScroll = () => {
|
|
2656
|
+
debugLog("startAutoScroll \u88AB\u8C03\u7528", {
|
|
2657
|
+
hasAnimation: !!animationFrameId.value,
|
|
2658
|
+
autoScroll: props.autoScroll,
|
|
2659
|
+
loading: props.loading,
|
|
2660
|
+
canAutoScroll: canAutoScroll.value
|
|
2661
|
+
});
|
|
2662
|
+
if (animationFrameId.value || !props.autoScroll || props.loading || !canAutoScroll.value) {
|
|
2663
|
+
return;
|
|
2664
|
+
}
|
|
2665
|
+
lastScrollTime.value = 0;
|
|
2666
|
+
animationFrameId.value = requestAnimationFrame(scrollAnimation);
|
|
2667
|
+
};
|
|
2668
|
+
const stopAutoScroll = () => {
|
|
2669
|
+
if (animationFrameId.value) {
|
|
2670
|
+
cancelAnimationFrame(animationFrameId.value);
|
|
2671
|
+
animationFrameId.value = null;
|
|
2672
|
+
}
|
|
2673
|
+
};
|
|
2674
|
+
const debouncedDataUpdate = debounce(() => {
|
|
2675
|
+
tableBodyWrapper.value = null;
|
|
2676
|
+
if (checkScrollable() && props.autoScroll && !props.loading) {
|
|
2677
|
+
startAutoScroll();
|
|
2678
|
+
} else {
|
|
2679
|
+
stopAutoScroll();
|
|
2680
|
+
}
|
|
2681
|
+
}, 150);
|
|
2682
|
+
watch(() => props.autoScroll, (newVal) => {
|
|
2683
|
+
if (newVal && canAutoScroll.value) {
|
|
2684
|
+
nextTick(() => {
|
|
2685
|
+
startAutoScroll();
|
|
2686
|
+
});
|
|
2687
|
+
} else {
|
|
2688
|
+
stopAutoScroll();
|
|
2689
|
+
}
|
|
2690
|
+
});
|
|
2691
|
+
watch(() => props.tableData.length, () => {
|
|
2692
|
+
debugLog("\u6570\u636E\u957F\u5EA6\u53D8\u5316", { length: props.tableData.length });
|
|
2693
|
+
debouncedDataUpdate();
|
|
2694
|
+
});
|
|
2695
|
+
watch(() => props.loading, (newVal) => {
|
|
2696
|
+
if (newVal) {
|
|
2697
|
+
stopAutoScroll();
|
|
2698
|
+
} else if (props.autoScroll && canAutoScroll.value) {
|
|
2699
|
+
nextTick(() => {
|
|
2700
|
+
startAutoScroll();
|
|
2701
|
+
});
|
|
2702
|
+
}
|
|
2703
|
+
});
|
|
2704
|
+
onMounted$1(() => {
|
|
2705
|
+
nextTick(() => {
|
|
2706
|
+
var _a;
|
|
2707
|
+
scrollContainer.value = (_a = tableRef.value) == null ? void 0 : _a.$el;
|
|
2708
|
+
debugLog("scrollContainer \u8BBE\u7F6E\u5B8C\u6210", !!scrollContainer.value);
|
|
2709
|
+
const initializeScroll = () => {
|
|
2710
|
+
if (checkScrollable()) {
|
|
2711
|
+
if (props.autoScroll && !props.loading) {
|
|
2712
|
+
startAutoScroll();
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
};
|
|
2716
|
+
setTimeout(initializeScroll, 100);
|
|
2717
|
+
});
|
|
2718
|
+
});
|
|
2719
|
+
onUnmounted(() => {
|
|
2720
|
+
var _a;
|
|
2721
|
+
stopAutoScroll();
|
|
2722
|
+
(_a = debouncedDataUpdate.cancel) == null ? void 0 : _a.call(debouncedDataUpdate);
|
|
2723
|
+
});
|
|
2724
|
+
expose({
|
|
2725
|
+
startAutoScroll,
|
|
2726
|
+
stopAutoScroll,
|
|
2727
|
+
checkScrollable,
|
|
2728
|
+
scrollToTop: () => {
|
|
2729
|
+
const wrapper = getScrollContainer();
|
|
2730
|
+
if (wrapper) {
|
|
2731
|
+
wrapper.scrollTop = 0;
|
|
2732
|
+
}
|
|
2733
|
+
},
|
|
2734
|
+
recheckAndStart: () => {
|
|
2735
|
+
tableBodyWrapper.value = null;
|
|
2736
|
+
if (checkScrollable() && props.autoScroll && !props.loading) {
|
|
2737
|
+
startAutoScroll();
|
|
2738
|
+
} else {
|
|
2739
|
+
stopAutoScroll();
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
});
|
|
2743
|
+
return (_ctx, _cache) => {
|
|
2744
|
+
const _component_el_table = resolveComponent("el-table");
|
|
2745
|
+
const _component_el_pagination = resolveComponent("el-pagination");
|
|
2746
|
+
const _directive_loading = resolveDirective("loading");
|
|
2747
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
2748
|
+
withDirectives((openBlock(), createBlock(_component_el_table, mergeProps({
|
|
2749
|
+
size: unref(isMobile) ? "small" : "default",
|
|
2750
|
+
ref_key: "tableRef",
|
|
2751
|
+
ref: tableRef,
|
|
2752
|
+
data: props.tableData,
|
|
2753
|
+
height: __props.tableHeight,
|
|
2754
|
+
"max-height": __props.tableHeight,
|
|
2755
|
+
"highlight-current-row": false,
|
|
2756
|
+
onSortChange: sortChange,
|
|
2757
|
+
onMouseenter: handleMouseEnter,
|
|
2758
|
+
onMouseleave: handleMouseLeave,
|
|
2759
|
+
stripe: __props.stripe,
|
|
2760
|
+
showSummary: __props.showSummary,
|
|
2761
|
+
"summary-method": __props.summaryMethod,
|
|
2762
|
+
"cell-class-name": "cell-class-name",
|
|
2763
|
+
"header-row-class-name": "header-row-class-name",
|
|
2764
|
+
"row-class-name": "row-class-name"
|
|
2765
|
+
}, _ctx.$attrs), {
|
|
2766
|
+
default: withCtx(() => [
|
|
2767
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
2768
|
+
]),
|
|
2769
|
+
_: 3
|
|
2770
|
+
}, 16, ["size", "data", "height", "max-height", "stripe", "showSummary", "summary-method"])), [
|
|
2771
|
+
[_directive_loading, __props.loading]
|
|
2772
|
+
]),
|
|
2773
|
+
__props.showPagination && __props.total > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2774
|
+
!unref(isMobile) ? (openBlock(), createBlock(_component_el_pagination, {
|
|
2775
|
+
key: 0,
|
|
2776
|
+
class: "pagination",
|
|
2777
|
+
background: "",
|
|
2778
|
+
onSizeChange: getTableData,
|
|
2779
|
+
onCurrentChange: getTableData,
|
|
2780
|
+
layout: "total, prev, pager, next",
|
|
2781
|
+
total: __props.total,
|
|
2782
|
+
"page-size": unref(size),
|
|
2783
|
+
"onUpdate:page-size": _cache[0] || (_cache[0] = ($event) => isRef(size) ? size.value = $event : null),
|
|
2784
|
+
"current-page": unref(current),
|
|
2785
|
+
"onUpdate:current-page": _cache[1] || (_cache[1] = ($event) => isRef(current) ? current.value = $event : null),
|
|
2786
|
+
small: ""
|
|
2787
|
+
}, null, 8, ["total", "page-size", "current-page"])) : (openBlock(), createBlock(_component_el_pagination, {
|
|
2788
|
+
key: 1,
|
|
2789
|
+
class: "pagination mobile-pagination",
|
|
2790
|
+
background: "",
|
|
2791
|
+
onSizeChange: getTableData,
|
|
2792
|
+
onCurrentChange: getTableData,
|
|
2793
|
+
layout: "total, prev, pager, next",
|
|
2794
|
+
total: __props.total,
|
|
2795
|
+
"page-size": unref(size),
|
|
2796
|
+
"onUpdate:page-size": _cache[2] || (_cache[2] = ($event) => isRef(size) ? size.value = $event : null),
|
|
2797
|
+
"current-page": unref(current),
|
|
2798
|
+
"onUpdate:current-page": _cache[3] || (_cache[3] = ($event) => isRef(current) ? current.value = $event : null),
|
|
2799
|
+
"pager-count": 5,
|
|
2800
|
+
small: ""
|
|
2801
|
+
}, null, 8, ["total", "page-size", "current-page"]))
|
|
2802
|
+
], 64)) : createCommentVNode("", true)
|
|
2803
|
+
]);
|
|
2804
|
+
};
|
|
2805
|
+
}
|
|
2806
|
+
};
|
|
2807
|
+
const SCTJScrollTable = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-80cb4921"]]);
|
|
2457
2808
|
const _sfc_main$d = {
|
|
2458
2809
|
__name: "index",
|
|
2459
2810
|
setup(__props) {
|
|
@@ -9096,13 +9447,13 @@ const SCTJDwgViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "dat
|
|
|
9096
9447
|
const components = [
|
|
9097
9448
|
{ component: SCTJDictTag, name: "SCTJDictTag" },
|
|
9098
9449
|
{ component: SCTJTreeSelect, name: "SCTJTreeSelect" },
|
|
9099
|
-
{ component: _sfc_main$
|
|
9450
|
+
{ component: _sfc_main$q, name: "SCTJIcon" },
|
|
9100
9451
|
{ component: SCTJFileUpload, name: "SCTJFileUpload" },
|
|
9101
9452
|
{ component: SCTJImageUpload, name: "SCTJImageUpload" },
|
|
9102
9453
|
{ component: SCTJImagePreview, name: "SCTJImagePreview" },
|
|
9103
9454
|
{ component: SCTJIconSelect, name: "SCTJIconSelect" },
|
|
9104
9455
|
{ component: SCTJSearch, name: "SCTJSearch" },
|
|
9105
|
-
{ component: _sfc_main$
|
|
9456
|
+
{ component: _sfc_main$l, name: "SCTJDateRangePicker" },
|
|
9106
9457
|
{ component: SCTJTable, name: "SCTJTable" },
|
|
9107
9458
|
{ component: SCTJTableContainer, name: "SCTJTableContainer" },
|
|
9108
9459
|
{ component: SCTJTablePageContainer, name: "SCTJTablePageContainer" },
|
|
@@ -9116,6 +9467,7 @@ const components = [
|
|
|
9116
9467
|
{ component: _sfc_main$6, name: "SCTJIframe" },
|
|
9117
9468
|
{ component: _sfc_main$5, name: "SCTJImportDialog" },
|
|
9118
9469
|
{ component: SCTJDialogTable, name: "SCTJDialogTable" },
|
|
9470
|
+
{ component: SCTJScrollTable, name: "SCTJScrollTable" },
|
|
9119
9471
|
{ component: SCTJMapViewer, name: "SCTJMapViewer" },
|
|
9120
9472
|
{ component: SCTJMapDrawingDialog, name: "SCTJMapDrawingDialog" },
|
|
9121
9473
|
{ component: SCTJBusinessMapDrawingDialog, name: "SCTJBusinessMapDrawingDialog" },
|
|
@@ -9131,13 +9483,13 @@ const index = {
|
|
|
9131
9483
|
install,
|
|
9132
9484
|
SCTJDictTag,
|
|
9133
9485
|
SCTJTreeSelect,
|
|
9134
|
-
SCTJIcon: _sfc_main$
|
|
9486
|
+
SCTJIcon: _sfc_main$q,
|
|
9135
9487
|
SCTJFileUpload,
|
|
9136
9488
|
SCTJImageUpload,
|
|
9137
9489
|
SCTJImagePreview,
|
|
9138
9490
|
SCTJIconSelect,
|
|
9139
9491
|
SCTJSearch,
|
|
9140
|
-
SCTJDateRangePicker: _sfc_main$
|
|
9492
|
+
SCTJDateRangePicker: _sfc_main$l,
|
|
9141
9493
|
SCTJTable,
|
|
9142
9494
|
SCTJTableContainer,
|
|
9143
9495
|
SCTJTablePageContainer,
|
|
@@ -9151,6 +9503,7 @@ const index = {
|
|
|
9151
9503
|
SCTJIframe: _sfc_main$6,
|
|
9152
9504
|
SCTJImportDialog: _sfc_main$5,
|
|
9153
9505
|
SCTJDialogTable,
|
|
9506
|
+
SCTJScrollTable,
|
|
9154
9507
|
SCTJMapViewer,
|
|
9155
9508
|
SCTJMapDrawingDialog,
|
|
9156
9509
|
SCTJBusinessMapDrawingDialog,
|
|
@@ -9163,13 +9516,13 @@ export {
|
|
|
9163
9516
|
_sfc_main$d as SCTJBtnContainer,
|
|
9164
9517
|
SCTJBusinessMapDrawingDialog,
|
|
9165
9518
|
SCTJCommonChart,
|
|
9166
|
-
_sfc_main$
|
|
9519
|
+
_sfc_main$l as SCTJDateRangePicker,
|
|
9167
9520
|
SCTJDialogTable,
|
|
9168
9521
|
SCTJDictTag,
|
|
9169
9522
|
SCTJDwgViewer,
|
|
9170
9523
|
SCTJFileUpload,
|
|
9171
9524
|
SCTJFlvPlayer,
|
|
9172
|
-
_sfc_main$
|
|
9525
|
+
_sfc_main$q as SCTJIcon,
|
|
9173
9526
|
SCTJIconSelect,
|
|
9174
9527
|
_sfc_main$6 as SCTJIframe,
|
|
9175
9528
|
SCTJImagePreview,
|
|
@@ -9179,6 +9532,7 @@ export {
|
|
|
9179
9532
|
SCTJMapViewer,
|
|
9180
9533
|
SCTJPieChart,
|
|
9181
9534
|
SCTJRightToolbar,
|
|
9535
|
+
SCTJScrollTable,
|
|
9182
9536
|
SCTJSearch,
|
|
9183
9537
|
SCTJTable,
|
|
9184
9538
|
SCTJTableContainer,
|