element-less 0.0.32 → 0.0.34
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/custom/menu-tool/index.d.ts +18 -6
- package/custom/menu-tool/src/menuTool.vue.d.ts +6 -2
- package/element-less.cjs +1 -1
- package/element-less.iife.js +1 -1
- package/element-less.js +1 -1
- package/element-less.umd.cjs +1 -1
- package/hooks/useSelect.d.ts +1 -0
- package/hooks/useTree.d.ts +1 -0
- package/{index-BI89BNeA.js → index-BXNbms34.js} +204 -168
- package/index-Bi61ES06.cjs +1 -0
- package/{inner-wfALB2Xi.js → inner-7tCDHP4a.js} +1 -1
- package/{inner-BvNVMJAk.cjs → inner-CLO05Xkb.cjs} +1 -1
- package/{innerItem-B4-Ei2zz.cjs → innerItem-D-dQCdxC.cjs} +1 -1
- package/{innerItem-CjEXcxPQ.js → innerItem-oVhiu6eJ.js} +1 -1
- package/{mode-csharp-CFrOHziI.js → mode-csharp-2uFK_Xfk.js} +1 -1
- package/{mode-csharp-pcSYh5ef.cjs → mode-csharp-DKKQ_tFv.cjs} +1 -1
- package/{mode-css-7U33znGJ.js → mode-css--MzwaiJV.js} +1 -1
- package/{mode-css-BAryeYKj.cjs → mode-css-BL68yXEk.cjs} +1 -1
- package/{mode-javascript-fhG4KxFO.js → mode-javascript-Cy4e6XSt.js} +1 -1
- package/{mode-javascript-TuVk8v3B.cjs → mode-javascript-wdxP7Xd-.cjs} +1 -1
- package/{mode-json-B79fV6z1.cjs → mode-json-BUvJ6Edr.cjs} +1 -1
- package/{mode-json-BVtwLN-c.js → mode-json-Chpf6R8h.js} +1 -1
- package/{mode-mysql-ZefAWbv4.js → mode-mysql-B5NfPqi0.js} +1 -1
- package/{mode-mysql-B9BdkXi7.cjs → mode-mysql-CSZ6eXk7.cjs} +1 -1
- package/package.json +1 -1
- package/index-BO55iFtS.cjs +0 -1
package/hooks/useSelect.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare function useSelect(props: any, defaultEmits: any, formNode?: Ref<
|
|
|
11
11
|
onClickOption: (item: any) => void;
|
|
12
12
|
onCheckAll: (val: any) => void;
|
|
13
13
|
onInverseChange: () => void;
|
|
14
|
+
readData: () => Promise<unknown> | undefined;
|
|
14
15
|
returnValue: (value: number | string | boolean) => void;
|
|
15
16
|
singleSelectValue: Ref<any>;
|
|
16
17
|
checkAll: Ref<any>;
|
package/hooks/useTree.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare function useTree(props: any, dataTree: Ref<any>, defaultEmits: an
|
|
|
13
13
|
options: Ref<any>;
|
|
14
14
|
defaultCheckedKeys: Ref<any>;
|
|
15
15
|
defaultExpandedKeys: Ref<any>;
|
|
16
|
+
readData: () => Promise<unknown> | undefined;
|
|
16
17
|
handleAllSelect: (node: any) => void;
|
|
17
18
|
filterNode: (value: any, data: any) => boolean;
|
|
18
19
|
onLoadNode: (node: any, resolve: any) => any;
|
|
@@ -4186,6 +4186,7 @@ function useSelect(props = {}, defaultEmits, formNode, componentName) {
|
|
|
4186
4186
|
onClickOption,
|
|
4187
4187
|
onCheckAll,
|
|
4188
4188
|
onInverseChange,
|
|
4189
|
+
readData,
|
|
4189
4190
|
returnValue: handleReturnValue,
|
|
4190
4191
|
singleSelectValue,
|
|
4191
4192
|
checkAll,
|
|
@@ -4491,19 +4492,22 @@ function useTree(props = {}, dataTree, defaultEmits, componentName) {
|
|
|
4491
4492
|
});
|
|
4492
4493
|
});
|
|
4493
4494
|
}
|
|
4495
|
+
function toTreeDataWithNoParent(data) {
|
|
4496
|
+
return data.map((ele) => {
|
|
4497
|
+
return {
|
|
4498
|
+
id: ele[currIdField.value],
|
|
4499
|
+
label: ele[props.labelField],
|
|
4500
|
+
value: ele[props.valueField],
|
|
4501
|
+
disabled: props.disabledField ? ele[props.disabledField] : false,
|
|
4502
|
+
children: ele.children ? toTreeDataWithNoParent(ele.children) : [],
|
|
4503
|
+
sourceData: ele
|
|
4504
|
+
};
|
|
4505
|
+
});
|
|
4506
|
+
}
|
|
4494
4507
|
function toTreeData() {
|
|
4495
4508
|
var groups = [];
|
|
4496
4509
|
if (!props.parentIdField) {
|
|
4497
|
-
options.value = optionData.value
|
|
4498
|
-
return {
|
|
4499
|
-
id: ele[currIdField.value],
|
|
4500
|
-
label: ele[props.labelField],
|
|
4501
|
-
value: ele[props.valueField],
|
|
4502
|
-
disabled: props.disabledField ? ele[props.disabledField] : false,
|
|
4503
|
-
children: ele.children ? ele.children : [],
|
|
4504
|
-
sourceData: ele
|
|
4505
|
-
};
|
|
4506
|
-
});
|
|
4510
|
+
options.value = toTreeDataWithNoParent(optionData.value);
|
|
4507
4511
|
return;
|
|
4508
4512
|
}
|
|
4509
4513
|
var roots = optionData.value.filter((ele) => ele[props.parentIdField] == props.rootParentValue).map((ele) => {
|
|
@@ -4896,6 +4900,7 @@ function useTree(props = {}, dataTree, defaultEmits, componentName) {
|
|
|
4896
4900
|
options,
|
|
4897
4901
|
defaultCheckedKeys,
|
|
4898
4902
|
defaultExpandedKeys,
|
|
4903
|
+
readData,
|
|
4899
4904
|
handleAllSelect,
|
|
4900
4905
|
filterNode,
|
|
4901
4906
|
onLoadNode,
|
|
@@ -5368,6 +5373,9 @@ class TBaseSelect extends TBaseFormItem {
|
|
|
5368
5373
|
constructor(props, ctx, comName) {
|
|
5369
5374
|
super(props, ctx);
|
|
5370
5375
|
this._selectState = useSelect(props, this._defaultEmits, this._formNode, comName);
|
|
5376
|
+
ctx.expose({
|
|
5377
|
+
readData: this._selectState.readData
|
|
5378
|
+
});
|
|
5371
5379
|
if (comName === "select") {
|
|
5372
5380
|
this._childType.value = "picker";
|
|
5373
5381
|
}
|
|
@@ -5403,6 +5411,9 @@ class TBaseTree extends TBaseFormItem {
|
|
|
5403
5411
|
super(props, ctx);
|
|
5404
5412
|
__publicField(this, "_treeRef", ref(null));
|
|
5405
5413
|
this._selectState = useTree(props, this._treeRef, this._defaultEmits, comName);
|
|
5414
|
+
ctx.expose({
|
|
5415
|
+
readData: this._selectState.readData
|
|
5416
|
+
});
|
|
5406
5417
|
}
|
|
5407
5418
|
watchModelValue() {
|
|
5408
5419
|
}
|
|
@@ -12404,8 +12415,8 @@ const _sfc_main$1A = /* @__PURE__ */ defineComponent({
|
|
|
12404
12415
|
title: _ctx.title,
|
|
12405
12416
|
beforeClose: mobileBeforeClose,
|
|
12406
12417
|
"close-on-click-overlay": _ctx.closeOnClickModal,
|
|
12407
|
-
showCancelButton: _ctx.
|
|
12408
|
-
"show-confirm-button": _ctx.
|
|
12418
|
+
showCancelButton: _ctx.confirm !== void 0,
|
|
12419
|
+
"show-confirm-button": _ctx.confirm !== void 0,
|
|
12409
12420
|
onCancel: handleCancel,
|
|
12410
12421
|
onConfirm: handleConfirm
|
|
12411
12422
|
}, createSlots({
|
|
@@ -12476,7 +12487,7 @@ const _sfc_main$1A = /* @__PURE__ */ defineComponent({
|
|
|
12476
12487
|
]),
|
|
12477
12488
|
key: "1"
|
|
12478
12489
|
} : void 0,
|
|
12479
|
-
!unref(slots).footer &&
|
|
12490
|
+
!unref(slots).footer && _ctx.confirm ? {
|
|
12480
12491
|
name: "footer",
|
|
12481
12492
|
fn: withCtx(() => [
|
|
12482
12493
|
createVNode(_component_el_button, {
|
|
@@ -15287,7 +15298,8 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15287
15298
|
...{ name: "ElsMenuTool" },
|
|
15288
15299
|
__name: "menuTool",
|
|
15289
15300
|
props: menuToolProps,
|
|
15290
|
-
|
|
15301
|
+
emits: ["callback"],
|
|
15302
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
15291
15303
|
const container = useContainer();
|
|
15292
15304
|
const props = __props;
|
|
15293
15305
|
const menuConfig = utils.getMenuConfig();
|
|
@@ -15312,6 +15324,7 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15312
15324
|
previewImg: "",
|
|
15313
15325
|
uploadUrl: ""
|
|
15314
15326
|
});
|
|
15327
|
+
const emits2 = __emit;
|
|
15315
15328
|
watch(() => props.url, (val) => {
|
|
15316
15329
|
if (val) {
|
|
15317
15330
|
val.post({}).then((res) => {
|
|
@@ -15402,7 +15415,9 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
15402
15415
|
uploadUrl: menu.TargetUrl
|
|
15403
15416
|
};
|
|
15404
15417
|
} else if (container.$menuCommand) {
|
|
15405
|
-
container.$menuCommand(menu)
|
|
15418
|
+
container.$menuCommand(menu).then((res) => {
|
|
15419
|
+
emits2("callback", res);
|
|
15420
|
+
});
|
|
15406
15421
|
}
|
|
15407
15422
|
}
|
|
15408
15423
|
function uploadSuccess(res) {
|
|
@@ -37484,45 +37499,45 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
37484
37499
|
});
|
|
37485
37500
|
const completeReadTableIds = ref([]);
|
|
37486
37501
|
function validate() {
|
|
37487
|
-
return new Promise((
|
|
37502
|
+
return new Promise((resolve2) => {
|
|
37488
37503
|
const currValidates = [...elsPageStore.value.validates];
|
|
37489
37504
|
if (elsPageStore.value.childContainer.length) {
|
|
37490
37505
|
currValidates.push(...elsPageStore.value.childContainer);
|
|
37491
37506
|
}
|
|
37492
37507
|
Promise.all(currValidates.map((ele) => ele.validate())).then((res) => {
|
|
37493
37508
|
if (res.every((ele) => ele == true)) {
|
|
37494
|
-
|
|
37509
|
+
resolve2(true);
|
|
37495
37510
|
emits2("validate", true);
|
|
37496
37511
|
} else {
|
|
37497
|
-
|
|
37512
|
+
resolve2(false);
|
|
37498
37513
|
emits2("validate", false);
|
|
37499
37514
|
}
|
|
37500
37515
|
});
|
|
37501
37516
|
});
|
|
37502
37517
|
}
|
|
37503
37518
|
function save(url) {
|
|
37504
|
-
return new Promise((
|
|
37519
|
+
return new Promise((resolve2, reject) => {
|
|
37505
37520
|
if (elsPageStore.value.saveForms.length) {
|
|
37506
37521
|
validate().then((res) => {
|
|
37507
37522
|
if (res) {
|
|
37508
37523
|
Promise.all(elsPageStore.value.saveForms.map((ele) => ele.save(url))).then(() => {
|
|
37509
|
-
|
|
37524
|
+
resolve2(true);
|
|
37510
37525
|
}).catch((error) => {
|
|
37511
37526
|
reject(error);
|
|
37512
37527
|
});
|
|
37513
37528
|
} else {
|
|
37514
|
-
|
|
37529
|
+
resolve2(false);
|
|
37515
37530
|
}
|
|
37516
37531
|
});
|
|
37517
37532
|
} else {
|
|
37518
|
-
|
|
37533
|
+
resolve2(true);
|
|
37519
37534
|
}
|
|
37520
37535
|
});
|
|
37521
37536
|
}
|
|
37522
37537
|
async function query(initPage = false, tableRef = "") {
|
|
37523
37538
|
const parentRefs = ctx._.parent.refs;
|
|
37524
37539
|
completeReadTableIds.value.length = 0;
|
|
37525
|
-
return new Promise(async (
|
|
37540
|
+
return new Promise(async (resolve2) => {
|
|
37526
37541
|
if (tableRef) {
|
|
37527
37542
|
const currForm = elsPageStore.value.queryForms.find((ele) => ele.tableRef == tableRef);
|
|
37528
37543
|
if (currForm) {
|
|
@@ -37535,13 +37550,13 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
37535
37550
|
if (currTable && (currTable.initReadData || !initPage)) {
|
|
37536
37551
|
completeReadTableIds.value.push(currTable.tagID);
|
|
37537
37552
|
currTable.query(initPage, res).then(() => {
|
|
37538
|
-
|
|
37553
|
+
resolve2(true);
|
|
37539
37554
|
});
|
|
37540
37555
|
}
|
|
37541
37556
|
}
|
|
37542
37557
|
});
|
|
37543
37558
|
} else {
|
|
37544
|
-
|
|
37559
|
+
resolve2(false);
|
|
37545
37560
|
}
|
|
37546
37561
|
return;
|
|
37547
37562
|
}
|
|
@@ -37577,7 +37592,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
37577
37592
|
});
|
|
37578
37593
|
}
|
|
37579
37594
|
Promise.all(queryAsyncs).then(() => {
|
|
37580
|
-
|
|
37595
|
+
resolve2(true);
|
|
37581
37596
|
});
|
|
37582
37597
|
} else if (elsPageStore.value.dataTables.length) {
|
|
37583
37598
|
const queryAsyncs = [];
|
|
@@ -37585,182 +37600,203 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
37585
37600
|
queryAsyncs.push(item.query(initPage, {}));
|
|
37586
37601
|
});
|
|
37587
37602
|
Promise.all(queryAsyncs).then(() => {
|
|
37588
|
-
|
|
37603
|
+
resolve2(true);
|
|
37589
37604
|
});
|
|
37590
37605
|
} else {
|
|
37591
|
-
|
|
37606
|
+
resolve2(true);
|
|
37592
37607
|
}
|
|
37593
37608
|
});
|
|
37594
37609
|
}
|
|
37595
37610
|
function elsSaveTable() {
|
|
37596
|
-
return new Promise(async (
|
|
37611
|
+
return new Promise(async (resolve2) => {
|
|
37597
37612
|
const queryAsyncs = [];
|
|
37598
37613
|
elsPageStore.value.dataTables.forEach((ele) => {
|
|
37599
37614
|
queryAsyncs.push(ele.saveTableData());
|
|
37600
37615
|
});
|
|
37601
37616
|
if (queryAsyncs.length) {
|
|
37602
37617
|
Promise.all(queryAsyncs).then(() => {
|
|
37603
|
-
|
|
37618
|
+
resolve2(true);
|
|
37604
37619
|
}).catch(() => {
|
|
37605
|
-
|
|
37620
|
+
resolve2(false);
|
|
37606
37621
|
});
|
|
37607
37622
|
}
|
|
37608
37623
|
});
|
|
37609
37624
|
}
|
|
37610
37625
|
function elsMenuCommand(menu) {
|
|
37611
|
-
|
|
37612
|
-
|
|
37613
|
-
|
|
37614
|
-
if (menu[$confirmField] && !menu[$confirmPasswordField]) {
|
|
37626
|
+
return new Promise((resolve2, reject) => {
|
|
37627
|
+
switch (menu[$actionField]) {
|
|
37628
|
+
case "Save":
|
|
37615
37629
|
menu.IsLoading = true;
|
|
37616
|
-
|
|
37617
|
-
|
|
37618
|
-
|
|
37630
|
+
if (menu[$confirmField] && !menu[$confirmPasswordField]) {
|
|
37631
|
+
menu.IsLoading = true;
|
|
37632
|
+
ElMessageBox.confirm(menu[$confirmField]).then((res) => {
|
|
37633
|
+
save(menu[$urlField]).then(() => {
|
|
37634
|
+
resolve2({ menu, res });
|
|
37635
|
+
menu.IsLoading = false;
|
|
37636
|
+
}).catch((err) => {
|
|
37637
|
+
reject(err);
|
|
37638
|
+
menu.IsLoading = false;
|
|
37639
|
+
});
|
|
37619
37640
|
}).catch(() => {
|
|
37620
37641
|
menu.IsLoading = false;
|
|
37621
37642
|
});
|
|
37622
|
-
}
|
|
37623
|
-
menu.
|
|
37624
|
-
|
|
37625
|
-
|
|
37626
|
-
|
|
37627
|
-
|
|
37628
|
-
|
|
37629
|
-
|
|
37630
|
-
|
|
37631
|
-
|
|
37632
|
-
|
|
37633
|
-
|
|
37634
|
-
|
|
37635
|
-
|
|
37636
|
-
|
|
37643
|
+
} else if (menu[$confirmField] && menu[$confirmPasswordField]) {
|
|
37644
|
+
ElMessageBox.prompt(`请输入密码${menu.IsShowPassword ? `【${menu[$confirmPasswordField]}】` : ""}`, menu[$confirmField], {
|
|
37645
|
+
confirmButtonText: "确定",
|
|
37646
|
+
cancelButtonText: "取消",
|
|
37647
|
+
closeOnHashChange: false,
|
|
37648
|
+
closeOnClickModal: false,
|
|
37649
|
+
inputValidator: (val) => {
|
|
37650
|
+
return val == menu[$confirmPasswordField];
|
|
37651
|
+
},
|
|
37652
|
+
inputErrorMessage: "密码错误"
|
|
37653
|
+
}).then(() => {
|
|
37654
|
+
save(menu[$urlField]).then((res) => {
|
|
37655
|
+
resolve2({ menu, res });
|
|
37656
|
+
menu.IsLoading = false;
|
|
37657
|
+
}).catch((err) => {
|
|
37658
|
+
reject(err);
|
|
37659
|
+
menu.IsLoading = false;
|
|
37660
|
+
});
|
|
37661
|
+
}).catch((err) => {
|
|
37662
|
+
reject(err);
|
|
37663
|
+
});
|
|
37664
|
+
} else {
|
|
37665
|
+
save(menu[$urlField]).then((res) => {
|
|
37637
37666
|
menu.IsLoading = false;
|
|
37638
|
-
|
|
37667
|
+
resolve2({ menu, res });
|
|
37668
|
+
}).catch((err) => {
|
|
37639
37669
|
menu.IsLoading = false;
|
|
37670
|
+
reject(err);
|
|
37640
37671
|
});
|
|
37641
|
-
}
|
|
37642
|
-
|
|
37643
|
-
|
|
37644
|
-
|
|
37645
|
-
|
|
37646
|
-
|
|
37647
|
-
|
|
37648
|
-
|
|
37649
|
-
|
|
37650
|
-
|
|
37651
|
-
|
|
37652
|
-
drawerUrl.value = menu[$urlField];
|
|
37653
|
-
drawerVisible.value = true;
|
|
37654
|
-
break;
|
|
37655
|
-
case "Dialog":
|
|
37656
|
-
dialogUrl.value = menu[$urlField];
|
|
37657
|
-
dialogVisible.value = true;
|
|
37658
|
-
break;
|
|
37659
|
-
case "Target":
|
|
37660
|
-
menu.IsLoading = true;
|
|
37661
|
-
if (menu.IsQueryState == 1) {
|
|
37662
|
-
elsPageStore.value.queryForms.forEach((ele) => {
|
|
37663
|
-
ele.cacheQueryState();
|
|
37664
|
-
});
|
|
37665
|
-
}
|
|
37666
|
-
window.location.href = menu[$urlField];
|
|
37667
|
-
break;
|
|
37668
|
-
case "TargetBlank":
|
|
37669
|
-
window.open(menu[$urlField]);
|
|
37670
|
-
break;
|
|
37671
|
-
case "Select":
|
|
37672
|
-
const currSelectData = {};
|
|
37673
|
-
elsPageStore.value.dataTables.forEach((ele) => {
|
|
37674
|
-
let keyData = ele.getTableSelectionWithQuery(props.selectMenuPostQuery);
|
|
37675
|
-
Object.assign(currSelectData, keyData);
|
|
37676
|
-
});
|
|
37677
|
-
if (menu[$confirmField] && !menu[$confirmPasswordField]) {
|
|
37672
|
+
}
|
|
37673
|
+
break;
|
|
37674
|
+
case "Drawer":
|
|
37675
|
+
drawerUrl.value = menu[$urlField];
|
|
37676
|
+
drawerVisible.value = true;
|
|
37677
|
+
break;
|
|
37678
|
+
case "Dialog":
|
|
37679
|
+
dialogUrl.value = menu[$urlField];
|
|
37680
|
+
dialogVisible.value = true;
|
|
37681
|
+
break;
|
|
37682
|
+
case "Target":
|
|
37678
37683
|
menu.IsLoading = true;
|
|
37679
|
-
|
|
37684
|
+
if (menu.IsQueryState == 1) {
|
|
37685
|
+
elsPageStore.value.queryForms.forEach((ele) => {
|
|
37686
|
+
ele.cacheQueryState();
|
|
37687
|
+
});
|
|
37688
|
+
}
|
|
37689
|
+
window.location.href = menu[$urlField];
|
|
37690
|
+
break;
|
|
37691
|
+
case "TargetBlank":
|
|
37692
|
+
window.open(menu[$urlField]);
|
|
37693
|
+
break;
|
|
37694
|
+
case "Select":
|
|
37695
|
+
const currSelectData = {};
|
|
37696
|
+
elsPageStore.value.dataTables.forEach((ele) => {
|
|
37697
|
+
let keyData = ele.getTableSelectionWithQuery(props.selectMenuPostQuery);
|
|
37698
|
+
Object.assign(currSelectData, keyData);
|
|
37699
|
+
});
|
|
37700
|
+
if (menu[$confirmField] && !menu[$confirmPasswordField]) {
|
|
37701
|
+
menu.IsLoading = true;
|
|
37702
|
+
ElMessageBox.confirm(menu[$confirmField]).then((_) => {
|
|
37703
|
+
menu[$urlField].post(currSelectData).then((res) => {
|
|
37704
|
+
menu.IsLoading = false;
|
|
37705
|
+
resolve2({ menu, res });
|
|
37706
|
+
if (!res) {
|
|
37707
|
+
return;
|
|
37708
|
+
}
|
|
37709
|
+
elsApiResult(res);
|
|
37710
|
+
}).catch((err) => {
|
|
37711
|
+
console.log(err);
|
|
37712
|
+
inject(err);
|
|
37713
|
+
menu.IsLoading = false;
|
|
37714
|
+
});
|
|
37715
|
+
}).catch((err) => {
|
|
37716
|
+
menu.IsLoading = false;
|
|
37717
|
+
inject(err);
|
|
37718
|
+
});
|
|
37719
|
+
} else if (menu[$confirmField] && menu[$confirmPasswordField]) {
|
|
37720
|
+
ElMessageBox.prompt(`请输入密码${menu.IsShowPassword ? `【${menu[$confirmPasswordField]}】` : ""}`, menu[$confirmField], {
|
|
37721
|
+
confirmButtonText: "确定",
|
|
37722
|
+
cancelButtonText: "取消",
|
|
37723
|
+
closeOnHashChange: false,
|
|
37724
|
+
closeOnClickModal: false,
|
|
37725
|
+
inputValidator: (val) => {
|
|
37726
|
+
return val == menu[$confirmPasswordField];
|
|
37727
|
+
},
|
|
37728
|
+
inputErrorMessage: "密码错误"
|
|
37729
|
+
}).then(() => {
|
|
37730
|
+
menu.IsLoading = true;
|
|
37731
|
+
menu[$urlField].post(currSelectData).then((res) => {
|
|
37732
|
+
menu.IsLoading = false;
|
|
37733
|
+
resolve2({ menu, res });
|
|
37734
|
+
if (!res) {
|
|
37735
|
+
return;
|
|
37736
|
+
}
|
|
37737
|
+
elsApiResult(res);
|
|
37738
|
+
}).catch((err) => {
|
|
37739
|
+
console.log(err);
|
|
37740
|
+
inject(err);
|
|
37741
|
+
menu.IsLoading = false;
|
|
37742
|
+
});
|
|
37743
|
+
}).catch((err) => {
|
|
37744
|
+
inject(err);
|
|
37745
|
+
});
|
|
37746
|
+
} else {
|
|
37747
|
+
menu.IsLoading = true;
|
|
37680
37748
|
menu[$urlField].post(currSelectData).then((res) => {
|
|
37681
37749
|
menu.IsLoading = false;
|
|
37750
|
+
resolve2({ menu, res });
|
|
37682
37751
|
if (!res) {
|
|
37683
37752
|
return;
|
|
37684
37753
|
}
|
|
37685
37754
|
elsApiResult(res);
|
|
37686
37755
|
}).catch((err) => {
|
|
37687
37756
|
console.log(err);
|
|
37757
|
+
inject(err);
|
|
37688
37758
|
menu.IsLoading = false;
|
|
37689
37759
|
});
|
|
37690
|
-
}
|
|
37691
|
-
|
|
37692
|
-
|
|
37693
|
-
|
|
37694
|
-
ElMessageBox.prompt(`请输入密码${menu.IsShowPassword ? `【${menu[$confirmPasswordField]}】` : ""}`, menu[$confirmField], {
|
|
37695
|
-
confirmButtonText: "确定",
|
|
37696
|
-
cancelButtonText: "取消",
|
|
37697
|
-
closeOnHashChange: false,
|
|
37698
|
-
closeOnClickModal: false,
|
|
37699
|
-
inputValidator: (val) => {
|
|
37700
|
-
return val == menu[$confirmPasswordField];
|
|
37701
|
-
},
|
|
37702
|
-
inputErrorMessage: "密码错误"
|
|
37703
|
-
}).then(() => {
|
|
37760
|
+
}
|
|
37761
|
+
break;
|
|
37762
|
+
case "Export":
|
|
37763
|
+
if (menu[$urlField] && menu[$urlField].split("?")[0]) {
|
|
37704
37764
|
menu.IsLoading = true;
|
|
37705
|
-
menu[$urlField].post(
|
|
37765
|
+
menu[$urlField].post((res) => {
|
|
37706
37766
|
menu.IsLoading = false;
|
|
37767
|
+
resolve2({ menu, res: true });
|
|
37707
37768
|
if (!res) {
|
|
37708
37769
|
return;
|
|
37709
37770
|
}
|
|
37710
|
-
|
|
37711
|
-
|
|
37712
|
-
|
|
37713
|
-
|
|
37771
|
+
if (res[$codeField] == "0") {
|
|
37772
|
+
var currUrl = res.Data;
|
|
37773
|
+
if (currUrl.indexOf("txt") > -1) {
|
|
37774
|
+
utils.downLoadTxt(currUrl);
|
|
37775
|
+
} else {
|
|
37776
|
+
window.location.href = currUrl;
|
|
37777
|
+
}
|
|
37778
|
+
} else {
|
|
37779
|
+
ElMessage.error(res[$messageField]);
|
|
37780
|
+
}
|
|
37714
37781
|
});
|
|
37715
|
-
}
|
|
37716
|
-
|
|
37717
|
-
|
|
37782
|
+
} else {
|
|
37783
|
+
elsExportAll();
|
|
37784
|
+
resolve2({ menu, res: true });
|
|
37785
|
+
menu.IsLoading = false;
|
|
37786
|
+
}
|
|
37787
|
+
break;
|
|
37788
|
+
case "Search":
|
|
37718
37789
|
menu.IsLoading = true;
|
|
37719
|
-
|
|
37790
|
+
query().then(() => {
|
|
37720
37791
|
menu.IsLoading = false;
|
|
37721
|
-
|
|
37722
|
-
return;
|
|
37723
|
-
}
|
|
37724
|
-
elsApiResult(res);
|
|
37792
|
+
resolve2({ menu, res: true });
|
|
37725
37793
|
}).catch((err) => {
|
|
37726
|
-
|
|
37727
|
-
menu.IsLoading = false;
|
|
37728
|
-
});
|
|
37729
|
-
}
|
|
37730
|
-
break;
|
|
37731
|
-
case "Export":
|
|
37732
|
-
if (menu[$urlField] && menu[$urlField].split("?")[0]) {
|
|
37733
|
-
menu.IsLoading = true;
|
|
37734
|
-
menu[$urlField].post((res) => {
|
|
37794
|
+
resolve2(err);
|
|
37735
37795
|
menu.IsLoading = false;
|
|
37736
|
-
if (!res) {
|
|
37737
|
-
return;
|
|
37738
|
-
}
|
|
37739
|
-
if (res[$codeField] == "0") {
|
|
37740
|
-
var currUrl = res.Data;
|
|
37741
|
-
if (currUrl.indexOf("txt") > -1) {
|
|
37742
|
-
utils.downLoadTxt(currUrl);
|
|
37743
|
-
} else {
|
|
37744
|
-
window.location.href = currUrl;
|
|
37745
|
-
}
|
|
37746
|
-
} else {
|
|
37747
|
-
ElMessage.error(res[$messageField]);
|
|
37748
|
-
}
|
|
37749
37796
|
});
|
|
37750
|
-
|
|
37751
|
-
|
|
37752
|
-
|
|
37753
|
-
}
|
|
37754
|
-
break;
|
|
37755
|
-
case "Search":
|
|
37756
|
-
menu.IsLoading = true;
|
|
37757
|
-
query().then(() => {
|
|
37758
|
-
menu.IsLoading = false;
|
|
37759
|
-
}).catch(() => {
|
|
37760
|
-
menu.IsLoading = false;
|
|
37761
|
-
});
|
|
37762
|
-
return false;
|
|
37763
|
-
}
|
|
37797
|
+
return false;
|
|
37798
|
+
}
|
|
37799
|
+
});
|
|
37764
37800
|
}
|
|
37765
37801
|
function elsApiResult(res) {
|
|
37766
37802
|
if (!res) {
|
|
@@ -37807,10 +37843,10 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
37807
37843
|
dataTable.exportTable();
|
|
37808
37844
|
}
|
|
37809
37845
|
function elsExportHtml() {
|
|
37810
|
-
return new Promise((
|
|
37846
|
+
return new Promise((resolve2) => {
|
|
37811
37847
|
if (!elsPageStore) {
|
|
37812
37848
|
ElMessage.warning("页面未包含在els-container中无法使用默认导出");
|
|
37813
|
-
|
|
37849
|
+
resolve2(false);
|
|
37814
37850
|
return;
|
|
37815
37851
|
}
|
|
37816
37852
|
const dataTables = elsPageStore.value.dataTables;
|
|
@@ -37848,7 +37884,7 @@ const _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
|
37848
37884
|
ele.changePageReadData();
|
|
37849
37885
|
}
|
|
37850
37886
|
});
|
|
37851
|
-
|
|
37887
|
+
resolve2(true);
|
|
37852
37888
|
});
|
|
37853
37889
|
});
|
|
37854
37890
|
}
|
|
@@ -38392,7 +38428,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
38392
38428
|
emits: /* @__PURE__ */ mergeModels(["removeItem"], ["update:children"]),
|
|
38393
38429
|
setup(__props, { emit: __emit }) {
|
|
38394
38430
|
const DynamicDesignerInnerItem = defineAsyncComponent(() => {
|
|
38395
|
-
return import("./innerItem-
|
|
38431
|
+
return import("./innerItem-oVhiu6eJ.js");
|
|
38396
38432
|
});
|
|
38397
38433
|
const { getValue: getValue2 } = useProps();
|
|
38398
38434
|
const tagID = getValue2("tagID");
|
|
@@ -39242,10 +39278,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
39242
39278
|
emits: ["update:modelValue"],
|
|
39243
39279
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39244
39280
|
const DynamicRenderInner = defineAsyncComponent(() => {
|
|
39245
|
-
return import("./inner-
|
|
39281
|
+
return import("./inner-7tCDHP4a.js").then((n) => n.i);
|
|
39246
39282
|
});
|
|
39247
39283
|
const DynamicRenderForm = defineAsyncComponent(() => {
|
|
39248
|
-
return import("./inner-
|
|
39284
|
+
return import("./inner-7tCDHP4a.js").then((n) => n.f);
|
|
39249
39285
|
});
|
|
39250
39286
|
const props = __props;
|
|
39251
39287
|
const { getValue: getValue2, setValue, formNodeProps } = useProps(props);
|
|
@@ -39475,10 +39511,10 @@ const _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
|
39475
39511
|
emits: ["update:modelValue"],
|
|
39476
39512
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39477
39513
|
const DynamicRenderInnerAsync = defineAsyncComponent(() => {
|
|
39478
|
-
return import("./inner-
|
|
39514
|
+
return import("./inner-7tCDHP4a.js").then((n) => n.i);
|
|
39479
39515
|
});
|
|
39480
39516
|
const DynamicRenderFormAsync = defineAsyncComponent(() => {
|
|
39481
|
-
return import("./inner-
|
|
39517
|
+
return import("./inner-7tCDHP4a.js").then((n) => n.f);
|
|
39482
39518
|
});
|
|
39483
39519
|
const props = __props;
|
|
39484
39520
|
const { getValue: getValue2, setValue, formNodeProps } = useProps(props);
|
|
@@ -44287,31 +44323,31 @@ let AceEditor$1 = class AceEditor extends TBaseFormItem {
|
|
|
44287
44323
|
__publicField(this, "editor", ref());
|
|
44288
44324
|
onMounted(() => {
|
|
44289
44325
|
if (props.language === "json") {
|
|
44290
|
-
const currModule = import("./mode-json-
|
|
44326
|
+
const currModule = import("./mode-json-Chpf6R8h.js").then((n) => n.m);
|
|
44291
44327
|
currModule.then((res) => {
|
|
44292
44328
|
ace.config.setModuleUrl("ace/mode/json", res);
|
|
44293
44329
|
this.init();
|
|
44294
44330
|
});
|
|
44295
44331
|
} else if (props.language === "javascript") {
|
|
44296
|
-
const currModule = import("./mode-javascript-
|
|
44332
|
+
const currModule = import("./mode-javascript-Cy4e6XSt.js").then((n) => n.m);
|
|
44297
44333
|
currModule.then((res) => {
|
|
44298
44334
|
ace.config.setModuleUrl("ace/mode/javascript", res);
|
|
44299
44335
|
this.init();
|
|
44300
44336
|
});
|
|
44301
44337
|
} else if (props.language === "csharp") {
|
|
44302
|
-
const currModule = import("./mode-csharp-
|
|
44338
|
+
const currModule = import("./mode-csharp-2uFK_Xfk.js").then((n) => n.m);
|
|
44303
44339
|
currModule.then((res) => {
|
|
44304
44340
|
ace.config.setModuleUrl("ace/mode/csharp", res);
|
|
44305
44341
|
this.init();
|
|
44306
44342
|
});
|
|
44307
44343
|
} else if (props.language === "mysql") {
|
|
44308
|
-
const currModule = import("./mode-mysql-
|
|
44344
|
+
const currModule = import("./mode-mysql-B5NfPqi0.js").then((n) => n.m);
|
|
44309
44345
|
currModule.then((res) => {
|
|
44310
44346
|
ace.config.setModuleUrl("ace/mode/mysql", res);
|
|
44311
44347
|
this.init();
|
|
44312
44348
|
});
|
|
44313
44349
|
} else if (props.language === "css") {
|
|
44314
|
-
const currModule = import("./mode-css
|
|
44350
|
+
const currModule = import("./mode-css--MzwaiJV.js").then((n) => n.m);
|
|
44315
44351
|
currModule.then((res) => {
|
|
44316
44352
|
ace.config.setModuleUrl("ace/mode/css", res);
|
|
44317
44353
|
this.init();
|