morghulis 1.0.11 → 1.0.13

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.
@@ -1,23 +1,434 @@
1
- import { defineComponent as c, createElementBlock as r, openBlock as p, renderSlot as a } from "vue";
2
- const l = c({
3
- name: "LypButton"
4
- }), u = (t, n) => {
5
- const o = t.__vccOpts || t;
6
- for (const [e, s] of n)
7
- o[e] = s;
8
- return o;
9
- }, _ = { class: "my-button" };
10
- function d(t, n, o, e, s, i) {
11
- return p(), r("button", _, [
12
- a(t.$slots, "default")
13
- ]);
14
- }
15
- const f = /* @__PURE__ */ u(l, [["render", d]]), y = {
16
- install(t) {
17
- t.component("LypButton", f);
1
+ import L from "element-plus";
2
+ import { default as Ce } from "element-plus";
3
+ import { defineComponent as q, mergeDefaults as G, useSlots as J, computed as E, ref as m, resolveComponent as d, resolveDirective as Q, openBlock as p, createBlock as M, mergeProps as X, unref as V, withKeys as Z, createSlots as ee, withCtx as l, createElementVNode as S, renderSlot as F, createVNode as n, createTextVNode as f, toDisplayString as C, createElementBlock as A, Fragment as z, createCommentVNode as v, withDirectives as ue } from "vue";
4
+ import oe from "lodash";
5
+ import { library as te } from "@fortawesome/fontawesome-svg-core";
6
+ import { fas as le } from "@fortawesome/free-solid-svg-icons";
7
+ import { FontAwesomeIcon as ae } from "@fortawesome/vue-fontawesome";
8
+ const ne = (u = {}) => (u.baseUrl, u.timeout, u.headers, {
9
+ // 发送消息
10
+ send: (t, a) => (console.log(`发送消息: ${t}`, a), Promise.resolve({ success: !0 })),
11
+ // 接收消息
12
+ on: (t, a) => (console.log(`监听事件: ${t}`), () => {
13
+ console.log(`取消监听: ${t}`);
14
+ }),
15
+ // 关闭通道
16
+ close: () => {
17
+ console.log("关闭通道");
18
+ }
19
+ });
20
+ var O = {
21
+ name: "zh-cn",
22
+ el: {
23
+ breadcrumb: {
24
+ label: "面包屑"
25
+ },
26
+ colorpicker: {
27
+ confirm: "确定",
28
+ clear: "清空",
29
+ defaultLabel: "颜色选择器",
30
+ description: "当前颜色 {color},按 Enter 键选择新颜色",
31
+ alphaLabel: "选择透明度的值"
32
+ },
33
+ datepicker: {
34
+ now: "此刻",
35
+ today: "今天",
36
+ cancel: "取消",
37
+ clear: "清空",
38
+ confirm: "确定",
39
+ dateTablePrompt: "使用方向键与 Enter 键可选择日期",
40
+ monthTablePrompt: "使用方向键与 Enter 键可选择月份",
41
+ yearTablePrompt: "使用方向键与 Enter 键可选择年份",
42
+ selectedDate: "已选日期",
43
+ selectDate: "选择日期",
44
+ selectTime: "选择时间",
45
+ startDate: "开始日期",
46
+ startTime: "开始时间",
47
+ endDate: "结束日期",
48
+ endTime: "结束时间",
49
+ prevYear: "前一年",
50
+ nextYear: "后一年",
51
+ prevMonth: "上个月",
52
+ nextMonth: "下个月",
53
+ year: "年",
54
+ month1: "1 月",
55
+ month2: "2 月",
56
+ month3: "3 月",
57
+ month4: "4 月",
58
+ month5: "5 月",
59
+ month6: "6 月",
60
+ month7: "7 月",
61
+ month8: "8 月",
62
+ month9: "9 月",
63
+ month10: "10 月",
64
+ month11: "11 月",
65
+ month12: "12 月",
66
+ weeks: {
67
+ sun: "日",
68
+ mon: "一",
69
+ tue: "二",
70
+ wed: "三",
71
+ thu: "四",
72
+ fri: "五",
73
+ sat: "六"
74
+ },
75
+ weeksFull: {
76
+ sun: "星期日",
77
+ mon: "星期一",
78
+ tue: "星期二",
79
+ wed: "星期三",
80
+ thu: "星期四",
81
+ fri: "星期五",
82
+ sat: "星期六"
83
+ },
84
+ months: {
85
+ jan: "一月",
86
+ feb: "二月",
87
+ mar: "三月",
88
+ apr: "四月",
89
+ may: "五月",
90
+ jun: "六月",
91
+ jul: "七月",
92
+ aug: "八月",
93
+ sep: "九月",
94
+ oct: "十月",
95
+ nov: "十一月",
96
+ dec: "十二月"
97
+ }
98
+ },
99
+ inputNumber: {
100
+ decrease: "减少数值",
101
+ increase: "增加数值"
102
+ },
103
+ select: {
104
+ loading: "加载中",
105
+ noMatch: "无匹配数据",
106
+ noData: "无数据",
107
+ placeholder: "请选择"
108
+ },
109
+ dropdown: {
110
+ toggleDropdown: "切换下拉选项"
111
+ },
112
+ mention: {
113
+ loading: "加载中"
114
+ },
115
+ cascader: {
116
+ noMatch: "无匹配数据",
117
+ loading: "加载中",
118
+ placeholder: "请选择",
119
+ noData: "暂无数据"
120
+ },
121
+ pagination: {
122
+ goto: "前往",
123
+ pagesize: "条/页",
124
+ total: "共 {total} 条",
125
+ pageClassifier: "页",
126
+ page: "页",
127
+ prev: "上一页",
128
+ next: "下一页",
129
+ currentPage: "第 {pager} 页",
130
+ prevPages: "向前 {pager} 页",
131
+ nextPages: "向后 {pager} 页",
132
+ deprecationWarning: "你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"
133
+ },
134
+ dialog: {
135
+ close: "关闭此对话框"
136
+ },
137
+ drawer: {
138
+ close: "关闭此对话框"
139
+ },
140
+ messagebox: {
141
+ title: "提示",
142
+ confirm: "确定",
143
+ cancel: "取消",
144
+ error: "输入的数据不合法!",
145
+ close: "关闭此对话框"
146
+ },
147
+ upload: {
148
+ deleteTip: "按 delete 键可删除",
149
+ delete: "删除",
150
+ preview: "查看图片",
151
+ continue: "继续上传"
152
+ },
153
+ slider: {
154
+ defaultLabel: "滑块介于 {min} 至 {max}",
155
+ defaultRangeStartLabel: "选择起始值",
156
+ defaultRangeEndLabel: "选择结束值"
157
+ },
158
+ table: {
159
+ emptyText: "暂无数据",
160
+ confirmFilter: "筛选",
161
+ resetFilter: "重置",
162
+ clearFilter: "全部",
163
+ sumText: "合计"
164
+ },
165
+ tour: {
166
+ next: "下一步",
167
+ previous: "上一步",
168
+ finish: "结束导览"
169
+ },
170
+ tree: {
171
+ emptyText: "暂无数据"
172
+ },
173
+ transfer: {
174
+ noMatch: "无匹配数据",
175
+ noData: "无数据",
176
+ titles: ["列表 1", "列表 2"],
177
+ filterPlaceholder: "请输入搜索内容",
178
+ noCheckedFormat: "共 {total} 项",
179
+ hasCheckedFormat: "已选 {checked}/{total} 项"
180
+ },
181
+ image: {
182
+ error: "加载失败"
183
+ },
184
+ pageHeader: {
185
+ title: "返回"
186
+ },
187
+ popconfirm: {
188
+ confirmButtonText: "确定",
189
+ cancelButtonText: "取消"
190
+ },
191
+ carousel: {
192
+ leftArrow: "上一张幻灯片",
193
+ rightArrow: "下一张幻灯片",
194
+ indicator: "幻灯片切换至索引 {index}"
195
+ }
196
+ }
197
+ };
198
+ const re = {
199
+ title: "对话框",
200
+ width: 600,
201
+ fullscreen: !1,
202
+ top: "30px",
203
+ modal: !0,
204
+ modalClass: "mor-dialog-modal",
205
+ headerClass: "mor-dialog-header",
206
+ bodyClass: "mor-dialog-body-wrapper",
207
+ footerClass: "mor-dialog-footer",
208
+ appendToBody: !0,
209
+ appendTo: "body",
210
+ lockScroll: !0,
211
+ openDelay: 0,
212
+ closeDelay: 0,
213
+ closeOnClickModal: !1,
214
+ closeOnPressEscape: !1,
215
+ showClose: !1,
216
+ beforeClose: (u) => u(),
217
+ draggable: !0,
218
+ overFlow: !1,
219
+ center: !1,
220
+ alignCenter: !1,
221
+ destroyOnClose: !0,
222
+ closeIcon: "close",
223
+ confirmButtonText: "确认",
224
+ cancelButtonText: "取消"
225
+ }, se = {
226
+ class: "mor-dialog-body",
227
+ "element-loading-background": "rgba(0,0,0,0.1)",
228
+ "element-loading-text": "加载中..."
229
+ }, ie = /* @__PURE__ */ q({
230
+ __name: "MDialog",
231
+ props: /* @__PURE__ */ G({
232
+ modelValue: { type: Boolean },
233
+ title: {},
234
+ subTitle: {},
235
+ width: {},
236
+ fullscreen: { type: Boolean },
237
+ top: {},
238
+ modal: { type: Boolean },
239
+ modalClass: {},
240
+ headerClass: {},
241
+ bodyClass: {},
242
+ footerClass: {},
243
+ appendToBody: { type: Boolean },
244
+ appendTo: {},
245
+ lockScroll: { type: Boolean },
246
+ openDelay: {},
247
+ closeDelay: {},
248
+ closeOnClickModal: { type: Boolean },
249
+ closeOnPressEscape: { type: Boolean },
250
+ showClose: { type: Boolean },
251
+ beforeClose: { type: Function },
252
+ draggable: { type: Boolean },
253
+ overFlow: { type: Boolean },
254
+ center: { type: Boolean },
255
+ alignCenter: { type: Boolean },
256
+ destroyOnClose: { type: Boolean },
257
+ closeIcon: {},
258
+ zIndex: {},
259
+ headerAriaLevel: {},
260
+ confirm: { type: Function },
261
+ cancel: { type: Function },
262
+ confirmButtonText: {},
263
+ cancelButtonText: {}
264
+ }, re),
265
+ emits: ["close", "update:title", "update:subTitle", "update:modelValue"],
266
+ setup(u, { expose: t, emit: a }) {
267
+ let c = a, r = u;
268
+ const T = J(), N = E(() => !!T.header), _ = E(() => !!T.footer), I = _.value || !!r.confirm, i = m(!1), s = m({}), w = m(""), x = m(""), j = E({
269
+ get: () => r.title,
270
+ set: (e) => {
271
+ c("update:title", e), w.value = e || "对话框";
272
+ }
273
+ }), k = E({
274
+ get: () => r.subTitle,
275
+ set: (e) => {
276
+ c("update:subTitle", e), x.value = e || "";
277
+ }
278
+ }), H = m({}), $ = E({
279
+ get: () => r.modelValue,
280
+ set: (e) => {
281
+ c("update:modelValue", e);
282
+ }
283
+ });
284
+ function K(e = {}, o) {
285
+ if (o) {
286
+ const { title: B, subTitle: g } = o;
287
+ j.value = B, k.value = g;
288
+ }
289
+ H.value = e, s.value = oe.cloneDeep(e), c("update:modelValue", !0);
290
+ }
291
+ function D() {
292
+ i.value = !1, c("update:modelValue", !1);
293
+ }
294
+ function R() {
295
+ i.value = !0, r.confirm && r.confirm(s.value, D);
296
+ }
297
+ function h() {
298
+ i.value = !0, r.cancel ? r.cancel(s.value, D) : D();
299
+ }
300
+ return t({ open: K, close: D }), (e, o) => {
301
+ const B = d("el-text"), g = d("el-divider"), U = d("fa"), y = d("el-button"), P = d("el-space"), Y = d("el-dialog"), W = Q("loading");
302
+ return p(), M(Y, X({
303
+ class: "mor-dialog",
304
+ modelValue: $.value,
305
+ "onUpdate:modelValue": o[0] || (o[0] = (b) => $.value = b)
306
+ }, { ...e.$props, ...e.$attrs }, {
307
+ onClose: o[1] || (o[1] = (b) => V(c)("close")),
308
+ onKeydown: o[2] || (o[2] = Z((b) => h(), ["esc"]))
309
+ }), ee({
310
+ header: l(() => [
311
+ S("div", null, [
312
+ F(e.$slots, "title", { data: s.value }, () => [
313
+ n(B, {
314
+ size: "large",
315
+ tag: "b"
316
+ }, {
317
+ default: l(() => [
318
+ f(C(w.value), 1)
319
+ ]),
320
+ _: 1
321
+ })
322
+ ]),
323
+ F(e.$slots, "sub-title", { data: s.value }, () => [
324
+ k.value ? (p(), A(z, { key: 0 }, [
325
+ n(g, { direction: "vertical" }),
326
+ n(B, {
327
+ tag: "b",
328
+ type: "info"
329
+ }, {
330
+ default: l(() => [
331
+ f(C(x.value), 1)
332
+ ]),
333
+ _: 1
334
+ })
335
+ ], 64)) : v("", !0)
336
+ ])
337
+ ]),
338
+ S("div", null, [
339
+ N.value ? (p(), A(z, { key: 0 }, [
340
+ F(e.$slots, "header", { data: s.value }),
341
+ n(g, { direction: "vertical" })
342
+ ], 64)) : v("", !0),
343
+ n(y, {
344
+ size: "small",
345
+ style: { padding: "3px 6px" },
346
+ type: "danger",
347
+ disabled: i.value,
348
+ onClick: h
349
+ }, {
350
+ default: l(() => [
351
+ n(U, { icon: "close" })
352
+ ]),
353
+ _: 1
354
+ }, 8, ["disabled"])
355
+ ])
356
+ ]),
357
+ default: l(() => [
358
+ ue((p(), A("div", se, [
359
+ F(e.$slots, "default", { data: s.value })
360
+ ])), [
361
+ [W, i.value]
362
+ ])
363
+ ]),
364
+ _: 2
365
+ }, [
366
+ V(I) ? {
367
+ name: "footer",
368
+ fn: l(() => [
369
+ n(P, null, {
370
+ default: l(() => [
371
+ _.value ? F(e.$slots, "footer", {
372
+ key: 0,
373
+ data: s.value
374
+ }) : v("", !0),
375
+ o[3] || (o[3] = f("   "))
376
+ ]),
377
+ _: 3
378
+ }),
379
+ e.confirm ? (p(), M(P, { key: 0 }, {
380
+ default: l(() => [
381
+ n(y, {
382
+ type: "success",
383
+ disabled: i.value,
384
+ onClick: R
385
+ }, {
386
+ default: l(() => [
387
+ f(C(e.confirmButtonText), 1)
388
+ ]),
389
+ _: 1
390
+ }, 8, ["disabled"]),
391
+ n(y, {
392
+ type: "info",
393
+ onClick: h,
394
+ disabled: i.value
395
+ }, {
396
+ default: l(() => [
397
+ f(C(e.cancelButtonText), 1)
398
+ ]),
399
+ _: 1
400
+ }, 8, ["disabled"])
401
+ ]),
402
+ _: 1
403
+ })) : v("", !0)
404
+ ]),
405
+ key: "0"
406
+ } : void 0
407
+ ]), 1040, ["modelValue"]);
408
+ };
409
+ }
410
+ });
411
+ te.add(le);
412
+ const ce = (u) => {
413
+ const t = ne(u || {});
414
+ return {
415
+ install: (a) => {
416
+ a.provide("channel", t), a.component("MDialog", ie), a.use(L, {
417
+ locale: O
418
+ }), a.component("fa", ae);
419
+ }
420
+ };
421
+ }, De = {
422
+ install: (u, t) => {
423
+ u.use(L, {
424
+ locale: O
425
+ }), ce(t).install(u);
18
426
  }
19
427
  };
20
428
  export {
21
- f as LypButton,
22
- y as default
429
+ Ce as ElementPlus,
430
+ ie as MDialog,
431
+ ce as createMorghulis,
432
+ De as default
23
433
  };
434
+ //# sourceMappingURL=morghulis.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"morghulis.es.js","sources":["../src/tools/sockets.ts","../node_modules/element-plus/es/locale/lang/zh-cn.mjs","../src/types/dialog.types.ts","../src/components/dialog/MDialog.vue","../src/index.ts"],"sourcesContent":["// 简单的通信通道实现\nexport const $channel = (options: any = {}) => {\n const baseUrl = options.baseUrl || '';\n const timeout = options.timeout || 30000;\n const headers = options.headers || {};\n \n // 这里可以实现实际的通信逻辑\n // 例如:WebSocket连接、HTTP请求等\n \n return {\n // 发送消息\n send: (event: string, data: any) => {\n console.log(`发送消息: ${event}`, data);\n // 实际发送逻辑\n return Promise.resolve({ success: true });\n },\n \n // 接收消息\n on: (event: string, callback: Function) => {\n console.log(`监听事件: ${event}`);\n // 实际监听逻辑\n return () => {\n console.log(`取消监听: ${event}`);\n // 取消监听逻辑\n };\n },\n \n // 关闭通道\n close: () => {\n console.log('关闭通道');\n // 实际关闭逻辑\n }\n };\n};","var zhCn = {\n name: \"zh-cn\",\n el: {\n breadcrumb: {\n label: \"\\u9762\\u5305\\u5C51\"\n },\n colorpicker: {\n confirm: \"\\u786E\\u5B9A\",\n clear: \"\\u6E05\\u7A7A\",\n defaultLabel: \"\\u989C\\u8272\\u9009\\u62E9\\u5668\",\n description: \"\\u5F53\\u524D\\u989C\\u8272 {color}\\uFF0C\\u6309 Enter \\u952E\\u9009\\u62E9\\u65B0\\u989C\\u8272\",\n alphaLabel: \"\\u9009\\u62E9\\u900F\\u660E\\u5EA6\\u7684\\u503C\"\n },\n datepicker: {\n now: \"\\u6B64\\u523B\",\n today: \"\\u4ECA\\u5929\",\n cancel: \"\\u53D6\\u6D88\",\n clear: \"\\u6E05\\u7A7A\",\n confirm: \"\\u786E\\u5B9A\",\n dateTablePrompt: \"\\u4F7F\\u7528\\u65B9\\u5411\\u952E\\u4E0E Enter \\u952E\\u53EF\\u9009\\u62E9\\u65E5\\u671F\",\n monthTablePrompt: \"\\u4F7F\\u7528\\u65B9\\u5411\\u952E\\u4E0E Enter \\u952E\\u53EF\\u9009\\u62E9\\u6708\\u4EFD\",\n yearTablePrompt: \"\\u4F7F\\u7528\\u65B9\\u5411\\u952E\\u4E0E Enter \\u952E\\u53EF\\u9009\\u62E9\\u5E74\\u4EFD\",\n selectedDate: \"\\u5DF2\\u9009\\u65E5\\u671F\",\n selectDate: \"\\u9009\\u62E9\\u65E5\\u671F\",\n selectTime: \"\\u9009\\u62E9\\u65F6\\u95F4\",\n startDate: \"\\u5F00\\u59CB\\u65E5\\u671F\",\n startTime: \"\\u5F00\\u59CB\\u65F6\\u95F4\",\n endDate: \"\\u7ED3\\u675F\\u65E5\\u671F\",\n endTime: \"\\u7ED3\\u675F\\u65F6\\u95F4\",\n prevYear: \"\\u524D\\u4E00\\u5E74\",\n nextYear: \"\\u540E\\u4E00\\u5E74\",\n prevMonth: \"\\u4E0A\\u4E2A\\u6708\",\n nextMonth: \"\\u4E0B\\u4E2A\\u6708\",\n year: \"\\u5E74\",\n month1: \"1 \\u6708\",\n month2: \"2 \\u6708\",\n month3: \"3 \\u6708\",\n month4: \"4 \\u6708\",\n month5: \"5 \\u6708\",\n month6: \"6 \\u6708\",\n month7: \"7 \\u6708\",\n month8: \"8 \\u6708\",\n month9: \"9 \\u6708\",\n month10: \"10 \\u6708\",\n month11: \"11 \\u6708\",\n month12: \"12 \\u6708\",\n weeks: {\n sun: \"\\u65E5\",\n mon: \"\\u4E00\",\n tue: \"\\u4E8C\",\n wed: \"\\u4E09\",\n thu: \"\\u56DB\",\n fri: \"\\u4E94\",\n sat: \"\\u516D\"\n },\n weeksFull: {\n sun: \"\\u661F\\u671F\\u65E5\",\n mon: \"\\u661F\\u671F\\u4E00\",\n tue: \"\\u661F\\u671F\\u4E8C\",\n wed: \"\\u661F\\u671F\\u4E09\",\n thu: \"\\u661F\\u671F\\u56DB\",\n fri: \"\\u661F\\u671F\\u4E94\",\n sat: \"\\u661F\\u671F\\u516D\"\n },\n months: {\n jan: \"\\u4E00\\u6708\",\n feb: \"\\u4E8C\\u6708\",\n mar: \"\\u4E09\\u6708\",\n apr: \"\\u56DB\\u6708\",\n may: \"\\u4E94\\u6708\",\n jun: \"\\u516D\\u6708\",\n jul: \"\\u4E03\\u6708\",\n aug: \"\\u516B\\u6708\",\n sep: \"\\u4E5D\\u6708\",\n oct: \"\\u5341\\u6708\",\n nov: \"\\u5341\\u4E00\\u6708\",\n dec: \"\\u5341\\u4E8C\\u6708\"\n }\n },\n inputNumber: {\n decrease: \"\\u51CF\\u5C11\\u6570\\u503C\",\n increase: \"\\u589E\\u52A0\\u6570\\u503C\"\n },\n select: {\n loading: \"\\u52A0\\u8F7D\\u4E2D\",\n noMatch: \"\\u65E0\\u5339\\u914D\\u6570\\u636E\",\n noData: \"\\u65E0\\u6570\\u636E\",\n placeholder: \"\\u8BF7\\u9009\\u62E9\"\n },\n dropdown: {\n toggleDropdown: \"\\u5207\\u6362\\u4E0B\\u62C9\\u9009\\u9879\"\n },\n mention: {\n loading: \"\\u52A0\\u8F7D\\u4E2D\"\n },\n cascader: {\n noMatch: \"\\u65E0\\u5339\\u914D\\u6570\\u636E\",\n loading: \"\\u52A0\\u8F7D\\u4E2D\",\n placeholder: \"\\u8BF7\\u9009\\u62E9\",\n noData: \"\\u6682\\u65E0\\u6570\\u636E\"\n },\n pagination: {\n goto: \"\\u524D\\u5F80\",\n pagesize: \"\\u6761/\\u9875\",\n total: \"\\u5171 {total} \\u6761\",\n pageClassifier: \"\\u9875\",\n page: \"\\u9875\",\n prev: \"\\u4E0A\\u4E00\\u9875\",\n next: \"\\u4E0B\\u4E00\\u9875\",\n currentPage: \"\\u7B2C {pager} \\u9875\",\n prevPages: \"\\u5411\\u524D {pager} \\u9875\",\n nextPages: \"\\u5411\\u540E {pager} \\u9875\",\n deprecationWarning: \"\\u4F60\\u4F7F\\u7528\\u4E86\\u4E00\\u4E9B\\u5DF2\\u88AB\\u5E9F\\u5F03\\u7684\\u7528\\u6CD5\\uFF0C\\u8BF7\\u53C2\\u8003 el-pagination \\u7684\\u5B98\\u65B9\\u6587\\u6863\"\n },\n dialog: {\n close: \"\\u5173\\u95ED\\u6B64\\u5BF9\\u8BDD\\u6846\"\n },\n drawer: {\n close: \"\\u5173\\u95ED\\u6B64\\u5BF9\\u8BDD\\u6846\"\n },\n messagebox: {\n title: \"\\u63D0\\u793A\",\n confirm: \"\\u786E\\u5B9A\",\n cancel: \"\\u53D6\\u6D88\",\n error: \"\\u8F93\\u5165\\u7684\\u6570\\u636E\\u4E0D\\u5408\\u6CD5!\",\n close: \"\\u5173\\u95ED\\u6B64\\u5BF9\\u8BDD\\u6846\"\n },\n upload: {\n deleteTip: \"\\u6309 delete \\u952E\\u53EF\\u5220\\u9664\",\n delete: \"\\u5220\\u9664\",\n preview: \"\\u67E5\\u770B\\u56FE\\u7247\",\n continue: \"\\u7EE7\\u7EED\\u4E0A\\u4F20\"\n },\n slider: {\n defaultLabel: \"\\u6ED1\\u5757\\u4ECB\\u4E8E {min} \\u81F3 {max}\",\n defaultRangeStartLabel: \"\\u9009\\u62E9\\u8D77\\u59CB\\u503C\",\n defaultRangeEndLabel: \"\\u9009\\u62E9\\u7ED3\\u675F\\u503C\"\n },\n table: {\n emptyText: \"\\u6682\\u65E0\\u6570\\u636E\",\n confirmFilter: \"\\u7B5B\\u9009\",\n resetFilter: \"\\u91CD\\u7F6E\",\n clearFilter: \"\\u5168\\u90E8\",\n sumText: \"\\u5408\\u8BA1\"\n },\n tour: {\n next: \"\\u4E0B\\u4E00\\u6B65\",\n previous: \"\\u4E0A\\u4E00\\u6B65\",\n finish: \"\\u7ED3\\u675F\\u5BFC\\u89C8\"\n },\n tree: {\n emptyText: \"\\u6682\\u65E0\\u6570\\u636E\"\n },\n transfer: {\n noMatch: \"\\u65E0\\u5339\\u914D\\u6570\\u636E\",\n noData: \"\\u65E0\\u6570\\u636E\",\n titles: [\"\\u5217\\u8868 1\", \"\\u5217\\u8868 2\"],\n filterPlaceholder: \"\\u8BF7\\u8F93\\u5165\\u641C\\u7D22\\u5185\\u5BB9\",\n noCheckedFormat: \"\\u5171 {total} \\u9879\",\n hasCheckedFormat: \"\\u5DF2\\u9009 {checked}/{total} \\u9879\"\n },\n image: {\n error: \"\\u52A0\\u8F7D\\u5931\\u8D25\"\n },\n pageHeader: {\n title: \"\\u8FD4\\u56DE\"\n },\n popconfirm: {\n confirmButtonText: \"\\u786E\\u5B9A\",\n cancelButtonText: \"\\u53D6\\u6D88\"\n },\n carousel: {\n leftArrow: \"\\u4E0A\\u4E00\\u5F20\\u5E7B\\u706F\\u7247\",\n rightArrow: \"\\u4E0B\\u4E00\\u5F20\\u5E7B\\u706F\\u7247\",\n indicator: \"\\u5E7B\\u706F\\u7247\\u5207\\u6362\\u81F3\\u7D22\\u5F15 {index}\"\n }\n }\n};\n\nexport { zhCn as default };\n//# sourceMappingURL=zh-cn.mjs.map\n","export interface MorDialogProps {\n modelValue?: boolean,\n title?: string,\n subTitle?: string,\n width?: string | number,\n fullscreen?: boolean,\n top?: string,\n modal?: boolean,\n modalClass?: string,\n headerClass?: string,\n bodyClass?: string,\n footerClass?: string,\n appendToBody?: boolean,\n appendTo?: string,\n lockScroll?: boolean,\n openDelay?: number,\n closeDelay?: number,\n closeOnClickModal?: boolean,\n closeOnPressEscape?: boolean,\n showClose?: boolean,\n beforeClose?: Function,\n draggable?: boolean,\n overFlow?: boolean,\n center?: boolean,\n alignCenter?: boolean,\n destroyOnClose?: boolean,\n closeIcon?: string,\n zIndex?: number,\n headerAriaLevel?: string,\n confirm?: Function,\n cancel?: Function,\n confirmButtonText?: string\n cancelButtonText?: string\n}\n\nexport const morDialogPropsDefault: MorDialogProps = {\n title: '对话框',\n width: 600,\n fullscreen: false,\n top: '30px',\n modal: true,\n modalClass: 'mor-dialog-modal',\n headerClass: 'mor-dialog-header',\n bodyClass: 'mor-dialog-body-wrapper',\n footerClass: 'mor-dialog-footer',\n appendToBody: true,\n appendTo: 'body',\n lockScroll: true,\n openDelay: 0,\n closeDelay: 0,\n closeOnClickModal: false,\n closeOnPressEscape: false,\n showClose: false,\n beforeClose: (done: Function) => done(),\n draggable: true,\n overFlow: false,\n center: false,\n alignCenter: false,\n destroyOnClose: true,\n closeIcon: 'close',\n confirmButtonText: '确认',\n cancelButtonText: '取消',\n}","<template>\n <el-dialog\n class=\"mor-dialog\"\n v-model=\"visible\"\n v-bind=\"{...$props, ...$attrs}\"\n @close=\"emits('close')\"\n @keydown.esc=\"handleCancel()\"\n >\n <template #header>\n <div>\n <slot name=\"title\" :data=\"$data\">\n <el-text size=\"large\" tag=\"b\">{{ __title }}</el-text>\n </slot>\n <slot name=\"sub-title\" :data=\"$data\">\n <template v-if=\"$subTitle\">\n <el-divider direction=\"vertical\"></el-divider>\n <el-text tag=\"b\" type=\"info\">{{ __subTitle }}</el-text>\n </template>\n </slot>\n </div>\n <div>\n <template v-if=\"hasHeader\">\n <slot name=\"header\" :data=\"$data\"></slot>\n <el-divider direction=\"vertical\"></el-divider>\n </template>\n <el-button\n size=\"small\"\n style=\"padding: 3px 6px\"\n type=\"danger\"\n :disabled=\"loading\"\n @click=\"handleCancel\"\n >\n <fa icon=\"close\"></fa>\n </el-button>\n </div>\n </template>\n <template #default>\n <div\n v-loading=\"loading\"\n class=\"mor-dialog-body\"\n element-loading-background=\"rgba(0,0,0,0.1)\"\n element-loading-text=\"加载中...\"\n >\n <slot :data=\"$data\"></slot>\n </div>\n </template>\n <template #footer v-if=\"showFooter\">\n <el-space>\n <slot v-if=\"hasFooter\" name=\"footer\" :data=\"$data\"/>\n &nbsp;\n </el-space>\n <el-space v-if=\"confirm\">\n <el-button\n type=\"success\"\n :disabled=\"loading\"\n @click=\"handleConfirm\"\n >\n {{ confirmButtonText }}\n </el-button>\n <el-button\n type=\"info\"\n @click=\"handleCancel\"\n :disabled=\"loading\"\n >\n {{ cancelButtonText }}\n </el-button>\n </el-space>\n </template>\n </el-dialog>\n</template>\n\n<script setup lang=\"ts\">\n\nimport {computed, ref, useSlots} from \"vue\";\nimport _ from 'lodash'\n\nimport {morDialogPropsDefault, type MorDialogProps} from \"../../types/dialog.types.ts\";\n\n// 已从types/dialog.types.ts导入MorDialogProps接口,无需重复定义\n\nlet emits = defineEmits(['close', 'update:title', 'update:subTitle', 'update:modelValue'])\nlet props = withDefaults(\n defineProps<MorDialogProps>(),\n morDialogPropsDefault\n)\n\n/**\n * 功能区\n */\nconst slots = useSlots();\nconst hasHeader = computed(() => !!slots.header)\nconst hasFooter = computed(() => !!slots.footer)\nconst showFooter = hasFooter.value || !!props.confirm\n\n\nconst loading = ref(false)\nconst $data: any = ref({})\nconst __title = ref('')\nconst __subTitle = ref('')\nconst $title = computed({\n get: () => props.title,\n set: (v) => {\n emits('update:title', v)\n __title.value = v || '对话框'\n }\n})\nconst $subTitle = computed({\n get: () => props.subTitle,\n set: (v) => {\n emits('update:subTitle', v)\n __subTitle.value = v || ''\n }\n})\n\nconst $origin = ref({})\n\n// 将visible与modelValue同步\nconst visible = computed({\n get: () => props.modelValue,\n set: (value) => {\n emits('update:modelValue', value)\n }\n})\n\nexport type MorDialogConfig = {\n title: string,\n subTitle: string\n}\n\nfunction open(data: any = {}, config?: MorDialogConfig) {\n if (config) {\n const {title, subTitle} = config\n $title.value = title\n $subTitle.value = subTitle\n }\n $origin.value = data\n $data.value = _.cloneDeep(data)\n emits('update:modelValue', true)\n}\n\nfunction close() {\n loading.value = false\n emits('update:modelValue', false)\n}\n\nfunction handleConfirm() {\n loading.value = true\n props.confirm && props.confirm($data.value, close)\n}\n\nfunction handleCancel() {\n loading.value = true\n if (props.cancel) {\n props.cancel($data.value, close)\n } else {\n close()\n }\n}\n\ndefineExpose({open, close})\n\n</script>\n\n<style>\n.mor-dialog {\n border: 2px solid #aaaaaa;\n}\n\n.mor-dialog-modal {\n background-color: rgba(4, 33, 71, 0.15) !important;\n}\n\n.mor-dialog-header {\n display: flex !important;\n align-items: center !important;\n justify-content: space-between !important;\n padding-left: 5px;\n}\n\n.mor-dialog-body-wrapper {\n padding: 0;\n background-color: transparent;\n}\n\n.mor-dialog-body {\n background-color: #ffffff;\n}\n\n.mor-dialog-footer {\n color: #aaa;\n padding-left: 5px;\n display: flex !important;\n align-items: center !important;\n justify-content: space-between !important;\n}\n</style>","import type {App} from \"vue\";\nimport ElementPlus from 'element-plus'\n// 确保导入Element Plus的样式\nimport 'element-plus/dist/index.css'\nimport {$channel} from \"./tools/sockets.ts\";\nimport 'font-awesome/css/font-awesome.css'\nimport type {MorOption} from \"./types/io.types.ts\";\nimport zhCn from 'element-plus/es/locale/lang/zh-cn'\nimport MDialog from \"./components/dialog/MDialog.vue\";\nimport {library} from '@fortawesome/fontawesome-svg-core';\nimport {fas} from '@fortawesome/free-solid-svg-icons'\nimport {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';\n// 导入Element Plus的组件类型,确保IDE能够识别\nimport type * as ElementPlusComponents from 'element-plus'\n\n// 注册FontAwesome图标\nlibrary.add(fas);\n\n// 创建Morghulis实例的工厂函数\nexport const createMorghulis = (options?: MorOption) => {\n const channel = $channel(options || {})\n return {\n install: (Vue: App) => {\n Vue.provide('channel', channel)\n Vue.component('MDialog', MDialog)\n Vue.use(ElementPlus, {\n locale: zhCn,\n })\n Vue.component('fa', FontAwesomeIcon)\n }\n }\n}\n\n// 导出组件,方便单独引入\nexport {\n MDialog\n}\n\n// 导出Element Plus,确保用户可以访问所有Element Plus组件\nexport { ElementPlus }\n\n// 导出类型定义\nexport type * from './types/dialog.types.ts'\nexport type * from './types/io.types.ts'\n// 重新导出Element Plus的类型,确保IDE能够识别\nexport type * from 'element-plus'\n\n// 默认导出\nexport default {\n install: (app: App, options?: MorOption) => {\n // 先安装Element Plus,确保其组件和样式被正确加载\n app.use(ElementPlus, {\n locale: zhCn,\n })\n // 再安装Morghulis组件\n createMorghulis(options).install(app)\n }\n}"],"names":["$channel","options","event","data","callback","zhCn","morDialogPropsDefault","done","emits","__emit","props","__props","slots","useSlots","hasHeader","computed","hasFooter","showFooter","loading","ref","$data","__title","__subTitle","$title","v","$subTitle","$origin","visible","value","open","config","title","subTitle","_","close","handleConfirm","handleCancel","__expose","library","fas","createMorghulis","channel","Vue","MDialog","ElementPlus","FontAwesomeIcon","index","app"],"mappings":";;;;;;;AACO,MAAMA,KAAW,CAACC,IAAe,QACtBA,EAAQ,SACRA,EAAQ,SACRA,EAAQ,SAKjB;AAAA;AAAA,EAEL,MAAM,CAACC,GAAeC,OACpB,QAAQ,IAAI,SAASD,CAAK,IAAIC,CAAI,GAE3B,QAAQ,QAAQ,EAAE,SAAS,GAAM,CAAA;AAAA;AAAA,EAI1C,IAAI,CAACD,GAAeE,OACV,QAAA,IAAI,SAASF,CAAK,EAAE,GAErB,MAAM;AACH,YAAA,IAAI,SAASA,CAAK,EAAE;AAAA,EAAA;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