yxuse 3.0.70 → 3.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +2 -1
- package/lib/hooks.cjs.js +1 -1
- package/lib/hooks.es.js +5 -0
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs5.js +1 -1
- package/lib/index.cjs5.js.gz +0 -0
- package/lib/index.cjs6.js +1 -1
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.cjs9.js +1 -1
- package/lib/index.es.js +7 -2
- package/lib/index.es5.js +5 -2
- package/lib/index.es5.js.gz +0 -0
- package/lib/index.es6.js +78 -25
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es9.js +208 -0
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +4 -0
- package/lib/translate.cjs.js +1 -1
- package/lib/translate.es.js +3 -0
- package/lib/yxuse.css +1 -1
- package/lib/yxuse.css.gz +0 -0
- package/package.json +2 -1
- package/types/components/YxTable/index.vue.d.ts +24 -3
- package/types/components/YxTable/type.d.ts +8 -0
- package/types/components/Yxbutton/index.d.ts +2 -0
- package/types/components/Yxbutton/index.vue.d.ts +26 -0
- package/types/components/index.d.ts +1 -0
- package/types/hooks/index.d.ts +4 -0
- package/types/hooks/useConfirm/index.d.ts +3 -0
- package/types/hooks/useDialog/index.d.ts +4 -0
- package/types/hooks/useDialog/type.d.ts +28 -0
- package/types/hooks/useDrawer/index.d.ts +4 -0
- package/types/hooks/useDrawer/type.d.ts +28 -0
- package/types/hooks/useMessage/index.d.ts +5 -0
package/lib/index.es6.js
CHANGED
|
@@ -9,7 +9,7 @@ import { j as jumpToHome, b as getUserConfig } from "./index.es12.js";
|
|
|
9
9
|
import "element-plus/es/components/message/style/index";
|
|
10
10
|
import { u as uploadResourceApi } from "./index.es14.js";
|
|
11
11
|
const _hoisted_1$4 = { class: "dialog-footer flex justify-end" };
|
|
12
|
-
const _sfc_main$
|
|
12
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
13
13
|
__name: "index",
|
|
14
14
|
setup(__props, { expose: __expose }) {
|
|
15
15
|
const dialogOptions = reactive({
|
|
@@ -108,7 +108,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
const _hoisted_1$3 = { class: "dialog-footer flex justify-end" };
|
|
111
|
-
const _sfc_main$
|
|
111
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
112
112
|
__name: "index",
|
|
113
113
|
setup(__props, { expose: __expose }) {
|
|
114
114
|
const drawerOptions = reactive({
|
|
@@ -214,7 +214,7 @@ const exportToExcel = ({ header, tableData, fileName }) => {
|
|
|
214
214
|
function _isSlot$1(s) {
|
|
215
215
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
216
216
|
}
|
|
217
|
-
const _sfc_main$
|
|
217
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
218
218
|
...{
|
|
219
219
|
name: "YxTable",
|
|
220
220
|
inheritAttrs: false
|
|
@@ -222,14 +222,19 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
222
222
|
__name: "index",
|
|
223
223
|
props: {
|
|
224
224
|
tableData: {},
|
|
225
|
-
rowKey: {
|
|
226
|
-
|
|
227
|
-
type: [Array, Function]
|
|
225
|
+
rowKey: {
|
|
226
|
+
default: "id"
|
|
228
227
|
},
|
|
228
|
+
columns: {},
|
|
229
229
|
pageInfo: {},
|
|
230
230
|
sort: {
|
|
231
231
|
type: Boolean
|
|
232
232
|
},
|
|
233
|
+
config: {
|
|
234
|
+
default: () => ({
|
|
235
|
+
headerOverflowHide: true
|
|
236
|
+
})
|
|
237
|
+
},
|
|
233
238
|
sortHandle: {}
|
|
234
239
|
},
|
|
235
240
|
emits: ["operate-handle", "sort-end", "update-page"],
|
|
@@ -400,7 +405,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
400
405
|
const {
|
|
401
406
|
rowKey,
|
|
402
407
|
tableData,
|
|
403
|
-
pageInfo
|
|
408
|
+
pageInfo,
|
|
409
|
+
config
|
|
404
410
|
} = props2;
|
|
405
411
|
const columnSlots = (cell, scope) => {
|
|
406
412
|
var _a;
|
|
@@ -428,10 +434,19 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
428
434
|
return renderResult;
|
|
429
435
|
}
|
|
430
436
|
if (children && (children == null ? void 0 : children.length) > 0) return renderColumn(children);
|
|
437
|
+
if (cell == null ? void 0 : cell.tooltip) {
|
|
438
|
+
return createVNode(resolveComponent("el-tooltip"), {
|
|
439
|
+
"content": scope.row[scope.column.property]
|
|
440
|
+
}, {
|
|
441
|
+
default: () => [createVNode("span", {
|
|
442
|
+
"class": "truncate"
|
|
443
|
+
}, [scope.row[scope.column.property]])]
|
|
444
|
+
});
|
|
445
|
+
}
|
|
431
446
|
return (cell == null ? void 0 : cell.slotName) && columnSlots(cell, scope);
|
|
432
447
|
},
|
|
433
448
|
header: (scope) => {
|
|
434
|
-
var _a, _b;
|
|
449
|
+
var _a, _b, _c;
|
|
435
450
|
if (cell == null ? void 0 : cell.required) {
|
|
436
451
|
return createVNode("span", {
|
|
437
452
|
"class": "flex items-center gap-5 required"
|
|
@@ -439,6 +454,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
439
454
|
}
|
|
440
455
|
if (cell == null ? void 0 : cell.headerRender) return cell == null ? void 0 : cell.headerRender(scope.row);
|
|
441
456
|
if (cell == null ? void 0 : cell.headerSlotName) return (_b = slots[cell == null ? void 0 : cell.headerSlotName]) == null ? void 0 : _b.call(slots, scope);
|
|
457
|
+
return createVNode("span", {
|
|
458
|
+
"class": (config == null ? void 0 : config.headerOverflowHide) ? "text-nowrap" : ""
|
|
459
|
+
}, [((_c = scope == null ? void 0 : scope.column) == null ? void 0 : _c.label) ?? ""]);
|
|
442
460
|
}
|
|
443
461
|
});
|
|
444
462
|
});
|
|
@@ -545,7 +563,7 @@ const Question = { render };
|
|
|
545
563
|
function _isSlot(s) {
|
|
546
564
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
547
565
|
}
|
|
548
|
-
const _sfc_main$
|
|
566
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
549
567
|
...{
|
|
550
568
|
name: "YxForm"
|
|
551
569
|
},
|
|
@@ -889,7 +907,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
889
907
|
};
|
|
890
908
|
}
|
|
891
909
|
});
|
|
892
|
-
const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
910
|
+
const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-03f9a267"]]);
|
|
893
911
|
let versionKey, curVersion, updateApp;
|
|
894
912
|
const updateSysVersion = () => {
|
|
895
913
|
localStorage.setItem(versionKey, curVersion);
|
|
@@ -908,7 +926,7 @@ const _hoisted_5 = { class: "update-title" };
|
|
|
908
926
|
const _hoisted_6 = { class: "update-item px-20" };
|
|
909
927
|
const _hoisted_7 = { class: "text-end" };
|
|
910
928
|
const _hoisted_8 = { class: "flex justify-end items-center mt-10" };
|
|
911
|
-
const _sfc_main$
|
|
929
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
912
930
|
__name: "index",
|
|
913
931
|
props: {
|
|
914
932
|
title: {},
|
|
@@ -957,8 +975,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
957
975
|
};
|
|
958
976
|
}
|
|
959
977
|
});
|
|
960
|
-
const Update = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
961
|
-
const _sfc_main$
|
|
978
|
+
const Update = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ebf4f18f"]]);
|
|
979
|
+
const _sfc_main$3 = {
|
|
962
980
|
props: {
|
|
963
981
|
color: {
|
|
964
982
|
type: String,
|
|
@@ -978,8 +996,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
978
996
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
979
997
|
], 4);
|
|
980
998
|
}
|
|
981
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
982
|
-
const _sfc_main$
|
|
999
|
+
const index = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$1], ["__scopeId", "data-v-a90cbe2e"]]);
|
|
1000
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
983
1001
|
__name: "index",
|
|
984
1002
|
props: {
|
|
985
1003
|
uploadTips: {},
|
|
@@ -1072,7 +1090,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1072
1090
|
};
|
|
1073
1091
|
}
|
|
1074
1092
|
});
|
|
1075
|
-
const _sfc_main = {
|
|
1093
|
+
const _sfc_main$1 = {
|
|
1076
1094
|
name: "LogoTitle",
|
|
1077
1095
|
props: {
|
|
1078
1096
|
showLogo: {
|
|
@@ -1136,7 +1154,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1136
1154
|
}, toDisplayString((_d = $data.customConfig) == null ? void 0 : _d.title), 5)) : createCommentVNode("", true)
|
|
1137
1155
|
], 2);
|
|
1138
1156
|
}
|
|
1139
|
-
const LogoTitle = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-376fc0fb"]]);
|
|
1157
|
+
const LogoTitle = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-376fc0fb"]]);
|
|
1140
1158
|
class LogoTitleRender {
|
|
1141
1159
|
constructor(props, domId = "system-logo-title") {
|
|
1142
1160
|
this.render(props, domId);
|
|
@@ -1153,29 +1171,64 @@ class LogoTitleRender {
|
|
|
1153
1171
|
}
|
|
1154
1172
|
}
|
|
1155
1173
|
}
|
|
1174
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
1175
|
+
__name: "index",
|
|
1176
|
+
props: {
|
|
1177
|
+
onClick: { type: Function },
|
|
1178
|
+
noLoading: { type: Boolean }
|
|
1179
|
+
},
|
|
1180
|
+
setup(__props) {
|
|
1181
|
+
const props = __props;
|
|
1182
|
+
const loading = ref(false);
|
|
1183
|
+
const handleClick = async () => {
|
|
1184
|
+
if (props.onClick) {
|
|
1185
|
+
const result = props.onClick();
|
|
1186
|
+
if (result instanceof Promise && !props.noLoading) {
|
|
1187
|
+
try {
|
|
1188
|
+
loading.value = true;
|
|
1189
|
+
await result;
|
|
1190
|
+
} finally {
|
|
1191
|
+
loading.value = false;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
};
|
|
1196
|
+
return (_ctx, _cache) => {
|
|
1197
|
+
const _component_el_button = resolveComponent("el-button");
|
|
1198
|
+
return openBlock(), createBlock(_component_el_button, mergeProps({ loading: loading.value }, _ctx.$attrs, { onClick: handleClick }), {
|
|
1199
|
+
default: withCtx(() => [
|
|
1200
|
+
renderSlot(_ctx.$slots, "default")
|
|
1201
|
+
]),
|
|
1202
|
+
_: 3
|
|
1203
|
+
}, 16, ["loading"]);
|
|
1204
|
+
};
|
|
1205
|
+
}
|
|
1206
|
+
});
|
|
1156
1207
|
const components2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1157
1208
|
__proto__: null,
|
|
1158
1209
|
LogoTitle,
|
|
1159
1210
|
LogoTitleRender,
|
|
1160
1211
|
Toolbar,
|
|
1161
1212
|
Update,
|
|
1162
|
-
|
|
1163
|
-
|
|
1213
|
+
YxButton: _sfc_main,
|
|
1214
|
+
YxDialog: _sfc_main$8,
|
|
1215
|
+
YxDrawer: _sfc_main$7,
|
|
1164
1216
|
YxForm: index$1,
|
|
1165
1217
|
YxIcon: index,
|
|
1166
|
-
YxTable: _sfc_main$
|
|
1218
|
+
YxTable: _sfc_main$6,
|
|
1167
1219
|
YxTablePro,
|
|
1168
|
-
YxUpload: _sfc_main$
|
|
1220
|
+
YxUpload: _sfc_main$2
|
|
1169
1221
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1170
1222
|
export {
|
|
1171
1223
|
LogoTitleRender as L,
|
|
1172
1224
|
Update as U,
|
|
1173
|
-
_sfc_main$
|
|
1174
|
-
_sfc_main$
|
|
1175
|
-
_sfc_main$
|
|
1225
|
+
_sfc_main$8 as _,
|
|
1226
|
+
_sfc_main$7 as a,
|
|
1227
|
+
_sfc_main$6 as b,
|
|
1176
1228
|
components2 as c,
|
|
1177
1229
|
index as d,
|
|
1178
|
-
_sfc_main$
|
|
1230
|
+
_sfc_main$2 as e,
|
|
1179
1231
|
LogoTitle as f,
|
|
1232
|
+
_sfc_main as g,
|
|
1180
1233
|
index$1 as i
|
|
1181
1234
|
};
|
package/lib/index.es6.js.gz
CHANGED
|
Binary file
|
package/lib/index.es9.js
CHANGED
|
@@ -1,8 +1,216 @@
|
|
|
1
1
|
import { u as useTime } from "./index.es11.js";
|
|
2
|
+
import ElementPlus, { ElMessageBox, ElDialog, ElButton, ElDrawer, ElMessage } from "element-plus";
|
|
3
|
+
import "element-plus/es/components/message-box/style/index";
|
|
4
|
+
import { ref, defineComponent, h, createApp } from "vue";
|
|
5
|
+
import "element-plus/es/components/dialog/style/index";
|
|
6
|
+
import "element-plus/es/components/button/style/index";
|
|
7
|
+
import "element-plus/es/components/drawer/style/index";
|
|
8
|
+
import "element-plus/es/components/message/style/index";
|
|
9
|
+
const useConfirm = (content, confrmCallback, options = {}) => {
|
|
10
|
+
ElMessageBox.confirm(content, (options == null ? void 0 : options.title) || "提示", {
|
|
11
|
+
confirmButtonText: "确定",
|
|
12
|
+
cancelButtonText: "取消",
|
|
13
|
+
type: "warning",
|
|
14
|
+
...options
|
|
15
|
+
}).then(() => {
|
|
16
|
+
confrmCallback();
|
|
17
|
+
}).catch(() => {
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const diaConfig$1 = {
|
|
21
|
+
width: "30%",
|
|
22
|
+
showFooter: true,
|
|
23
|
+
autoClose: true,
|
|
24
|
+
confirmText: "确认",
|
|
25
|
+
cancelText: "取消",
|
|
26
|
+
draggable: true,
|
|
27
|
+
closeOnClickModal: false
|
|
28
|
+
};
|
|
29
|
+
const useDialog = async (options) => {
|
|
30
|
+
let app;
|
|
31
|
+
const visible = ref(true);
|
|
32
|
+
const loading = ref(false);
|
|
33
|
+
const mergeOptions = { ...diaConfig$1, ...options };
|
|
34
|
+
const { showFooter, autoClose, submit, cancel, beforeOpen, beforeSubmit, confirmText, cancelText, content } = mergeOptions;
|
|
35
|
+
if (beforeOpen) {
|
|
36
|
+
await beforeOpen();
|
|
37
|
+
}
|
|
38
|
+
const dialogWrapper = defineComponent({
|
|
39
|
+
setup() {
|
|
40
|
+
const close = () => {
|
|
41
|
+
visible.value = false;
|
|
42
|
+
};
|
|
43
|
+
const selfSubmit = async () => {
|
|
44
|
+
try {
|
|
45
|
+
const shouldProceed = beforeSubmit ? await beforeSubmit() : true;
|
|
46
|
+
if (shouldProceed) {
|
|
47
|
+
loading.value = true;
|
|
48
|
+
await (submit == null ? void 0 : submit());
|
|
49
|
+
}
|
|
50
|
+
} finally {
|
|
51
|
+
autoClose && (visible.value = false);
|
|
52
|
+
loading.value = false;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return {
|
|
56
|
+
open,
|
|
57
|
+
close,
|
|
58
|
+
selfSubmit
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
render() {
|
|
62
|
+
const footer = () => {
|
|
63
|
+
return h("div", { class: "flex justify-end gap-10" }, [
|
|
64
|
+
h(ElButton, { onClick: this.close, plain: true }, { default: () => cancelText }),
|
|
65
|
+
h(
|
|
66
|
+
ElButton,
|
|
67
|
+
{ onClick: this.selfSubmit, loading: loading.value },
|
|
68
|
+
{
|
|
69
|
+
default: () => confirmText
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
]);
|
|
73
|
+
};
|
|
74
|
+
return h(
|
|
75
|
+
ElDialog,
|
|
76
|
+
{
|
|
77
|
+
modelValue: visible.value,
|
|
78
|
+
...mergeOptions,
|
|
79
|
+
beforeClose: () => {
|
|
80
|
+
this.close();
|
|
81
|
+
cancel && cancel();
|
|
82
|
+
},
|
|
83
|
+
onClosed: () => {
|
|
84
|
+
app.unmount();
|
|
85
|
+
document.body.removeChild(container);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
default: () => content && content instanceof Function ? content() : content,
|
|
90
|
+
footer: () => showFooter ? footer() : null
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const container = document.createElement("div");
|
|
96
|
+
document.body.appendChild(container);
|
|
97
|
+
app = createApp(dialogWrapper);
|
|
98
|
+
app.use(ElementPlus).mount(container);
|
|
99
|
+
};
|
|
100
|
+
const diaConfig = {
|
|
101
|
+
width: "30%",
|
|
102
|
+
showFooter: true,
|
|
103
|
+
autoClose: true,
|
|
104
|
+
confirmText: "确认",
|
|
105
|
+
cancelText: "取消",
|
|
106
|
+
draggable: true,
|
|
107
|
+
closeOnClickModal: false
|
|
108
|
+
};
|
|
109
|
+
const useDrawer = async (options) => {
|
|
110
|
+
let app;
|
|
111
|
+
const visible = ref(true);
|
|
112
|
+
const loading = ref(false);
|
|
113
|
+
const mergeOptions = { ...diaConfig, ...options };
|
|
114
|
+
const { showFooter, autoClose, submit, cancel, beforeOpen, beforeSubmit, confirmText, cancelText, content } = mergeOptions;
|
|
115
|
+
if (beforeOpen) {
|
|
116
|
+
await beforeOpen();
|
|
117
|
+
}
|
|
118
|
+
const dialogWrapper = defineComponent({
|
|
119
|
+
setup() {
|
|
120
|
+
const close = () => {
|
|
121
|
+
visible.value = false;
|
|
122
|
+
};
|
|
123
|
+
const selfSubmit = async () => {
|
|
124
|
+
try {
|
|
125
|
+
const shouldProceed = beforeSubmit ? await beforeSubmit() : true;
|
|
126
|
+
if (shouldProceed) {
|
|
127
|
+
loading.value = true;
|
|
128
|
+
await (submit == null ? void 0 : submit());
|
|
129
|
+
}
|
|
130
|
+
} finally {
|
|
131
|
+
autoClose && (visible.value = false);
|
|
132
|
+
loading.value = false;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
return {
|
|
136
|
+
open,
|
|
137
|
+
close,
|
|
138
|
+
selfSubmit
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
render() {
|
|
142
|
+
const footer = () => {
|
|
143
|
+
return h("div", { class: "flex justify-end gap-10" }, [
|
|
144
|
+
h(ElButton, { onClick: this.close, plain: true }, { default: () => cancelText }),
|
|
145
|
+
h(
|
|
146
|
+
ElButton,
|
|
147
|
+
{ onClick: this.selfSubmit, loading: loading.value },
|
|
148
|
+
{
|
|
149
|
+
default: () => confirmText
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
]);
|
|
153
|
+
};
|
|
154
|
+
return h(
|
|
155
|
+
ElDrawer,
|
|
156
|
+
{
|
|
157
|
+
modelValue: visible.value,
|
|
158
|
+
...mergeOptions,
|
|
159
|
+
size: mergeOptions.width,
|
|
160
|
+
beforeClose: () => {
|
|
161
|
+
this.close();
|
|
162
|
+
cancel && cancel();
|
|
163
|
+
},
|
|
164
|
+
onClosed: () => {
|
|
165
|
+
app.unmount();
|
|
166
|
+
document.body.removeChild(container);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
default: () => content && content instanceof Function ? content() : content,
|
|
171
|
+
footer: () => showFooter ? footer() : null
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
const container = document.createElement("div");
|
|
177
|
+
document.body.appendChild(container);
|
|
178
|
+
app = createApp(dialogWrapper);
|
|
179
|
+
app.use(ElementPlus).mount(container);
|
|
180
|
+
};
|
|
181
|
+
const useMessage = (arg) => {
|
|
182
|
+
if (arg) {
|
|
183
|
+
const { data, callback, isShowError = true } = arg;
|
|
184
|
+
try {
|
|
185
|
+
if (data == null ? void 0 : data.isSuccess) {
|
|
186
|
+
ElMessage.success((data == null ? void 0 : data.resultMsg) || "操作成功");
|
|
187
|
+
callback && callback();
|
|
188
|
+
} else {
|
|
189
|
+
if (isShowError) {
|
|
190
|
+
ElMessage.error((data == null ? void 0 : data.resultMsg) || "操作失败");
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
} catch (error) {
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
success: (msg) => ElMessage.success(msg),
|
|
198
|
+
error: (msg) => ElMessage.error(msg),
|
|
199
|
+
warning: (msg) => ElMessage.warning(msg)
|
|
200
|
+
};
|
|
201
|
+
};
|
|
2
202
|
const yxHooks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
203
|
__proto__: null,
|
|
204
|
+
useConfirm,
|
|
205
|
+
useDialog,
|
|
206
|
+
useDrawer,
|
|
207
|
+
useMessage,
|
|
4
208
|
useTime
|
|
5
209
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6
210
|
export {
|
|
211
|
+
useDialog as a,
|
|
212
|
+
useDrawer as b,
|
|
213
|
+
useMessage as c,
|
|
214
|
+
useConfirm as u,
|
|
7
215
|
yxHooks as y
|
|
8
216
|
};
|
package/lib/theme.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs5.js");require("./index.cjs4.js"),require("vue"),require("xlsx"),require("./vendor-file-saver.cjs.js"),require("xlsx-js-style"),require("./vendor-sortablejs.cjs.js"),require("element-plus"),require("./index.cjs12.js"),require("./index.cjs13.js"),require("element-plus/es/components/message/style/index"),require("element-plus/es/components/loading/style/index"),require("element-plus/es/components/message/style/css"),require("element-plus/es/components/loading/style/css"),require("./vendor-mqtt.cjs.js"),require("./index.cjs7.js"),require("./index.cjs11.js"),exports.changeTheme=e.changeTheme,exports.findColorByTheme=e.findColorByTheme,exports.getCurTheme=e.getCurTheme,exports.getCurThemeCssVar=e.getCurThemeCssVar,exports.getDefaultThemeUrl=e.getDefaultThemeUrl,exports.getGroupColor=e.getGroupColor,exports.install=e.install,exports.installCssVarInSystemTheme=e.installCssVarInSystemTheme,exports.saveCssVar=e.saveCssVar,exports.setCssVar=e.setCssVar,exports.updateTheme=e.updateTheme;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs5.js");require("./index.cjs4.js"),require("vue"),require("xlsx"),require("./vendor-file-saver.cjs.js"),require("xlsx-js-style"),require("./vendor-sortablejs.cjs.js"),require("element-plus"),require("./index.cjs12.js"),require("./index.cjs13.js"),require("element-plus/es/components/message/style/index"),require("element-plus/es/components/loading/style/index"),require("element-plus/es/components/message/style/css"),require("element-plus/es/components/loading/style/css"),require("./vendor-mqtt.cjs.js"),require("./index.cjs7.js"),require("./index.cjs11.js"),require("element-plus/es/components/message-box/style/index"),require("element-plus/es/components/dialog/style/index"),require("element-plus/es/components/button/style/index"),require("element-plus/es/components/drawer/style/index"),exports.changeTheme=e.changeTheme,exports.findColorByTheme=e.findColorByTheme,exports.getCurTheme=e.getCurTheme,exports.getCurThemeCssVar=e.getCurThemeCssVar,exports.getDefaultThemeUrl=e.getDefaultThemeUrl,exports.getGroupColor=e.getGroupColor,exports.install=e.install,exports.installCssVarInSystemTheme=e.installCssVarInSystemTheme,exports.saveCssVar=e.saveCssVar,exports.setCssVar=e.setCssVar,exports.updateTheme=e.updateTheme;
|
package/lib/theme.es.js
CHANGED
|
@@ -15,6 +15,10 @@ import "element-plus/es/components/loading/style/css";
|
|
|
15
15
|
import "./vendor-mqtt.es.js";
|
|
16
16
|
import "./index.es7.js";
|
|
17
17
|
import "./index.es11.js";
|
|
18
|
+
import "element-plus/es/components/message-box/style/index";
|
|
19
|
+
import "element-plus/es/components/dialog/style/index";
|
|
20
|
+
import "element-plus/es/components/button/style/index";
|
|
21
|
+
import "element-plus/es/components/drawer/style/index";
|
|
18
22
|
export {
|
|
19
23
|
j as changeTheme,
|
|
20
24
|
q as findColorByTheme,
|
package/lib/translate.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs5.js");require("./vendor-lodash.cjs.js"),require("./index.cjs12.js"),require("element-plus"),require("element-plus/es/components/message/style/index"),require("element-plus/es/components/message-box/style/index"),require("./vendor-dayjs.cjs.js"),require("element-plus/es/components/loading/style/index"),require("element-plus/es/components/message/style/css"),require("element-plus/es/components/loading/style/css"),require("./vendor-mqtt.cjs.js"),require("vue"),require("xlsx"),require("./vendor-file-saver.cjs.js"),require("xlsx-js-style"),require("./vendor-sortablejs.cjs.js"),require("./index.cjs7.js"),require("./index.cjs11.js"),exports.changeLang=e.changeLang,exports.getLang=e.getLang,exports.getWordByYxI18nThesaurus=e.getWordByYxI18nThesaurus,exports.getZhWordByYxI18nThesaurus=e.getZhWordByYxI18nThesaurus,exports.handleTranslation=e.handleTranslation,exports.initTranslate=e.initTranslate,exports.loadCustomThesaurus=e.loadCustomThesaurus,exports.whitelistApi=e.whitelistApi;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs5.js");require("./vendor-lodash.cjs.js"),require("./index.cjs12.js"),require("element-plus"),require("element-plus/es/components/message/style/index"),require("element-plus/es/components/message-box/style/index"),require("./vendor-dayjs.cjs.js"),require("element-plus/es/components/loading/style/index"),require("element-plus/es/components/message/style/css"),require("element-plus/es/components/loading/style/css"),require("./vendor-mqtt.cjs.js"),require("vue"),require("xlsx"),require("./vendor-file-saver.cjs.js"),require("xlsx-js-style"),require("./vendor-sortablejs.cjs.js"),require("./index.cjs7.js"),require("./index.cjs11.js"),require("element-plus/es/components/dialog/style/index"),require("element-plus/es/components/button/style/index"),require("element-plus/es/components/drawer/style/index"),exports.changeLang=e.changeLang,exports.getLang=e.getLang,exports.getWordByYxI18nThesaurus=e.getWordByYxI18nThesaurus,exports.getZhWordByYxI18nThesaurus=e.getZhWordByYxI18nThesaurus,exports.handleTranslation=e.handleTranslation,exports.initTranslate=e.initTranslate,exports.loadCustomThesaurus=e.loadCustomThesaurus,exports.whitelistApi=e.whitelistApi;
|
package/lib/translate.es.js
CHANGED
|
@@ -16,6 +16,9 @@ import "xlsx-js-style";
|
|
|
16
16
|
import "./vendor-sortablejs.es.js";
|
|
17
17
|
import "./index.es7.js";
|
|
18
18
|
import "./index.es11.js";
|
|
19
|
+
import "element-plus/es/components/dialog/style/index";
|
|
20
|
+
import "element-plus/es/components/button/style/index";
|
|
21
|
+
import "element-plus/es/components/drawer/style/index";
|
|
19
22
|
export {
|
|
20
23
|
c as changeLang,
|
|
21
24
|
g as getLang,
|