fangguo-component 1.1.2 → 1.1.4

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.
Files changed (150) hide show
  1. package/dist/ArgHover.css +20 -1
  2. package/dist/ArgHover.vue_vue_type_style_index_0_lang-CSymSDRl.js +56 -0
  3. package/dist/ButtonGroup-DqViorHX.js +134 -0
  4. package/dist/ButtonGroup.css +35 -1
  5. package/dist/CitySelect.vue_vue_type_script_setup_true_lang-DZp6834K.js +224 -0
  6. package/dist/ContentTitle-By0Zk1u7.js +30 -0
  7. package/dist/ContentTitle.css +6 -1
  8. package/dist/CustomInputV2-BqhBSO53.js +157 -0
  9. package/dist/CustomInputV2.css +5 -1
  10. package/dist/CustomMultipleInput-DRMTUtkE.js +125 -0
  11. package/dist/CustomMultipleInput.css +8 -1
  12. package/dist/DragResizable.css +126 -1
  13. package/dist/DragResizable.vue_vue_type_style_index_0_lang-BePpQHve.js +331 -0
  14. package/dist/DragSort-5WetnkmW.js +98 -0
  15. package/dist/DragSort.css +5 -1
  16. package/dist/ErrorImage-Ao9kEEUg.js +36 -0
  17. package/dist/ErrorImage.css +4 -1
  18. package/dist/FgCascader.css +37 -1
  19. package/dist/FgCascader.vue_vue_type_style_index_0_lang-CM8FxFLJ.js +2424 -0
  20. package/dist/HSelect-BFkWiCFi.js +671 -0
  21. package/dist/HSelect.css +80 -1
  22. package/dist/HSelectAll.vue_vue_type_script_setup_true_lang-BZX7ch2I.js +50 -0
  23. package/dist/HSelectSJ-DZmtdyjF.js +671 -0
  24. package/dist/HSelectSJ.css +88 -1
  25. package/dist/IdentifyAddress.vue_vue_type_script_setup_true_lang-BCIOF-Oy.js +5202 -0
  26. package/dist/ImageLoupe.vue_vue_type_script_setup_true_lang-BaXHYlDu.js +92 -0
  27. package/dist/LazyComponent.vue_vue_type_script_setup_true_lang-D5KGqlj4.js +107 -0
  28. package/dist/LazyPopover.vue_vue_type_script_setup_true_lang-B2vtU4f4.js +34 -0
  29. package/dist/LoadingBtn-DWm2cY9k.js +87 -0
  30. package/dist/LoadingBtn.css +12 -1
  31. package/dist/MInput-s_P63myh.js +114 -0
  32. package/dist/MInput.css +21 -1
  33. package/dist/MyTable-CHvxPYgk.js +94 -0
  34. package/dist/MyTable.css +33 -1
  35. package/dist/NoRender.vue_vue_type_script_setup_true_lang-B0G6jxPg.js +31 -0
  36. package/dist/SelectAddress-CCepDxu8.js +254 -0
  37. package/dist/SelectAddress.css +18 -1
  38. package/dist/SelectAll.vue_vue_type_script_setup_true_lang-CyzY8ams.js +101 -0
  39. package/dist/SelectAll2.vue_vue_type_script_setup_true_lang-CrsaohxU.js +103 -0
  40. package/dist/SelectCustomAll.css +8 -1
  41. package/dist/SelectCustomAll.vue_vue_type_style_index_0_lang-BEZwlGXa.js +111 -0
  42. package/dist/SelectTimePicker.vue_vue_type_script_setup_true_lang-Dk4TpTBN.js +48 -0
  43. package/dist/SelectTree-DHbWogEU.js +1276 -0
  44. package/dist/SelectTree.css +74 -1
  45. package/dist/SvgIcon-DIg0upEk.js +33 -0
  46. package/dist/TextCopy-th0FAxwl.js +44 -0
  47. package/dist/TextCopy.css +7 -1
  48. package/dist/TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-DVE1CxPm.js +174 -0
  49. package/dist/VirtualTable-Cm_L7q9W.js +703 -0
  50. package/dist/VirtualTable.css +185 -1
  51. package/dist/_commonjsHelpers-DnzVkjQg.js +38 -0
  52. package/dist/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
  53. package/dist/common-B1nSpTGn.js +9669 -0
  54. package/dist/components/VirtualTable/index.js +2 -2
  55. package/dist/components/argHover/index.js +2 -2
  56. package/dist/components/buttonGroup/index.js +2 -2
  57. package/dist/components/cascader/index.js +2 -2
  58. package/dist/components/citySelect/index.js +2 -2
  59. package/dist/components/contentTitle/index.js +2 -2
  60. package/dist/components/customInputV2/index.js +2 -2
  61. package/dist/components/customMultipleInput/index.js +2 -2
  62. package/dist/components/dragResizable/index.js +2 -2
  63. package/dist/components/dragSort/index.js +2 -2
  64. package/dist/components/errorImage/index.js +2 -2
  65. package/dist/components/hSelect/index.js +2 -2
  66. package/dist/components/hSelectAll/index.js +2 -2
  67. package/dist/components/hSelectSJ/index.js +2 -2
  68. package/dist/components/identifyAddress/index.js +2 -2
  69. package/dist/components/imageLoupe/index.js +2 -2
  70. package/dist/components/index.js +62 -62
  71. package/dist/components/lazyComponent/index.js +2 -2
  72. package/dist/components/lazyPopover/index.js +2 -2
  73. package/dist/components/loadingBtn/index.js +2 -2
  74. package/dist/components/mInput/index.js +2 -2
  75. package/dist/components/myTable/index.js +2 -2
  76. package/dist/components/noRender/index.js +2 -2
  77. package/dist/components/selectAddress/index.js +2 -2
  78. package/dist/components/selectAll/index.js +2 -2
  79. package/dist/components/selectAll2/index.js +2 -2
  80. package/dist/components/selectCustomAll/index.js +2 -2
  81. package/dist/components/selectTimePicker/index.js +2 -2
  82. package/dist/components/selectTree/index.js +2 -2
  83. package/dist/components/svgIcon/index.js +2 -2
  84. package/dist/components/textCopy/index.js +2 -2
  85. package/dist/components/textEllipsisTooltip/index.js +2 -2
  86. package/dist/dateShortcuts-DjFC_Txu.js +27 -0
  87. package/dist/directive/index.js +2 -2
  88. package/dist/directive/loading/index.js +2 -2
  89. package/dist/hooks/index.js +2 -2
  90. package/dist/hooks/usePagination/index.js +2 -2
  91. package/dist/index-BPnixsfc.js +103 -0
  92. package/dist/index-C9zyi90j.js +165 -0
  93. package/dist/index-CSMWzzp0.js +8 -0
  94. package/dist/index-DfQiknXJ.js +8 -0
  95. package/dist/index-DzdLpetc.js +29184 -0
  96. package/dist/index-uQXqC9BF.js +68 -0
  97. package/dist/index.css +1 -1
  98. package/dist/index.js +204 -194
  99. package/dist/loading-CGrVcnNl.js +47 -0
  100. package/dist/loading.css +110 -1
  101. package/dist/tools/ImageParserUtils/index.js +17239 -9074
  102. package/dist/tools/common/index.js +86 -86
  103. package/dist/tools/index.js +95 -95
  104. package/dist/usePagination-C63IRXjZ.js +29 -0
  105. package/dist/vue-virtual-scroller.esm-ZgBoGAjX.js +1507 -0
  106. package/package.json +1 -1
  107. package/dist/ArgHover.vue_vue_type_style_index_0_lang-CMhRP09M.js +0 -54
  108. package/dist/ButtonGroup-C0yZEkxK.js +0 -103
  109. package/dist/CitySelect.vue_vue_type_script_setup_true_lang-8EbHD3Nt.js +0 -159
  110. package/dist/ContentTitle-mqrusLjx.js +0 -24
  111. package/dist/CustomInputV2-uARhbFc8.js +0 -135
  112. package/dist/CustomMultipleInput-DDaqoHVU.js +0 -109
  113. package/dist/DragResizable.vue_vue_type_style_index_0_lang-CHv0gJmo.js +0 -179
  114. package/dist/DragSort-CfDeFAIG.js +0 -66
  115. package/dist/ErrorImage-CTP_5sal.js +0 -32
  116. package/dist/FgCascader.vue_vue_type_style_index_0_lang-BUZDDcVn.js +0 -1656
  117. package/dist/HSelect-Drf6YBwO.js +0 -468
  118. package/dist/HSelectAll.vue_vue_type_script_setup_true_lang-Blq9xpfa.js +0 -36
  119. package/dist/HSelectSJ-D3GrXmvj.js +0 -462
  120. package/dist/IdentifyAddress.vue_vue_type_script_setup_true_lang-BJheMI1q.js +0 -4743
  121. package/dist/ImageLoupe.vue_vue_type_script_setup_true_lang-BlX4VbRi.js +0 -79
  122. package/dist/LazyComponent.vue_vue_type_script_setup_true_lang-vNk68D8E.js +0 -82
  123. package/dist/LazyPopover.vue_vue_type_script_setup_true_lang-DcOrcH0T.js +0 -33
  124. package/dist/LoadingBtn-BhbhNboo.js +0 -66
  125. package/dist/MInput-CpoW17Wh.js +0 -101
  126. package/dist/MyTable-DmwyEVJb.js +0 -68
  127. package/dist/NoRender.vue_vue_type_script_setup_true_lang-Do36nSsV.js +0 -30
  128. package/dist/SelectAddress-B4oK5erq.js +0 -173
  129. package/dist/SelectAll.vue_vue_type_script_setup_true_lang-BC3q2U8f.js +0 -79
  130. package/dist/SelectAll2.vue_vue_type_script_setup_true_lang-CaET5eli.js +0 -74
  131. package/dist/SelectCustomAll.vue_vue_type_style_index_0_lang-_wCRO217.js +0 -83
  132. package/dist/SelectTimePicker.vue_vue_type_script_setup_true_lang-Bj0KMOKv.js +0 -45
  133. package/dist/SelectTree-Dm5259kY.js +0 -911
  134. package/dist/SvgIcon-C2ah8E0Z.js +0 -30
  135. package/dist/TextCopy-hOj-Wj2H.js +0 -41
  136. package/dist/TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-aZbEQmbM.js +0 -112
  137. package/dist/VirtualTable-BWugJiQ5.js +0 -349
  138. package/dist/_commonjsHelpers-ByYUsBRP.js +0 -33
  139. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  140. package/dist/common-BIEgCXbl.js +0 -7030
  141. package/dist/dateShortcuts-DDPtAhDI.js +0 -26
  142. package/dist/index-BRcBDlVs.js +0 -68
  143. package/dist/index-CeWudY6u.js +0 -8
  144. package/dist/index-DIX8TpoT.js +0 -118
  145. package/dist/index-DpPsTMp0.js +0 -8
  146. package/dist/index-epuVZjZV.js +0 -103
  147. package/dist/index-uf7oyYDF.js +0 -16847
  148. package/dist/loading-DJVNc0eN.js +0 -36
  149. package/dist/usePagination-CwShBEjA.js +0 -20
  150. package/dist/vue-virtual-scroller.esm-CH-jx4ri.js +0 -1051
