ninemoon-ui 0.0.27 → 0.1.0

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 (135) hide show
  1. package/dist/assets/dialog-a1b585e9.css +9 -0
  2. package/dist/assets/index-6d2c28a9.css +1210 -0
  3. package/dist/{tabs.css → assets/tabs-d2c8965f.css} +3 -3
  4. package/dist/components/alert/alert.d.ts +3 -11
  5. package/dist/components/alert/alertcomponent.vue.d.ts +22 -11
  6. package/dist/components/badge/badge.vue.d.ts +2 -0
  7. package/dist/components/carousel/carousel.vue.d.ts +29 -3
  8. package/dist/components/{tree/tree.vue.d.ts → carousel/clickbutton.vue.d.ts} +6 -19
  9. package/dist/components/check/checkbox.vue.d.ts +24 -16
  10. package/dist/components/check/checkgroup.vue.d.ts +15 -3
  11. package/dist/components/date/datepicker.vue.d.ts +28 -6
  12. package/dist/components/date/datepickerRange.vue.d.ts +15 -4
  13. package/dist/components/form/form.vue.d.ts +7 -20
  14. package/dist/components/form/formlabel.vue.d.ts +3 -3
  15. package/dist/components/form/type.d.ts +11 -0
  16. package/dist/components/icon/add.vue.d.ts +2 -0
  17. package/dist/components/icon/alertTip.vue.d.ts +2 -0
  18. package/dist/components/icon/arrow.vue.d.ts +2 -0
  19. package/dist/components/icon/calendar.vue.d.ts +2 -0
  20. package/dist/components/icon/close.vue.d.ts +2 -0
  21. package/dist/components/icon/dateArrow.vue.d.ts +2 -0
  22. package/dist/components/icon/dateArrowplus.vue.d.ts +2 -0
  23. package/dist/components/icon/delete.vue.d.ts +2 -0
  24. package/dist/components/icon/ellipsis.vue.d.ts +2 -0
  25. package/dist/components/icon/errTip.vue.d.ts +2 -0
  26. package/dist/components/icon/eye.vue.d.ts +2 -0
  27. package/dist/components/icon/infoTip.vue.d.ts +2 -0
  28. package/dist/components/icon/minus.vue.d.ts +2 -0
  29. package/dist/components/icon/successTip.vue.d.ts +2 -0
  30. package/dist/components/icon/turnleft.vue.d.ts +2 -0
  31. package/dist/components/icon/turnright.vue.d.ts +2 -0
  32. package/dist/components/icon/warnTip.vue.d.ts +2 -0
  33. package/dist/components/input/input.vue.d.ts +13 -8
  34. package/dist/components/loadding/loadcomponent.vue.d.ts +24 -4
  35. package/dist/components/loadding/loadding.d.ts +12 -19
  36. package/dist/components/menu/menu.vue.d.ts +13 -3
  37. package/dist/components/message/message.d.ts +68 -14
  38. package/dist/components/message/messagecomponent.vue.d.ts +5 -13
  39. package/dist/components/numberInput/numberinput.vue.d.ts +3 -3
  40. package/dist/components/pagination/pagination.vue.d.ts +24 -0
  41. package/dist/components/popover/poparrow.d.ts +55 -0
  42. package/dist/components/popover/popover.vue.d.ts +10 -4
  43. package/dist/components/radio/radiobox.vue.d.ts +24 -16
  44. package/dist/components/radio/radiogroup.vue.d.ts +15 -3
  45. package/dist/components/scrollBar/movebar.vue.d.ts +2 -2
  46. package/dist/components/scrollBar/scrollBar.vue.d.ts +12 -16
  47. package/dist/components/scrollloading/scrolllead.d.ts +18 -11
  48. package/dist/components/select/select.vue.d.ts +15 -1
  49. package/dist/components/select/selectoption.vue.d.ts +18 -6
  50. package/dist/components/switch/switch.vue.d.ts +14 -14
  51. package/dist/components/table/table.vue.d.ts +20 -9
  52. package/dist/components/table/tableItem.vue.d.ts +10 -4
  53. package/dist/components/tabs/tabs.vue.d.ts +14 -1
  54. package/dist/directives/arrowKeys.d.ts +10 -0
  55. package/dist/directives/drag.d.ts +20 -0
  56. package/dist/directives/escape.d.ts +7 -0
  57. package/dist/directives/outsideclick.d.ts +14 -0
  58. package/dist/directives/watchwindow.d.ts +13 -0
  59. package/dist/directives/wheel.d.ts +12 -0
  60. package/dist/directives/whitespaceclick.d.ts +12 -0
  61. package/dist/index.d.ts +831 -401
  62. package/dist/js/arrow-ebe47bd0.js +17 -0
  63. package/dist/js/{badge/badge.js → badge-496028b6.js} +9 -16
  64. package/dist/js/calendar-5c242731.js +87 -0
  65. package/dist/js/carousel-10621aeb.js +155 -0
  66. package/dist/js/{carousel/carouselitem.js → carouselitem-89116745.js} +1 -7
  67. package/dist/js/checkbox-530025c4.js +50 -0
  68. package/dist/js/checkgroup-e4e6adbc.js +58 -0
  69. package/dist/js/dateArrowplus-8181993f.js +25 -0
  70. package/dist/js/datepicker-ef8b7019.js +362 -0
  71. package/dist/js/datepickerRange-4c400f88.js +500 -0
  72. package/dist/js/delete-e898f83c.js +19 -0
  73. package/dist/js/dialog-0127ca01.js +122 -0
  74. package/dist/js/form-6ae96387.js +79 -0
  75. package/dist/js/formlabel-9339bd1c.js +136 -0
  76. package/dist/js/image-76711716.js +300 -0
  77. package/dist/js/index-283810a0.js +6261 -0
  78. package/dist/js/index-b4e420ce.js +958 -0
  79. package/dist/js/index-e12c8d65.js +36 -0
  80. package/dist/js/input-11fe67a5.js +107 -0
  81. package/dist/js/menu-fb9b4a4f.js +86 -0
  82. package/dist/js/numberinput-00fa4429.js +119 -0
  83. package/dist/js/pagination-3bcaa109.js +203 -0
  84. package/dist/js/popover-45f75f86.js +345 -0
  85. package/dist/js/radiobox-8f11e726.js +49 -0
  86. package/dist/js/radiogroup-727923c7.js +33 -0
  87. package/dist/js/scrollBar-07906042.js +252 -0
  88. package/dist/js/select-b5bbb138.js +203 -0
  89. package/dist/js/selectoption-00c8f06d.js +57 -0
  90. package/dist/js/shapeFlag-8cf4bcf1.js +17 -0
  91. package/dist/js/switch-06ae74cc.js +50 -0
  92. package/dist/js/table-9bb52630.js +270 -0
  93. package/dist/js/{table/tableItem.js → tableItem-7d8bf2db.js} +1 -1
  94. package/dist/js/{tabs/tabs.js → tabs-9d7be734.js} +57 -59
  95. package/dist/js/{upload/upload.js → upload-16dbef22.js} +8 -23
  96. package/dist/types/shapeFlag.d.ts +13 -0
  97. package/dist/{components/utils → utils}/tool.d.ts +11 -4
  98. package/package.json +1 -1
  99. package/dist/badge.css +0 -27
  100. package/dist/carousel.css +0 -13
  101. package/dist/checkgroup.css +0 -41
  102. package/dist/datepickerRange.css +0 -79
  103. package/dist/image.css +0 -8
  104. package/dist/index.css +0 -897
  105. package/dist/index.es.js +0 -37
  106. package/dist/index.umd.js +0 -6006
  107. package/dist/js/carousel/carousel.js +0 -171
  108. package/dist/js/check/checkbox.js +0 -16
  109. package/dist/js/check/checkgroup.js +0 -69
  110. package/dist/js/date/datepicker.js +0 -366
  111. package/dist/js/date/datepickerRange.js +0 -589
  112. package/dist/js/dialog/dialog.js +0 -138
  113. package/dist/js/form/form.js +0 -87
  114. package/dist/js/form/formlabel.js +0 -167
  115. package/dist/js/getcalendar/getcalendar.js +0 -48
  116. package/dist/js/image/image.js +0 -250
  117. package/dist/js/index/index.js +0 -860
  118. package/dist/js/input/input.js +0 -90
  119. package/dist/js/menu/menu.js +0 -59
  120. package/dist/js/numberInput/numberinput.js +0 -127
  121. package/dist/js/pagination/pagination.js +0 -234
  122. package/dist/js/popover/popover.js +0 -241
  123. package/dist/js/radio/radiobox.js +0 -16
  124. package/dist/js/radio/radiogroup.js +0 -69
  125. package/dist/js/scrollBar/scrollBar.js +0 -208
  126. package/dist/js/select/select.js +0 -118
  127. package/dist/js/select/selectoption.js +0 -16
  128. package/dist/js/switch/switch.js +0 -50
  129. package/dist/js/table/table.js +0 -216
  130. package/dist/js/tree/tree.js +0 -72
  131. package/dist/js/tree/treeleaf.js +0 -116
  132. package/dist/radiogroup.css +0 -44
  133. package/dist/scrollBar.css +0 -37
  134. package/dist/select.css +0 -20
  135. /package/dist/js/{tabs/tabsPane.js → tabsPane-f024a6bf.js} +0 -0