@@ -0,0 +1,92 @@
1
+ import { ElImage } from "element-plus/es";
2
+ import { defineComponent, ref, computed, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, withDirectives, normalizeStyle, vShow } from "vue";
3
+ const _hoisted_1 = ["src"];
4
+ const lensSize = 100;
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "ImageLoupe",
7
+ props: {
8
+ src: {
9
+ type: String,
10
+ default: () => ""
11
+ },
12
+ hideOnClickModal: {
13
+ type: Boolean,
14
+ default: () => false
15
+ },
16
+ isLeft: {
17
+ type: Boolean,
18
+ default: () => false
19
+ }
20
+ },
21
+ setup(__props) {
22
+ const props = __props;
23
+ const showImg = ref(false);
24
+ const imgBoxRef = ref(null);
25
+ const zoom = 550 / lensSize;
26
+ const pos = ref({ x: 0, y: 0, width: 0, height: 0, offsetY: 0, offsetX: 0 });
27
+ const onMove = (e) => {
28
+ const box = imgBoxRef.value;
29
+ if (!box) return;
30
+ const rect = box.getBoundingClientRect();
31
+ let x = e.clientX - rect.left - lensSize / 2;
32
+ let y = e.clientY - rect.top - lensSize / 2;
33
+ x = Math.max(0, Math.min(x, rect.width - lensSize));
34
+ y = Math.max(0, Math.min(y, rect.height - lensSize));
35
+ pos.value = { x, y, width: rect.width, height: rect.height, offsetY: rect.top, offsetX: props.isLeft ? rect.left - 550 - 5 : rect.right + 5 };
36
+ };
37
+ const lensStyle = computed(() => ({
38
+ width: `${lensSize}px`,
39
+ height: `${lensSize}px`,
40
+ transform: `translate(${pos.value.x}px, ${pos.value.y}px)`
41
+ }));
42
+ const previewStyle = computed(() => ({
43
+ width: `${pos.value.width * zoom}px`,
44
+ height: `${pos.value.height * zoom}px`,
45
+ transform: `translate(${-pos.value.x * zoom}px, ${-pos.value.y * zoom}px)`
46
+ }));
47
+ return (_ctx, _cache) => {
48
+ const _component_el_image = ElImage;
49
+ return openBlock(), createElementBlock(Fragment, null, [
50
+ createElementVNode("div", {
51
+ ref_key: "imgBoxRef",
52
+ ref: imgBoxRef,
53
+ class: "rounded-[10px] relative w-full h-full",
54
+ onMouseenter: _cache[0] || (_cache[0] = ($event) => showImg.value = true),
55
+ onMouseleave: _cache[1] || (_cache[1] = ($event) => showImg.value = false),
56
+ onMousemove: onMove
57
+ }, [
58
+ createVNode(_component_el_image, {
59
+ ref: "target",
60
+ src: __props.src,
61
+ "preview-src-list": [__props.src],
62
+ "preview-teleported": true,
63
+ "hide-on-click-modal": __props.hideOnClickModal,
64
+ fit: "contain",
65
+ style: { "width": "100%", "height": "100%" }
66
+ }, null, 8, ["src", "preview-src-list", "hide-on-click-modal"]),
67
+ withDirectives(createElementVNode("div", {
68
+ class: "absolute bg-[rgba(0,0,0,0.2)] border border-white pointer-events-none left-0 top-0",
69
+ style: normalizeStyle(lensStyle.value)
70
+ }, null, 4), [
71
+ [vShow, showImg.value]
72
+ ])
73
+ ], 544),
74
+ withDirectives(createElementVNode("div", {
75
+ class: "fixed w-[550px] h-[550px] border overflow-hidden z-[9999] bg-[#ddd]",
76
+ style: normalizeStyle({ top: pos.value.offsetY + "px", left: pos.value.offsetX + "px" })
77
+ }, [
78
+ createElementVNode("img", {
79
+ class: "absolute top-0 left-0 max-w-[unset] object-contain",
80
+ src: __props.src,
81
+ style: normalizeStyle(previewStyle.value)
82
+ }, null, 12, _hoisted_1)
83
+ ], 4), [
84
+ [vShow, showImg.value && __props.src]
85
+ ])
86
+ ], 64);
87
+ };
88
+ }
89
+ });
90
+ export {
91
+ _sfc_main as _
92
+ };
@@ -0,0 +1,107 @@
1
+ import { defineComponent, ref, useAttrs, onMounted, onUnmounted, openBlock, createElementBlock, renderSlot, normalizeProps, mergeProps, unref, createCommentVNode } from "vue";
2
+ const _sfc_main = /* @__PURE__ */ defineComponent({
3
+ __name: "LazyComponent",
4
+ props: {
5
+ global: { type: Boolean, default: true },
6
+ root: {},
7
+ rootMargin: { default: "100px" },
8
+ threshold: { default: 0.1 },
9
+ immediate: { type: Boolean, default: false }
10
+ },
11
+ setup(__props) {
12
+ const props = __props;
13
+ const LayzComponentRef = ref(null);
14
+ const shouldRender = ref(props.immediate);
15
+ const attrs = useAttrs();
16
+ const getGlobalObserver = () => {
17
+ if (!window.__lazyObservers__) {
18
+ window.__lazyObservers__ = /* @__PURE__ */ new Map();
19
+ }
20
+ const key = `${props.rootMargin}_${props.threshold}`;
21
+ if (!window.__lazyObservers__.has(key)) {
22
+ const callbacks = /* @__PURE__ */ new WeakMap();
23
+ const observer = new IntersectionObserver(
24
+ (entries) => {
25
+ entries.forEach((entry) => {
26
+ if (entry.isIntersecting) {
27
+ const callback = callbacks.get(entry.target);
28
+ callback == null ? void 0 : callback();
29
+ observer.unobserve(entry.target);
30
+ }
31
+ });
32
+ },
33
+ {
34
+ root: props.root,
35
+ rootMargin: props.rootMargin,
36
+ threshold: props.threshold
37
+ }
38
+ );
39
+ window.__lazyObservers__.set(key, { observer, callbacks });
40
+ }
41
+ return window.__lazyObservers__.get(key);
42
+ };
43
+ const cleanup = () => {
44
+ if (!props.global || !window.__lazyObservers__) return;
45
+ const key = `${props.rootMargin}_${props.threshold}`;
46
+ const instance = window.__lazyObservers__.get(key);
47
+ if (instance && LayzComponentRef.value) {
48
+ instance.observer.unobserve(LayzComponentRef.value);
49
+ instance.callbacks.delete(LayzComponentRef.value);
50
+ }
51
+ };
52
+ onMounted(() => {
53
+ if (props.immediate) {
54
+ shouldRender.value = true;
55
+ return;
56
+ }
57
+ if (!("IntersectionObserver" in window)) {
58
+ shouldRender.value = true;
59
+ return;
60
+ }
61
+ const element = LayzComponentRef.value;
62
+ if (!element) return;
63
+ if (props.global) {
64
+ const { observer, callbacks } = getGlobalObserver();
65
+ callbacks.set(element, () => {
66
+ shouldRender.value = true;
67
+ });
68
+ observer.observe(element);
69
+ } else {
70
+ const observer = new IntersectionObserver(
71
+ ([entry]) => {
72
+ if (entry == null ? void 0 : entry.isIntersecting) {
73
+ shouldRender.value = true;
74
+ observer.disconnect();
75
+ }
76
+ },
77
+ {
78
+ root: props.root,
79
+ rootMargin: props.rootMargin,
80
+ threshold: props.threshold
81
+ }
82
+ );
83
+ observer.observe(element);
84
+ element.__localObserver__ = observer;
85
+ }
86
+ });
87
+ onUnmounted(() => {
88
+ cleanup();
89
+ const element = LayzComponentRef.value;
90
+ if (element == null ? void 0 : element.__localObserver__) {
91
+ element.__localObserver__.disconnect();
92
+ delete element.__localObserver__;
93
+ }
94
+ });
95
+ return (_ctx, _cache) => {
96
+ return openBlock(), createElementBlock("div", {
97
+ ref_key: "LayzComponentRef",
98
+ ref: LayzComponentRef
99
+ }, [
100
+ shouldRender.value ? renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({ key: 0 }, unref(attrs)))) : createCommentVNode("", true)
101
+ ], 512);
102
+ };
103
+ }
104
+ });
105
+ export {
106
+ _sfc_main as _
107
+ };
@@ -0,0 +1,34 @@
1
+ import { ElPopover } from "element-plus/es";
2
+ import { defineComponent, ref, openBlock, createElementBlock, renderSlot, createBlock, normalizeProps, mergeProps, withCtx } from "vue";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "LazyPopover",
5
+ props: {
6
+ props: {
7
+ type: Object,
8
+ default: () => ({})
9
+ }
10
+ },
11
+ setup(__props) {
12
+ const show = ref(false);
13
+ return (_ctx, _cache) => {
14
+ const _component_el_popover = ElPopover;
15
+ return !show.value ? (openBlock(), createElementBlock("span", {
16
+ key: 0,
17
+ onMouseenter: _cache[0] || (_cache[0] = ($event) => show.value = true)
18
+ }, [
19
+ renderSlot(_ctx.$slots, "reference")
20
+ ], 32)) : (openBlock(), createBlock(_component_el_popover, normalizeProps(mergeProps({ key: 1 }, __props.props)), {
21
+ reference: withCtx(() => [
22
+ renderSlot(_ctx.$slots, "reference")
23
+ ]),
24
+ default: withCtx(() => [
25
+ renderSlot(_ctx.$slots, "default")
26
+ ]),
27
+ _: 3
28
+ }, 16));
29
+ };
30
+ }
31
+ });
32
+ export {
33
+ _sfc_main as _
34
+ };
@@ -0,0 +1,87 @@
1
+ import './LoadingBtn.css';var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { ElButton } from "element-plus/es";
22
+ import { defineComponent, useModel, ref, getCurrentInstance, watch, openBlock, createBlock, mergeProps, withCtx, renderSlot, mergeModels } from "vue";
23
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
24
+ const _sfc_main = /* @__PURE__ */ defineComponent({
25
+ __name: "LoadingBtn",
26
+ props: /* @__PURE__ */ mergeModels({
27
+ stopHandle: { type: Function, default: () => {
28
+ return false;
29
+ } },
30
+ clickHandle: {}
31
+ }, {
32
+ "modelValue": { type: Boolean, default: false },
33
+ "modelModifiers": {}
34
+ }),
35
+ emits: /* @__PURE__ */ mergeModels(["click"], ["update:modelValue"]),
36
+ setup(__props) {
37
+ const modelValue = useModel(__props, "modelValue");
38
+ const loading = ref(false);
39
+ const prop = __props;
40
+ const isDev = false;
41
+ const instance = getCurrentInstance();
42
+ watch(() => loading.value, () => {
43
+ modelValue.value = loading.value;
44
+ });
45
+ const _clickHandle = () => __async(null, null, function* () {
46
+ var _a, _b, _c, _d, _e, _f, _g;
47
+ if (prop.stopHandle()) return;
48
+ if (!prop.clickHandle && !((_b = (_a = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a.props) == null ? void 0 : _b.onClick)) return;
49
+ loading.value = true;
50
+ try {
51
+ const onClick = (_d = (_c = instance == null ? void 0 : instance.vnode) == null ? void 0 : _c.props) == null ? void 0 : _d.onClick;
52
+ if (onClick) {
53
+ let len = 0;
54
+ if (isDev) ;
55
+ else {
56
+ const hasImmediateCall = /\)\s*\([^)]*\)\s*$/.test(onClick.toString());
57
+ len = hasImmediateCall ? 0 : onClick.length;
58
+ }
59
+ yield onClick(len ? loading : void 0);
60
+ !len && (loading.value = false);
61
+ } else {
62
+ yield (_f = prop == null ? void 0 : prop.clickHandle) == null ? void 0 : _f.call(prop, ((_e = prop == null ? void 0 : prop.clickHandle) == null ? void 0 : _e.length) ? loading : void 0);
63
+ !((_g = prop == null ? void 0 : prop.clickHandle) == null ? void 0 : _g.length) && (loading.value = false);
64
+ }
65
+ } catch (error) {
66
+ loading.value = false;
67
+ throw Error(error == null ? void 0 : error.message);
68
+ }
69
+ });
70
+ return (_ctx, _cache) => {
71
+ const _component_el_button = ElButton;
72
+ return openBlock(), createBlock(_component_el_button, mergeProps(prop, {
73
+ loading: loading.value,
74
+ onClick: _clickHandle
75
+ }), {
76
+ default: withCtx(() => [
77
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
78
+ ]),
79
+ _: 3
80
+ }, 16, ["loading"]);
81
+ };
82
+ }
83
+ });
84
+ const LoadingBtn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-650092a2"]]);
85
+ export {
86
+ LoadingBtn as L
87
+ };
@@ -1 +1,12 @@
1
- .el-button[data-v-650092a2] span{transition:transform .1s ease-in-out}.el-button[data-v-650092a2] .el-icon.is-loading{position:absolute;left:5px}.el-button[data-v-650092a2] .el-icon.is-loading+span{position:relative;transform:translate(6px);margin-left:0}
1
+ .el-button[data-v-650092a2] span {
2
+ transition: transform 0.1s ease-in-out;
3
+ }
4
+ .el-button[data-v-650092a2] .el-icon.is-loading {
5
+ position: absolute;
6
+ left: 5px;
7
+ }
8
+ .el-button[data-v-650092a2] .el-icon.is-loading + span {
9
+ position: relative;
10
+ transform: translateX(6px);
11
+ margin-left: 0;
12
+ }
@@ -0,0 +1,114 @@
1
+ import { defineComponent, ref, useModel, openBlock, createElementBlock, createVNode, unref, mergeProps, createSlots, withCtx, createElementVNode, renderSlot, toDisplayString, createCommentVNode, withKeys, withModifiers, createTextVNode, mergeModels } from "vue";
2
+ import { ElInput, ElDialog, ElButton } from "element-plus";
3
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
4
+ import './MInput.css';const _hoisted_1 = { class: "custom-input" };
5
+ const _hoisted_2 = {
6
+ key: 0,
7
+ class: "pb-[12px] text-fill-900",
8
+ style: { "font-family": "MicrosoftYaHei, sans-serif" }
9
+ };
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ __name: "MInput",
12
+ props: /* @__PURE__ */ mergeModels({
13
+ tip: {},
14
+ label: {},
15
+ placeholder: {},
16
+ saveBtnText: {}
17
+ }, {
18
+ "modelValue": { default: "" },
19
+ "modelModifiers": {}
20
+ }),
21
+ emits: /* @__PURE__ */ mergeModels(["saveEvent"], ["update:modelValue"]),
22
+ setup(__props, { emit: __emit }) {
23
+ const emit = __emit;
24
+ const showDetail = ref(false);
25
+ const model = useModel(__props, "modelValue");
26
+ const modelDetail = ref("");
27
+ const open = () => {
28
+ modelDetail.value = model.value;
29
+ showDetail.value = true;
30
+ };
31
+ const save = () => {
32
+ model.value = modelDetail.value;
33
+ showDetail.value = false;
34
+ emit("saveEvent", modelDetail.value);
35
+ };
36
+ return (_ctx, _cache) => {
37
+ return openBlock(), createElementBlock("div", _hoisted_1, [
38
+ createVNode(unref(ElInput), mergeProps({
39
+ class: "input",
40
+ modelValue: model.value,
41
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event)
42
+ }, _ctx.$attrs, {
43
+ placeholder: __props.placeholder,
44
+ clearable: ""
45
+ }), createSlots({
46
+ append: withCtx(() => [
47
+ createElementVNode("span", { onClick: open }, "•••")
48
+ ]),
49
+ _: 2
50
+ }, [
51
+ _ctx.$slots.prepend ? {
52
+ name: "prepend",
53
+ fn: withCtx(() => [
54
+ renderSlot(_ctx.$slots, "prepend", {}, void 0, true)
55
+ ]),
56
+ key: "0"
57
+ } : void 0
58
+ ]), 1040, ["modelValue", "placeholder"]),
59
+ createVNode(unref(ElDialog), {
60
+ class: "order-dialog",
61
+ modelValue: showDetail.value,
62
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => showDetail.value = $event),
63
+ width: "480px",
64
+ title: __props.label,
65
+ "align-center": "",
66
+ draggable: "",
67
+ "close-on-click-modal": false
68
+ }, {
69
+ footer: withCtx(() => [
70
+ createElementVNode("div", null, [
71
+ createVNode(unref(ElButton), {
72
+ type: "info",
73
+ plain: "",
74
+ onClick: _cache[3] || (_cache[3] = ($event) => showDetail.value = false)
75
+ }, {
76
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
77
+ createTextVNode("取消", -1)
78
+ ])]),
79
+ _: 1
80
+ }),
81
+ createVNode(unref(ElButton), {
82
+ class: "!ml-[14px]",
83
+ type: "primary",
84
+ onClick: save
85
+ }, {
86
+ default: withCtx(() => [
87
+ createTextVNode(toDisplayString(__props.saveBtnText || "确认"), 1)
88
+ ]),
89
+ _: 1
90
+ })
91
+ ])
92
+ ]),
93
+ default: withCtx(() => [
94
+ __props.tip ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(__props.tip), 1)) : createCommentVNode("", true),
95
+ createVNode(unref(ElInput), {
96
+ modelValue: modelDetail.value,
97
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => modelDetail.value = $event),
98
+ type: "textarea",
99
+ autosize: { minRows: 3, maxRows: 5 },
100
+ placeholder: __props.placeholder,
101
+ onKeyup: _cache[2] || (_cache[2] = withKeys(withModifiers(() => {
102
+ }, ["stop"]), ["enter"]))
103
+ }, null, 8, ["modelValue", "placeholder"])
104
+ ]),
105
+ _: 1
106
+ }, 8, ["modelValue", "title"])
107
+ ]);
108
+ };
109
+ }
110
+ });
111
+ const MInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d19cb983"]]);
112
+ export {
113
+ MInput as M
114
+ };
package/dist/MInput.css CHANGED
@@ -1 +1,21 @@
1
- .custom-input[data-v-d19cb983]{background:var(--el-color-primary);display:inline-block;width:100%}.custom-input[data-v-d19cb983] .el-input-group__append{cursor:pointer;padding-left:0;padding-right:0}.custom-input[data-v-d19cb983] .el-input-group__append span{display:inline-block;line-height:30px;padding:0 8px}.custom-input[data-v-d19cb983] .input.active .el-input__wrapper{box-shadow:0 0 0 2px var(--el-color-primary) inset}.custom-input[data-v-d19cb983] .input.active .el-input-group__append{box-shadow:0 2px 0 0 var(--el-color-primary) inset,0 -2px 0 0 var(--el-color-primary) inset,-2px 0 0 0 var(--el-color-primary) inset}
1
+ .custom-input[data-v-d19cb983] {
2
+ background: var(--el-color-primary);
3
+ display: inline-block;
4
+ width: 100%;
5
+ }
6
+ .custom-input[data-v-d19cb983] .el-input-group__append {
7
+ cursor: pointer;
8
+ padding-left: 0px;
9
+ padding-right: 0px;
10
+ }
11
+ .custom-input[data-v-d19cb983] .el-input-group__append span {
12
+ display: inline-block;
13
+ line-height: 30px;
14
+ padding: 0 8px;
15
+ }
16
+ .custom-input[data-v-d19cb983] .input.active .el-input__wrapper {
17
+ box-shadow: 0 0 0 2px var(--el-color-primary) inset;
18
+ }
19
+ .custom-input[data-v-d19cb983] .input.active .el-input-group__append {
20
+ box-shadow: 0 2px 0 0 var(--el-color-primary) inset, 0 -2px 0 0 var(--el-color-primary) inset, -2px 0 0 0 var(--el-color-primary) inset;
21
+ }
@@ -0,0 +1,94 @@
1
+ import { ElTable, ElEmpty } from "element-plus/es";
2
+ import { defineComponent, useAttrs, ref, resolveDirective, withDirectives, openBlock, createBlock, mergeProps, unref, createSlots, withCtx, renderSlot, renderList, normalizeProps, guardReactiveProps, createVNode } from "vue";
3
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
4
+ import './MyTable.css';const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "MyTable",
6
+ props: {
7
+ noTouchSelectColum: {
8
+ type: Array,
9
+ default: () => []
10
+ },
11
+ noTouchSelect: {
12
+ type: Boolean,
13
+ default: false
14
+ }
15
+ },
16
+ setup(__props, { expose: __expose }) {
17
+ const attrs = useAttrs();
18
+ const tableRef = ref();
19
+ const getSelectionRows = () => {
20
+ return tableRef.value.getSelectionRows();
21
+ };
22
+ const toggleRowSelection = (row) => {
23
+ tableRef.value.toggleRowSelection(row, void 0);
24
+ };
25
+ const clearSelection = () => {
26
+ return tableRef.value.clearSelection();
27
+ };
28
+ const clearSort = () => {
29
+ return tableRef.value.clearSort();
30
+ };
31
+ const props = __props;
32
+ const noTouchColumn = ref(["操作", ...props.noTouchSelectColum]);
33
+ const selectCurrentRow = (row, column, event) => {
34
+ if (!noTouchColumn.value.includes(column == null ? void 0 : column.label) && !props.noTouchSelect) {
35
+ tableRef.value.toggleRowSelection(row);
36
+ tableRef.value.$emit("select", tableRef.value.store.states.selection.value, row);
37
+ }
38
+ };
39
+ __expose({
40
+ getSelectionRows,
41
+ toggleRowSelection,
42
+ clearSelection,
43
+ clearSort,
44
+ tableRef
45
+ });
46
+ return (_ctx, _cache) => {
47
+ const _component_el_empty = ElEmpty;
48
+ const _component_el_table = ElTable;
49
+ const _directive_horizontal_scroll = resolveDirective("horizontal-scroll");
50
+ return withDirectives((openBlock(), createBlock(_component_el_table, mergeProps(unref(attrs), {
51
+ ref_key: "tableRef",
52
+ ref: tableRef,
53
+ class: _ctx.$style["feikuai-table"],
54
+ onRowClick: selectCurrentRow
55
+ }), createSlots({
56
+ default: withCtx(() => [
57
+ renderSlot(_ctx.$slots, "default")
58
+ ]),
59
+ _: 2
60
+ }, [
61
+ renderList(_ctx.$slots, (_, slotName) => {
62
+ return {
63
+ name: slotName,
64
+ fn: withCtx((slotProps) => [
65
+ renderSlot(_ctx.$slots, slotName, normalizeProps(guardReactiveProps(slotProps)))
66
+ ])
67
+ };
68
+ }),
69
+ !_ctx.$slots.empty ? {
70
+ name: "empty",
71
+ fn: withCtx(() => [
72
+ createVNode(_component_el_empty, {
73
+ description: "暂无数据",
74
+ "image-size": 80
75
+ })
76
+ ]),
77
+ key: "0"
78
+ } : void 0
79
+ ]), 1040, ["class"])), [
80
+ [_directive_horizontal_scroll]
81
+ ]);
82
+ };
83
+ }
84
+ });
85
+ const style0 = {
86
+ "feikuai-table": "_feikuai-table_i7sb4_1"
87
+ };
88
+ const cssModules = {
89
+ "$style": style0
90
+ };
91
+ const MyTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
92
+ export {
93
+ MyTable as M
94
+ };
package/dist/MyTable.css CHANGED
@@ -1 +1,33 @@
1
- ._feikuai-table_i7sb4_1{border-top-left-radius:6px;border-top-right-radius:6px}._feikuai-table_i7sb4_1 thead{font-size:15px;font-family:MicrosoftYaHei,sans-serif;color:#0b0c24}._feikuai-table_i7sb4_1 thead .cell{color:#0b0c24}._feikuai-table_i7sb4_1 thead th{font-weight:400}._feikuai-table_i7sb4_1 th.el-table__cell{padding:5px 0;color:#0b0c24;background-color:#e2e8f7!important;border-color:#cfd6e7}._feikuai-table_i7sb4_1 th.el-table__cell .sort-caret.descending{border-top-color:#9198a8}._feikuai-table_i7sb4_1 th.el-table__cell .sort-caret.ascending{border-bottom-color:#9198a8}._feikuai-table_i7sb4_1 th.el-table__cell.descending .sort-caret.descending{border-top-color:#000}._feikuai-table_i7sb4_1 th.el-table__cell.ascending .sort-caret.ascending{border-bottom-color:#000}
1
+ ._feikuai-table_i7sb4_1 {
2
+ border-top-left-radius: 6px;
3
+ border-top-right-radius: 6px;
4
+ }
5
+ ._feikuai-table_i7sb4_1 thead {
6
+ font-size: 15px;
7
+ font-family: MicrosoftYaHei, sans-serif;
8
+ color: #0B0C24;
9
+ }
10
+ ._feikuai-table_i7sb4_1 thead .cell {
11
+ color: #0B0C24;
12
+ }
13
+ ._feikuai-table_i7sb4_1 thead th {
14
+ font-weight: normal;
15
+ }
16
+ ._feikuai-table_i7sb4_1 th.el-table__cell {
17
+ padding: 5px 0;
18
+ color: #0B0C24;
19
+ background-color: #E2E8F7 !important;
20
+ border-color: #CFD6E7;
21
+ }
22
+ ._feikuai-table_i7sb4_1 th.el-table__cell .sort-caret.descending {
23
+ border-top-color: #9198A8;
24
+ }
25
+ ._feikuai-table_i7sb4_1 th.el-table__cell .sort-caret.ascending {
26
+ border-bottom-color: #9198A8;
27
+ }
28
+ ._feikuai-table_i7sb4_1 th.el-table__cell.descending .sort-caret.descending {
29
+ border-top-color: #000;
30
+ }
31
+ ._feikuai-table_i7sb4_1 th.el-table__cell.ascending .sort-caret.ascending {
32
+ border-bottom-color: #000;
33
+ }
@@ -0,0 +1,31 @@
1
+ import { ElTableColumn } from "element-plus/es";
2
+ import { defineComponent, useAttrs, openBlock, createBlock, mergeProps, unref, toHandlers } from "vue";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "NoRender",
5
+ props: {
6
+ pageNo: {
7
+ type: Number,
8
+ default: () => 1
9
+ },
10
+ pageSize: {
11
+ type: Number,
12
+ default: () => 10
13
+ }
14
+ },
15
+ setup(__props) {
16
+ const attrs = useAttrs();
17
+ return (_ctx, _cache) => {
18
+ const _component_el_table_column = ElTableColumn;
19
+ return openBlock(), createBlock(_component_el_table_column, mergeProps(unref(attrs), toHandlers(unref(attrs)), {
20
+ type: "index",
21
+ index: (i) => (__props.pageNo - 1) * __props.pageSize + i + 1,
22
+ label: "序号",
23
+ align: "center",
24
+ width: "60"
25
+ }), null, 16, ["index"]);
26
+ };
27
+ }
28
+ });
29
+ export {
30
+ _sfc_main as _
31
+ };