@@ -1,860 +0,0 @@
1
- import { defineComponent, ref, watch, onUnmounted, openBlock, createBlock, Teleport, createElementVNode, createVNode, TransitionGroup, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createCommentVNode, resolveDynamicComponent, h, createApp, reactive, toDisplayString, nextTick, defineAsyncComponent } from "vue";
2
- const _hoisted_1$2 = { class: "tdd-pointer-events-none tdd-fixed tdd-right-0 tdd-left-0 tdd-bottom-0 tdd-top-4 tdd-z-2000 tdd-space-y-5" };
3
- const _hoisted_2$1 = { class: "tdd-pointer-events-auto tdd-inline-flex tdd-items-center tdd-space-x-3 tdd-bg-white tdd-p-3 tdd-text-sm tdd-text-word3 tdd-drop-shadow" };
4
- const _hoisted_3$1 = {
5
- key: 0,
6
- class: "tdd-h-4 tdd-w-4 tdd-fill-white",
7
- viewBox: "0 0 1024 1024",
8
- version: "1.1",
9
- xmlns: "http://www.w3.org/2000/svg"
10
- };
11
- const _hoisted_4$1 = {
12
- key: 1,
13
- class: "tdd-h-4 tdd-w-4 tdd-fill-white",
14
- viewBox: "0 0 1024 1024",
15
- version: "1.1",
16
- xmlns: "http://www.w3.org/2000/svg"
17
- };
18
- const _hoisted_5$1 = {
19
- key: 2,
20
- class: "tdd-h-4 tdd-w-4 tdd-fill-white",
21
- viewBox: "0 0 1024 1024",
22
- version: "1.1",
23
- xmlns: "http://www.w3.org/2000/svg"
24
- };
25
- const _hoisted_6$1 = {
26
- key: 3,
27
- class: "tdd-h-4 tdd-w-4 tdd-fill-white",
28
- viewBox: "0 0 1024 1024",
29
- version: "1.1",
30
- xmlns: "http://www.w3.org/2000/svg"
31
- };
32
- const _hoisted_7$1 = ["onClick"];
33
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
34
- __name: "messagecomponent",
35
- setup(__props, { expose: __expose }) {
36
- const messageList = ref([]);
37
- const hidden = (index2) => {
38
- cancelAnimationFrame(deletehandle.value);
39
- messageList.value.splice(index2, 1);
40
- };
41
- const success = (option) => {
42
- dealConfig(option, "success");
43
- };
44
- const error = (option) => {
45
- dealConfig(option, "error");
46
- };
47
- const warning = (option) => {
48
- dealConfig(option, "warning");
49
- };
50
- const info = (option) => {
51
- dealConfig(option, "info");
52
- };
53
- const dealConfig = (options, type) => {
54
- let option = options || {};
55
- option.type = type;
56
- option.during = option.during !== void 0 && option.during !== null && option.during >= 0 ? option.during : 3e3;
57
- if (option.key) {
58
- let rewriteFlag = false;
59
- for (let i = 0; i < messageList.value.length; i++) {
60
- if (messageList.value[i].key === option.key) {
61
- messageList.value[i].text = option.text;
62
- messageList.value[i].during = option.during;
63
- messageList.value[i].endtime = option.during + (/* @__PURE__ */ new Date()).getTime();
64
- messageList.value[i].type = option.type;
65
- messageList.value[i].vnode = option.vnode;
66
- rewriteFlag = true;
67
- break;
68
- }
69
- }
70
- if (rewriteFlag === false) {
71
- option.type = type;
72
- const config = {
73
- type: option.type || "info",
74
- showClose: option.showClose || false,
75
- during: 0,
76
- endtime: 0 + (/* @__PURE__ */ new Date()).getTime(),
77
- text: option.text,
78
- key: option.key,
79
- vnode: option.vnode
80
- };
81
- messageList.value.push(config);
82
- }
83
- } else {
84
- const config = {
85
- type: option.type || "info",
86
- showClose: option.showClose || false,
87
- during: option.during,
88
- endtime: option.during + (/* @__PURE__ */ new Date()).getTime(),
89
- text: option.text,
90
- key: option.during + (/* @__PURE__ */ new Date()).getTime(),
91
- vnode: option.vnode
92
- };
93
- messageList.value.push(config);
94
- }
95
- };
96
- const deletehandle = ref(-1);
97
- watch(
98
- messageList,
99
- (newdata) => {
100
- cancelAnimationFrame(deletehandle.value);
101
- if (newdata.length === 0)
102
- return;
103
- for (let i = 0; i < newdata.length; i++) {
104
- if (newdata[i].during > 0) {
105
- const loop = () => {
106
- deletehandle.value = requestAnimationFrame(loop);
107
- if ((/* @__PURE__ */ new Date()).getTime() >= newdata[i].endtime) {
108
- cancelAnimationFrame(deletehandle.value);
109
- messageList.value.splice(i, 1);
110
- }
111
- };
112
- loop();
113
- break;
114
- }
115
- }
116
- },
117
- { deep: true }
118
- );
119
- const contentRender = (props) => {
120
- if (Array.isArray(props.c.vnode)) {
121
- return props.c.vnode.map((v) => {
122
- return createBlock(
123
- resolveDynamicComponent(v)
124
- );
125
- });
126
- } else if (props.c.vnode) {
127
- return createBlock(
128
- resolveDynamicComponent(props.c.vnode)
129
- );
130
- } else {
131
- return h(
132
- "div",
133
- {},
134
- props.c.text
135
- );
136
- }
137
- };
138
- onUnmounted(() => {
139
- messageList.value.length = 0;
140
- });
141
- __expose({
142
- success,
143
- error,
144
- warning,
145
- info,
146
- dealConfig
147
- });
148
- return (_ctx, _cache) => {
149
- return openBlock(), createBlock(Teleport, { to: "body" }, [
150
- createElementVNode("div", _hoisted_1$2, [
151
- createVNode(TransitionGroup, { name: "message" }, {
152
- default: withCtx(() => [
153
- (openBlock(true), createElementBlock(Fragment, null, renderList(messageList.value, (i, d) => {
154
- return openBlock(), createElementBlock("div", {
155
- class: "tdd-w-full tdd-text-center",
156
- key: i.key
157
- }, [
158
- createElementVNode("div", _hoisted_2$1, [
159
- createElementVNode("div", {
160
- class: normalizeClass(["tdd-flex tdd-h-5 tdd-w-5 tdd-items-center tdd-justify-center tdd-rounded-full", {
161
- "tdd-bg-green-400": i.type === "success",
162
- "tdd-bg-red-400": i.type === "error",
163
- "tdd-bg-yellow-400": i.type === "warning",
164
- "tdd-bg-gray-400": i.type === "info"
165
- }])
166
- }, [
167
- i.type === "success" ? (openBlock(), createElementBlock("svg", _hoisted_3$1, _cache[0] || (_cache[0] = [
168
- createElementVNode("path", { d: "M883.2 247.466667c-17.066667-17.066667-44.8-17.066667-59.733333 0L409.6 665.6l-209.066667-204.8c-17.066667-17.066667-44.8-17.066667-59.733333 0-17.066667 17.066667-17.066667 44.8 0 59.733333l238.933333 234.666667c8.533333 8.533333 19.2 12.8 29.866667 12.8 10.666667 0 21.333333-4.266667 29.866667-12.8l443.733333-448c17.066667-17.066667 17.066667-42.666667 0-59.733333z" }, null, -1)
169
- ]))) : createCommentVNode("", true),
170
- i.type === "error" ? (openBlock(), createElementBlock("svg", _hoisted_4$1, _cache[1] || (_cache[1] = [
171
- createElementVNode("path", { d: "M556.8 512L832 236.8c12.8-12.8 12.8-32 0-44.8-12.8-12.8-32-12.8-44.8 0L512 467.2l-275.2-277.333333c-12.8-12.8-32-12.8-44.8 0-12.8 12.8-12.8 32 0 44.8l275.2 277.333333-277.333333 275.2c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 14.933333 8.533333 23.466666 8.533333s17.066667-2.133333 23.466667-8.533333L512 556.8 787.2 832c6.4 6.4 14.933333 8.533333 23.466667 8.533333s17.066667-2.133333 23.466666-8.533333c12.8-12.8 12.8-32 0-44.8L556.8 512z" }, null, -1)
172
- ]))) : createCommentVNode("", true),
173
- i.type === "warning" ? (openBlock(), createElementBlock("svg", _hoisted_5$1, _cache[2] || (_cache[2] = [
174
- createElementVNode("path", { d: "M512 320m-42.666667 0a42.666667 42.666667 0 1 0 85.333334 0 42.666667 42.666667 0 1 0-85.333334 0Z" }, null, -1),
175
- createElementVNode("path", { d: "M512 437.333333c-17.066667 0-32 14.933333-32 32v234.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32V469.333333c0-17.066667-14.933333-32-32-32z" }, null, -1)
176
- ]))) : createCommentVNode("", true),
177
- i.type === "info" ? (openBlock(), createElementBlock("svg", _hoisted_6$1, _cache[3] || (_cache[3] = [
178
- createElementVNode("path", { d: "M800 625.066667V448c0-117.333333-70.4-217.6-170.666667-262.4-4.266667-61.866667-55.466667-110.933333-117.333333-110.933333s-113.066667 49.066667-117.333333 110.933333c-100.266667 44.8-170.666667 145.066667-170.666667 262.4v177.066667c-57.6 46.933333-85.333333 110.933333-85.333333 185.6 0 17.066667 14.933333 32 32 32h206.933333c14.933333 61.866667 70.4 106.666667 134.4 106.666666s119.466667-44.8 134.4-106.666666H853.333333c17.066667 0 32-14.933333 32-32 0-76.8-27.733333-138.666667-85.333333-185.6zM512 138.666667c19.2 0 36.266667 10.666667 44.8 25.6-14.933333-2.133333-29.866667-4.266667-44.8-4.266667-14.933333 0-29.866667 2.133333-44.8 4.266667 8.533333-14.933333 25.6-25.6 44.8-25.6z m0 746.666666c-29.866667 0-55.466667-17.066667-66.133333-42.666666h134.4c-12.8 25.6-38.4 42.666667-68.266667 42.666666z m-307.2-106.666666c6.4-46.933333 29.866667-83.2 70.4-113.066667 8.533333-6.4 12.8-14.933333 12.8-25.6v-192c0-123.733333 100.266667-224 224-224S736 324.266667 736 448v192c0 10.666667 4.266667 19.2 12.8 25.6 40.533333 29.866667 64 66.133333 70.4 113.066667H204.8z" }, null, -1)
179
- ]))) : createCommentVNode("", true)
180
- ], 2),
181
- createVNode(contentRender, { c: i }, null, 8, ["c"]),
182
- i.showClose ? (openBlock(), createElementBlock("button", {
183
- key: 0,
184
- type: "button",
185
- class: "tdd-appearance-none",
186
- onClick: ($event) => hidden(d)
187
- }, _cache[4] || (_cache[4] = [
188
- createElementVNode("svg", {
189
- class: "tdd-h-5 tdd-w-5 tdd-fill-gray-600",
190
- xmlns: "http://www.w3.org/2000/svg",
191
- width: "24",
192
- height: "24",
193
- viewBox: "0 0 24 24",
194
- fill: "none"
195
- }, [
196
- createElementVNode("g", null, [
197
- createElementVNode("path", {
198
- "fill-rule": "evenodd",
199
- "clip-rule": "evenodd",
200
- d: "M16.7782 7.22943C16.4824 6.93364 16.0046 6.93364 15.7088 7.22943L12 10.9306L8.29124 7.22184C7.99545 6.92605 7.51763 6.92605 7.22184 7.22184C6.92605 7.51763 6.92605 7.99545 7.22184 8.29124L10.9306 12L7.22184 15.7088C6.92605 16.0046 6.92605 16.4824 7.22184 16.7782C7.51763 17.0739 7.99545 17.0739 8.29124 16.7782L12 13.0694L15.7088 16.7782C16.0046 17.0739 16.4824 17.0739 16.7782 16.7782C17.0739 16.4824 17.0739 16.0046 16.7782 15.7088L13.0694 12L16.7782 8.29124C17.0664 8.00303 17.0664 7.51763 16.7782 7.22943Z",
201
- fill: "inherit"
202
- })
203
- ])
204
- ], -1)
205
- ]), 8, _hoisted_7$1)) : createCommentVNode("", true)
206
- ])
207
- ]);
208
- }), 128))
209
- ]),
210
- _: 1
211
- })
212
- ])
213
- ]);
214
- };
215
- }
216
- });
217
- let instance$1;
218
- const initHandle$1 = () => {
219
- instance$1 = createApp(_sfc_main$2).mount(document.createElement("div"));
220
- };
221
- const MessageCom = (options) => {
222
- if (!instance$1) {
223
- initHandle$1();
224
- }
225
- instance$1.dealConfig(options, options.type);
226
- return instance$1;
227
- };
228
- MessageCom.success = (options) => {
229
- let option = {
230
- type: "success"
231
- };
232
- if (typeof options === "string" || typeof options === "number") {
233
- Object.assign(option, {
234
- text: options
235
- });
236
- } else if (typeof options === "object") {
237
- Object.assign(option, options);
238
- }
239
- return MessageCom(option);
240
- };
241
- MessageCom.warning = (options) => {
242
- let option = {
243
- type: "warning"
244
- };
245
- if (typeof options === "string" || typeof options === "number") {
246
- Object.assign(option, {
247
- text: options
248
- });
249
- } else if (typeof options === "object") {
250
- Object.assign(option, options);
251
- }
252
- return MessageCom(option);
253
- };
254
- MessageCom.error = (options) => {
255
- let option = {
256
- type: "error"
257
- };
258
- if (typeof options === "string" || typeof options === "number") {
259
- Object.assign(option, {
260
- text: options
261
- });
262
- } else if (typeof options === "object") {
263
- Object.assign(option, options);
264
- }
265
- return MessageCom(option);
266
- };
267
- MessageCom.info = (options) => {
268
- let option = {
269
- type: "info"
270
- };
271
- if (typeof options === "string" || typeof options === "number") {
272
- Object.assign(option, {
273
- text: options
274
- });
275
- } else if (typeof options === "object") {
276
- Object.assign(option, options);
277
- }
278
- return MessageCom(option);
279
- };
280
- const _hoisted_1$1 = {
281
- key: 0,
282
- class: "tdd-fixed tdd-top-0 tdd-right-0 tdd-left-0 tdd-bottom-0 tdd-z-1000 tdd-flex tdd-items-center tdd-justify-center"
283
- };
284
- const _hoisted_2 = {
285
- key: 0,
286
- class: "tdd-absolute tdd-top-0 tdd-right-0 tdd-left-0 tdd-bottom-0 tdd-bg-black tdd-bg-opacity-30"
287
- };
288
- const _hoisted_3 = { class: "tdd-z-20 tdd-w-96 tdd-rounded tdd-bg-white tdd-px-4 tdd-pt-8 tdd-pb-9 tdd-drop-shadow" };
289
- const _hoisted_4 = { class: "tdd-flex tdd-justify-center" };
290
- const _hoisted_5 = { class: "tdd-ml-1 tdd-text-lg tdd-leading-6 tdd-text-word3" };
291
- const _hoisted_6 = { class: "tdd-my-4 tdd-text-sm tdd-text-word3 tdd-text-center" };
292
- const _hoisted_7 = { class: "tdd-space-x-2.5 tdd-text-center tdd-text-xs" };
293
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
294
- __name: "alertcomponent",
295
- setup(__props, { expose: __expose }) {
296
- const myoption = reactive({
297
- title: "",
298
- content: "",
299
- sureword: "确定",
300
- cancelword: "取消",
301
- bgshow: false
302
- });
303
- const showTip = ref(false);
304
- const action = ref(null);
305
- const callback = ref(() => {
306
- });
307
- const ActionHandle = (value = null) => {
308
- action.value = value;
309
- CloseHandle();
310
- };
311
- const CloseHandle = () => {
312
- if (!showTip.value)
313
- return;
314
- showTip.value = false;
315
- callback.value(action.value);
316
- };
317
- __expose({
318
- showTip,
319
- myoption,
320
- callback
321
- });
322
- return (_ctx, _cache) => {
323
- return openBlock(), createBlock(Teleport, { to: "body" }, [
324
- showTip.value ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
325
- myoption.bgshow ? (openBlock(), createElementBlock("div", _hoisted_2)) : createCommentVNode("", true),
326
- createElementVNode("div", _hoisted_3, [
327
- createElementVNode("div", _hoisted_4, [
328
- _cache[2] || (_cache[2] = createElementVNode("div", { class: "tdd-h-6 tdd-w-6 tdd-text-yellow-400" }, [
329
- createElementVNode("svg", {
330
- class: "tdd-fill-current tdd-w-full tdd-h-full",
331
- viewBox: "0 0 1024 1024",
332
- version: "1.1",
333
- xmlns: "http://www.w3.org/2000/svg",
334
- "p-id": "2512"
335
- }, [
336
- createElementVNode("path", {
337
- d: "M512 74.666667c241.066667 0 437.333333 196.266667 437.333333 437.333333S753.066667 949.333333 512 949.333333 74.666667 753.066667 74.666667 512 270.933333 74.666667 512 74.666667z m0 341.333333c-17.066667 0-32 14.933333-32 32v300.8c2.133333 17.066667 14.933333 29.866667 32 29.866667s32-14.933333 32-32V445.866667c-2.133333-17.066667-14.933333-29.866667-32-29.866667z m0-160c-23.466667 0-42.666667 19.2-42.666667 42.666667s19.2 42.666667 42.666667 42.666666 42.666667-19.2 42.666667-42.666666-19.2-42.666667-42.666667-42.666667z",
338
- "p-id": "2513"
339
- })
340
- ])
341
- ], -1)),
342
- createElementVNode("div", _hoisted_5, toDisplayString(myoption.title), 1)
343
- ]),
344
- createElementVNode("div", _hoisted_6, toDisplayString(myoption.content), 1),
345
- createElementVNode("div", _hoisted_7, [
346
- createElementVNode("div", {
347
- class: "tdd-h-8 tdd-px-4 tdd-rounded tdd-border tdd-text-word6 tdd-inline-block tdd-leading-8 tdd-cursor-pointer",
348
- onClick: _cache[0] || (_cache[0] = ($event) => ActionHandle("cancel"))
349
- }, toDisplayString(myoption.cancelword), 1),
350
- createElementVNode("div", {
351
- class: "tdd-h-8 tdd-px-4 tdd-rounded tdd-bg-blue-light tdd-text-white tdd-inline-block tdd-leading-8 tdd-cursor-pointer",
352
- onClick: _cache[1] || (_cache[1] = ($event) => ActionHandle())
353
- }, toDisplayString(myoption.sureword), 1)
354
- ])
355
- ])
356
- ])) : createCommentVNode("", true)
357
- ]);
358
- };
359
- }
360
- });
361
- const defaultOption = {
362
- title: "",
363
- content: "",
364
- sureword: "确定",
365
- cancelword: "取消",
366
- bgshow: false
367
- };
368
- let instance, CurrentMsg, msgQue = [];
369
- const defaultCallBack = (action) => {
370
- const { callback, resolve, reject } = CurrentMsg;
371
- if (typeof callback === "function") {
372
- callback(action);
373
- } else if (resolve) {
374
- if (action) {
375
- reject(action);
376
- } else {
377
- resolve();
378
- }
379
- }
380
- };
381
- const initHandle = () => {
382
- instance = createApp(_sfc_main$1).mount(document.createElement("div"));
383
- instance.callback = defaultCallBack;
384
- };
385
- const showAlertHandle = () => {
386
- if (!instance) {
387
- initHandle();
388
- }
389
- if (!instance.showTip) {
390
- if (msgQue.length > 0) {
391
- CurrentMsg = msgQue.shift();
392
- let mixinOptions = CurrentMsg.options;
393
- for (const key in mixinOptions) {
394
- if (mixinOptions.hasOwnProperty(key)) {
395
- instance.myoption[key] = mixinOptions[key];
396
- }
397
- }
398
- if (mixinOptions.callback === void 0) {
399
- instance.callback = defaultCallBack;
400
- }
401
- let CallBack = instance.callback;
402
- instance.callback = (action) => {
403
- CallBack(action);
404
- showAlertHandle();
405
- };
406
- nextTick(() => {
407
- instance.showTip = true;
408
- });
409
- }
410
- }
411
- };
412
- const AlertCom = (options, callback) => {
413
- if (options.callback && !callback) {
414
- callback = options.callback;
415
- }
416
- if (typeof Promise !== "undefined") {
417
- return new Promise((resolve, reject) => {
418
- msgQue.push({
419
- options: Object.assign({}, defaultOption, options),
420
- callback,
421
- resolve,
422
- reject
423
- });
424
- showAlertHandle();
425
- });
426
- } else {
427
- msgQue.push({
428
- options: Object.assign({}, defaultOption, options),
429
- callback
430
- });
431
- }
432
- showAlertHandle();
433
- };
434
- const _hoisted_1 = { class: "tdd-mt-3 tdd-text-sm tdd-font-medium tdd-text-word9" };
435
- const _sfc_main = /* @__PURE__ */ defineComponent({
436
- __name: "loadcomponent",
437
- setup(__props, { expose: __expose }) {
438
- const loaddingWord = ref("数据加载中,请稍后...");
439
- const fullScreen = ref(false);
440
- __expose({
441
- loaddingWord,
442
- fullScreen
443
- });
444
- return (_ctx, _cache) => {
445
- return openBlock(), createElementBlock("div", {
446
- class: normalizeClass(["tdd-top-0 tdd-right-0 tdd-left-0 tdd-bottom-0 tdd-z-50 tdd-flex tdd-h-full tdd-w-full tdd-flex-col tdd-items-center tdd-justify-center tdd-bg-white tdd-bg-opacity-90", fullScreen.value ? "fixed" : "absolute"])
447
- }, [
448
- _cache[0] || (_cache[0] = createElementVNode("div", { class: "tdd-relative tdd-flex tdd-justify-center tdd-w-10 tdd-h-10" }, [
449
- createElementVNode("svg", {
450
- class: "circular tdd-stroke-wordblue",
451
- viewBox: "25 25 50 50"
452
- }, [
453
- createElementVNode("circle", {
454
- class: "path",
455
- cx: "50",
456
- cy: "50",
457
- r: "20",
458
- fill: "none",
459
- "stroke-width": "2",
460
- "stroke-miterlimit": "10"
461
- })
462
- ])
463
- ], -1)),
464
- createElementVNode("div", _hoisted_1, toDisplayString(loaddingWord.value), 1)
465
- ], 2);
466
- };
467
- }
468
- });
469
- const loadcomponent_vue_vue_type_style_index_0_lang = "";
470
- const installHandle = () => createApp(_sfc_main).mount(document.createElement("div"));
471
- const LibLoad = {
472
- beforeMount(el, binding) {
473
- if (!el.instance) {
474
- el.instance = installHandle();
475
- }
476
- if (el.getAttribute("loadding-text")) {
477
- el.instance.loaddingWord = el.getAttribute("loadding-text");
478
- }
479
- el.instance.fullScreen = binding.modifiers.fullScreen || false;
480
- },
481
- mounted(el, binding) {
482
- if (binding.value) {
483
- if (binding.modifiers.fullScreen) {
484
- appendHandle(el, document.body);
485
- if (binding.modifiers.lock) {
486
- document.body.classList.add("tdd-overflow-hidden");
487
- }
488
- } else {
489
- appendHandle(el);
490
- }
491
- }
492
- },
493
- beforeUpdate(el, binding) {
494
- if (binding.value !== binding.oldValue) {
495
- if (el.getAttribute("loadding-text")) {
496
- el.instance.loaddingWord = el.getAttribute("loadding-text");
497
- }
498
- if (binding.modifiers.fullScreen) {
499
- binding.value ? appendHandle(el, document.body) : removeHandle(el, document.body);
500
- if (binding.modifiers.lock) {
501
- binding.value ? document.body.classList.add("tdd-overflow-hidden") : document.body.classList.remove("tdd-overflow-hidden");
502
- }
503
- } else {
504
- binding.value ? appendHandle(el) : removeHandle(el);
505
- }
506
- }
507
- }
508
- };
509
- const appendHandle = (el, root) => {
510
- if (root) {
511
- root.appendChild(el.instance.$el);
512
- } else {
513
- el.style.display = "relative";
514
- el.appendChild(el.instance.$el);
515
- }
516
- };
517
- const removeHandle = (el, root) => {
518
- if (root) {
519
- root.removeChild(el.instance.$el);
520
- } else {
521
- el.style.display = "";
522
- el.removeChild(el.instance.$el);
523
- }
524
- };
525
- function debounce(func, wait) {
526
- let timeout;
527
- return function() {
528
- const context = this;
529
- const args = arguments;
530
- clearTimeout(timeout);
531
- timeout = setTimeout(function() {
532
- func.apply(context, args);
533
- }, wait);
534
- };
535
- }
536
- function throttle(func, wait) {
537
- let timeout;
538
- return function() {
539
- const context = this;
540
- const args = arguments;
541
- if (!timeout) {
542
- timeout = setTimeout(function() {
543
- timeout = null;
544
- func.apply(context, args);
545
- }, wait);
546
- }
547
- };
548
- }
549
- const usePotion = (baseDom, aimDom, set) => {
550
- let left = 0;
551
- let top = 0;
552
- let arrowleft = 0;
553
- let arrowtop = 0;
554
- let exchange = false;
555
- if (!baseDom || !aimDom) {
556
- return {
557
- Top: top,
558
- Left: left,
559
- arrowLeft: arrowleft,
560
- arrowTop: arrowtop,
561
- exChange: exchange
562
- };
563
- }
564
- const { left: baseLeft, right, bottom, top: baseTop, width: baseWidth, height: baseHeight } = baseDom.getBoundingClientRect();
565
- const { height: aimHeight, width: aimWidth, top: aimTop } = aimDom.getBoundingClientRect();
566
- const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
567
- const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
568
- switch (set == null ? void 0 : set.position) {
569
- case "bottomleft":
570
- case "bottommiddle":
571
- case "bottomright":
572
- top = scrollTop + bottom;
573
- break;
574
- case "topleft":
575
- case "topmiddle":
576
- case "topright":
577
- top = scrollTop + baseTop - aimHeight;
578
- break;
579
- case "centerleft":
580
- case "centerright":
581
- top = scrollTop + baseTop + (baseHeight - aimHeight) / 2;
582
- arrowtop = aimHeight / 2 - 5;
583
- break;
584
- }
585
- switch (set == null ? void 0 : set.position) {
586
- case "topleft":
587
- case "bottomleft":
588
- left = scrollLeft + baseLeft;
589
- arrowleft = (right - baseLeft) / 2;
590
- break;
591
- case "topmiddle":
592
- case "bottommiddle":
593
- left = scrollLeft + baseLeft + (right - baseLeft - aimWidth) / 2;
594
- arrowleft = aimWidth / 2 - 5;
595
- break;
596
- case "topright":
597
- case "bottomright":
598
- left = scrollLeft + right - aimWidth;
599
- arrowleft = aimWidth - baseWidth + baseWidth / 2 - 5;
600
- break;
601
- case "centerleft":
602
- left = scrollLeft + baseLeft - aimWidth;
603
- arrowleft = aimWidth - 5;
604
- break;
605
- case "centerright":
606
- left = scrollLeft + right;
607
- arrowleft = -5;
608
- break;
609
- }
610
- if (aimHeight + 20 < window.innerHeight) {
611
- if (top + aimHeight + 10 > scrollTop + window.innerHeight) {
612
- switch (set == null ? void 0 : set.position) {
613
- case "bottommiddle":
614
- case "bottomleft":
615
- case "bottomright":
616
- exchange = true;
617
- top = scrollTop + baseTop - aimHeight - 24;
618
- break;
619
- case "centerleft":
620
- case "centerright":
621
- top = scrollTop + window.innerHeight - aimHeight - 10;
622
- arrowtop = baseTop - aimTop + baseHeight / 2 - 10;
623
- break;
624
- }
625
- }
626
- if (top - scrollTop < 0) {
627
- switch (set == null ? void 0 : set.position) {
628
- case "topmiddle":
629
- case "topleft":
630
- case "topright":
631
- exchange = true;
632
- top = scrollTop + bottom + 24;
633
- break;
634
- case "centerleft":
635
- case "centerright":
636
- top = 10 + scrollTop;
637
- arrowtop = baseTop + baseHeight / 2 - 10;
638
- break;
639
- }
640
- }
641
- }
642
- return {
643
- Top: top,
644
- Left: left,
645
- arrowLeft: arrowleft,
646
- arrowTop: arrowtop,
647
- exChange: exchange
648
- };
649
- };
650
- function getNewArray(array, subGroupLength) {
651
- let index2 = 0;
652
- const newArray = [];
653
- while (index2 < array.length) {
654
- newArray.push(array.slice(index2, index2 += subGroupLength));
655
- }
656
- return newArray;
657
- }
658
- function getScrollWidth() {
659
- const outer = document.createElement("div");
660
- outer.className = "el-scrollbar__wrap";
661
- outer.style.visibility = "hidden";
662
- outer.style.width = "100px";
663
- outer.style.position = "absolute";
664
- outer.style.top = "-9999px";
665
- document.body.appendChild(outer);
666
- const widthnoscroll = outer.offsetWidth;
667
- outer.style.overflow = "scroll";
668
- const inner = document.createElement("div");
669
- inner.style.width = "100%";
670
- outer.appendChild(inner);
671
- const widthwithscroll = inner.offsetWidth;
672
- outer.parentNode.removeChild(outer);
673
- let scrollbarwidth = widthnoscroll - widthwithscroll;
674
- return scrollbarwidth;
675
- }
676
- function resizeHandler(entries) {
677
- for (const entry of entries) {
678
- const listeners = entry.target.__resizeListeners__ || [];
679
- if (listeners.length) {
680
- listeners.forEach((fn) => {
681
- fn();
682
- });
683
- }
684
- }
685
- }
686
- const addResizeListener = function(element, fn) {
687
- if (!element.__resizeListeners__) {
688
- element.__resizeListeners__ = [];
689
- element.__ro__ = new ResizeObserver(resizeHandler);
690
- element.__ro__.observe(element);
691
- window.ro = element.__ro__;
692
- }
693
- element.__resizeListeners__.push(fn);
694
- };
695
- const removeResizeListener = function(element, fn) {
696
- if (!element || !element.__resizeListeners__)
697
- return;
698
- element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
699
- if (!element.__resizeListeners__.length) {
700
- element.__ro__.disconnect();
701
- }
702
- };
703
- const on = function() {
704
- return function(element, event, handler) {
705
- if (element && event && handler) {
706
- element.addEventListener(event, handler, false);
707
- }
708
- };
709
- }();
710
- const off = function() {
711
- return function(element, event, handler) {
712
- if (element && event) {
713
- element.removeEventListener(event, handler, false);
714
- }
715
- };
716
- }();
717
- function createAndAppendElementWithId(id) {
718
- if (!document.getElementById(id)) {
719
- const element = document.createElement("div");
720
- element.id = id;
721
- document.body.appendChild(element);
722
- }
723
- }
724
- const scrolllead = {
725
- beforeMount(el, binding) {
726
- function scrollhandle(e) {
727
- const threshold = binding.value.threshold || 0;
728
- if (binding.modifiers.top) {
729
- if (el.scrollTop <= threshold) {
730
- binding.value.fc(e);
731
- }
732
- } else {
733
- let { bottom } = el.getBoundingClientRect();
734
- if (window.innerHeight - bottom > threshold) {
735
- binding.value.fc(e);
736
- }
737
- }
738
- }
739
- el._scroll_ = throttle(scrollhandle, 200);
740
- document.addEventListener("wheel", el._scroll_);
741
- },
742
- // beforeUpdate(el: selfDom, binding: bindingType) {},
743
- updated(el, binding) {
744
- if (binding.value.ableLoading === false) {
745
- document.removeEventListener("wheel", el._scroll_);
746
- } else {
747
- document.addEventListener("wheel", el._scroll_);
748
- }
749
- },
750
- beforeUnmount(el) {
751
- document.removeEventListener("wheel", el._scroll_);
752
- delete el._scroll_;
753
- }
754
- };
755
- const tailwind = "";
756
- const LibDialog = defineAsyncComponent(() => import("../dialog/dialog.js"));
757
- const LibForm = defineAsyncComponent(() => import("../form/form.js"));
758
- const LibFormLabel = defineAsyncComponent(() => import("../form/formlabel.js"));
759
- const LibInput = defineAsyncComponent(() => import("../input/input.js"));
760
- const LibSelect = defineAsyncComponent(() => import("../select/select.js"));
761
- const LibSelectOption = defineAsyncComponent(() => import("../select/selectoption.js"));
762
- const LibTable = defineAsyncComponent(() => import("../table/table.js"));
763
- const LibTableItem = defineAsyncComponent(() => import("../table/tableItem.js"));
764
- const LibImage = defineAsyncComponent(() => import("../image/image.js"));
765
- const LibDatePicker = defineAsyncComponent(() => import("../date/datepicker.js"));
766
- const LibDatePickerRange = defineAsyncComponent(() => import("../date/datepickerRange.js"));
767
- const LibMenu = defineAsyncComponent(() => import("../menu/menu.js"));
768
- const LibPagination = defineAsyncComponent(() => import("../pagination/pagination.js"));
769
- const LibBadge = defineAsyncComponent(() => import("../badge/badge.js"));
770
- const LibPopover = defineAsyncComponent(() => import("../popover/popover.js"));
771
- const LibNumberInput = defineAsyncComponent(() => import("../numberInput/numberinput.js"));
772
- const LibRadioGroup = defineAsyncComponent(() => import("../radio/radiogroup.js"));
773
- const LibRadioBox = defineAsyncComponent(() => import("../radio/radiobox.js"));
774
- const LibCheckGroup = defineAsyncComponent(() => import("../check/checkgroup.js"));
775
- const LibCheckBox = defineAsyncComponent(() => import("../check/checkbox.js"));
776
- const LibUpload = defineAsyncComponent(() => import("../upload/upload.js"));
777
- const LibTabs = defineAsyncComponent(() => import("../tabs/tabs.js"));
778
- const LibTabsPane = defineAsyncComponent(() => import("../tabs/tabsPane.js"));
779
- const LibScrollBar = defineAsyncComponent(() => import("../scrollBar/scrollBar.js"));
780
- const LibCarousel = defineAsyncComponent(() => import("../carousel/carousel.js"));
781
- const LibCarouselItem = defineAsyncComponent(() => import("../carousel/carouselitem.js"));
782
- const LibSwitch = defineAsyncComponent(() => import("../switch/switch.js"));
783
- const LibTree = defineAsyncComponent(() => import("../tree/tree.js"));
784
- const index = {
785
- install(app) {
786
- app.component("LibDialog", LibDialog);
787
- app.component("LibForm", LibForm);
788
- app.component("LibFormLabel", LibFormLabel);
789
- app.component("LibInput", LibInput);
790
- app.component("LibSelect", LibSelect);
791
- app.component("LibSelectOption", LibSelectOption);
792
- app.component("LibTable", LibTable);
793
- app.component("LibTableItem", LibTableItem);
794
- app.component("LibImage", LibImage);
795
- app.component("LibDatePicker", LibDatePicker);
796
- app.component("LibDatePickerRange", LibDatePickerRange);
797
- app.component("LibMenu", LibMenu);
798
- app.component("LibPagination", LibPagination);
799
- app.component("LibBadge", LibBadge);
800
- app.component("LibPopover", LibPopover);
801
- app.component("LibNumberInput", LibNumberInput);
802
- app.component("LibRadioBox", LibRadioBox);
803
- app.component("LibRadioGroup", LibRadioGroup);
804
- app.component("LibCheckBox", LibCheckBox);
805
- app.component("LibCheckGroup", LibCheckGroup);
806
- app.component("LibUpload", LibUpload);
807
- app.component("LibTabs", LibTabs);
808
- app.component("LibTabsPane", LibTabsPane);
809
- app.component("LibCarousel", LibCarousel);
810
- app.component("LibCarouselItem", LibCarouselItem);
811
- app.component("LibSwitch", LibSwitch);
812
- app.component("LibTree", LibTree);
813
- app.directive("loadding", LibLoad);
814
- }
815
- };
816
- export {
817
- LibRadioBox as A,
818
- LibRadioGroup as B,
819
- LibCheckGroup as C,
820
- LibCheckBox as D,
821
- LibUpload as E,
822
- LibTabs as F,
823
- LibTabsPane as G,
824
- LibScrollBar as H,
825
- AlertCom as I,
826
- LibLoad as J,
827
- scrolllead as K,
828
- LibDialog as L,
829
- MessageCom as M,
830
- LibCarousel as N,
831
- LibCarouselItem as O,
832
- LibSwitch as P,
833
- LibTree as Q,
834
- off as a,
835
- getScrollWidth as b,
836
- createAndAppendElementWithId as c,
837
- debounce as d,
838
- addResizeListener as e,
839
- LibForm as f,
840
- getNewArray as g,
841
- LibFormLabel as h,
842
- index as i,
843
- LibInput as j,
844
- LibSelect as k,
845
- LibSelectOption as l,
846
- LibTable as m,
847
- LibTableItem as n,
848
- on as o,
849
- LibImage as p,
850
- LibDatePicker as q,
851
- removeResizeListener as r,
852
- LibDatePickerRange as s,
853
- throttle as t,
854
- usePotion as u,
855
- LibMenu as v,
856
- LibPagination as w,
857
- LibBadge as x,
858
- LibPopover as y,
859
- LibNumberInput as z
860
- };