@epie/bi-crud 2.0.10 → 2.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.
- package/README.md +2 -2
- package/lib/bi-crud.esm.js +103 -27
- package/lib/bi-crud.umd.js +103 -27
- package/lib/components/crud/helper.d.ts +0 -1
- package/lib/components/crud/index.d.ts +3 -2
- package/lib/components/export-btn.d.ts +7 -3
- package/lib/types/base/crud.d.ts +3 -2
- package/lib/types/base/table.d.ts +2 -1
- package/lib/utils/test.d.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,7 +122,7 @@ export default {
|
|
|
122
122
|
// 分页信息
|
|
123
123
|
pagination: {
|
|
124
124
|
total: 8,
|
|
125
|
-
|
|
125
|
+
pageSize: 20,
|
|
126
126
|
page: 1
|
|
127
127
|
}
|
|
128
128
|
})
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
192
192
|
advSearch: "高级搜索",
|
|
193
193
|
saveButtonText: "保存",
|
|
194
194
|
closeButtonText: "关闭",
|
|
195
|
-
|
|
195
|
+
export: "导出",
|
|
196
196
|
}
|
|
197
197
|
},
|
|
198
198
|
})
|
package/lib/bi-crud.esm.js
CHANGED
|
@@ -14824,7 +14824,7 @@ function useHelper(_ref) {
|
|
|
14824
14824
|
resolve(res);
|
|
14825
14825
|
done();
|
|
14826
14826
|
}).catch(function (err) {
|
|
14827
|
-
ElMessage.error(err.
|
|
14827
|
+
ElMessage.error(err.msg);
|
|
14828
14828
|
reject(err);
|
|
14829
14829
|
done();
|
|
14830
14830
|
});
|
|
@@ -14864,14 +14864,6 @@ function useHelper(_ref) {
|
|
|
14864
14864
|
mitt.emit("crud.proxy", {
|
|
14865
14865
|
name: "add"
|
|
14866
14866
|
});
|
|
14867
|
-
} // 导出当前结果
|
|
14868
|
-
|
|
14869
|
-
|
|
14870
|
-
function doExport(callback) {
|
|
14871
|
-
mitt.emit("crud.proxy", {
|
|
14872
|
-
name: "export",
|
|
14873
|
-
callback: callback
|
|
14874
|
-
});
|
|
14875
14867
|
} // 打开编辑
|
|
14876
14868
|
|
|
14877
14869
|
|
|
@@ -14942,7 +14934,7 @@ function useHelper(_ref) {
|
|
|
14942
14934
|
ElMessage.success("删除成功");
|
|
14943
14935
|
resolve(res);
|
|
14944
14936
|
}).catch(function (err) {
|
|
14945
|
-
ElMessage.error(err.
|
|
14937
|
+
ElMessage.error(err.msg);
|
|
14946
14938
|
reject(err);
|
|
14947
14939
|
});
|
|
14948
14940
|
}
|
|
@@ -15022,7 +15014,6 @@ function useHelper(_ref) {
|
|
|
15022
15014
|
rowDelete: rowDelete,
|
|
15023
15015
|
rowClose: rowClose,
|
|
15024
15016
|
refresh: refresh,
|
|
15025
|
-
doExport: doExport,
|
|
15026
15017
|
rowDescription: rowDescription,
|
|
15027
15018
|
getPermission: getPermission,
|
|
15028
15019
|
paramsReplace: paramsReplace,
|
|
@@ -15154,7 +15145,8 @@ var Crud$1 = defineComponent({
|
|
|
15154
15145
|
update: "update",
|
|
15155
15146
|
delete: "delete",
|
|
15156
15147
|
info: "info",
|
|
15157
|
-
page: "page"
|
|
15148
|
+
page: "page",
|
|
15149
|
+
export: "export"
|
|
15158
15150
|
},
|
|
15159
15151
|
pagination: {
|
|
15160
15152
|
page: "page",
|
|
@@ -15175,7 +15167,7 @@ var Crud$1 = defineComponent({
|
|
|
15175
15167
|
update: "编辑",
|
|
15176
15168
|
refresh: "刷新",
|
|
15177
15169
|
advSearch: "高级搜索",
|
|
15178
|
-
|
|
15170
|
+
export: "导出"
|
|
15179
15171
|
}
|
|
15180
15172
|
},
|
|
15181
15173
|
// 权限
|
|
@@ -17511,7 +17503,11 @@ var RefreshBtn = defineComponent({
|
|
|
17511
17503
|
|
|
17512
17504
|
var ExportBtn = defineComponent({
|
|
17513
17505
|
name: "epie-export-btn",
|
|
17514
|
-
|
|
17506
|
+
props: {
|
|
17507
|
+
// 导出钩子
|
|
17508
|
+
onExport: Function
|
|
17509
|
+
},
|
|
17510
|
+
setup: function setup(props, _ref) {
|
|
17515
17511
|
var _crud$dict$label;
|
|
17516
17512
|
|
|
17517
17513
|
var slots = _ref.slots;
|
|
@@ -17520,15 +17516,96 @@ var ExportBtn = defineComponent({
|
|
|
17520
17516
|
crud = _useCore.crud;
|
|
17521
17517
|
|
|
17522
17518
|
var exportVisible = ref(false);
|
|
17523
|
-
var exportLoading = ref(false);
|
|
17519
|
+
var exportLoading = ref(false); // 根据字典替换请求参数
|
|
17520
|
+
|
|
17521
|
+
function paramsReplaceExport(params) {
|
|
17522
|
+
var _crud$dict = crud.dict,
|
|
17523
|
+
pagination = _crud$dict.pagination,
|
|
17524
|
+
search = _crud$dict.search,
|
|
17525
|
+
sort = _crud$dict.sort; // 请求参数
|
|
17526
|
+
|
|
17527
|
+
var a = _objectSpread2({}, params); // 字典
|
|
17528
|
+
|
|
17529
|
+
|
|
17530
|
+
var b = _objectSpread2(_objectSpread2(_objectSpread2({}, pagination), search), sort);
|
|
17531
|
+
|
|
17532
|
+
for (var i in b) {
|
|
17533
|
+
if (a[i]) {
|
|
17534
|
+
if (i != b[i]) {
|
|
17535
|
+
a["_".concat(b[i])] = a[i];
|
|
17536
|
+
delete a[i];
|
|
17537
|
+
}
|
|
17538
|
+
}
|
|
17539
|
+
}
|
|
17540
|
+
|
|
17541
|
+
for (var _i in a) {
|
|
17542
|
+
if (_i[0] === "_") {
|
|
17543
|
+
a[_i.substr(1)] = a[_i];
|
|
17544
|
+
delete a[_i];
|
|
17545
|
+
}
|
|
17546
|
+
}
|
|
17547
|
+
|
|
17548
|
+
return a;
|
|
17549
|
+
}
|
|
17524
17550
|
|
|
17525
17551
|
var onExport = function onExport() {
|
|
17526
|
-
|
|
17527
|
-
|
|
17528
|
-
|
|
17529
|
-
|
|
17530
|
-
|
|
17531
|
-
|
|
17552
|
+
return new Promise(function (r1) {
|
|
17553
|
+
exportLoading.value = true;
|
|
17554
|
+
|
|
17555
|
+
function done() {
|
|
17556
|
+
exportLoading.value = false;
|
|
17557
|
+
exportVisible.value = false;
|
|
17558
|
+
r1(true);
|
|
17559
|
+
}
|
|
17560
|
+
|
|
17561
|
+
function nextExport(res) {
|
|
17562
|
+
if (res && res.code === 0) {
|
|
17563
|
+
ElMessage({
|
|
17564
|
+
type: 'success',
|
|
17565
|
+
message: '导出成功'
|
|
17566
|
+
});
|
|
17567
|
+
window.open(res.data);
|
|
17568
|
+
} else {
|
|
17569
|
+
ElMessage({
|
|
17570
|
+
type: 'error',
|
|
17571
|
+
message: "\u5BFC\u51FA\u5931\u8D25 ".concat(res.msg)
|
|
17572
|
+
});
|
|
17573
|
+
}
|
|
17574
|
+
|
|
17575
|
+
done();
|
|
17576
|
+
}
|
|
17577
|
+
|
|
17578
|
+
function next() {
|
|
17579
|
+
return new Promise(function (resolve, reject) {
|
|
17580
|
+
var reqName = crud.dict.api["export"] || ""; // 验证请求
|
|
17581
|
+
|
|
17582
|
+
if (!crud.service[reqName]) {
|
|
17583
|
+
done();
|
|
17584
|
+
return reject("[\u914D\u7F6E] Service \u4E2D\u4E0D\u5B58\u5728 ".concat(reqName, " \u65B9\u6CD5"));
|
|
17585
|
+
}
|
|
17586
|
+
|
|
17587
|
+
var data = paramsReplaceExport(crud.getParams()); // 发送请求
|
|
17588
|
+
|
|
17589
|
+
crud.service[reqName](data).then(function (res) {
|
|
17590
|
+
if (props.onExport) {
|
|
17591
|
+
props.onExport(res, {
|
|
17592
|
+
done: done
|
|
17593
|
+
});
|
|
17594
|
+
} else {
|
|
17595
|
+
nextExport(res);
|
|
17596
|
+
resolve(res);
|
|
17597
|
+
}
|
|
17598
|
+
}).catch(function (err) {
|
|
17599
|
+
done();
|
|
17600
|
+
reject(err);
|
|
17601
|
+
});
|
|
17602
|
+
});
|
|
17603
|
+
}
|
|
17604
|
+
|
|
17605
|
+
next().catch(function (err) {
|
|
17606
|
+
ElMessage.error(err);
|
|
17607
|
+
});
|
|
17608
|
+
});
|
|
17532
17609
|
};
|
|
17533
17610
|
|
|
17534
17611
|
var hasPermission = crud.getPermission("export");
|
|
@@ -17537,7 +17614,7 @@ var ExportBtn = defineComponent({
|
|
|
17537
17614
|
exportVisible: exportVisible,
|
|
17538
17615
|
exportLoading: exportLoading,
|
|
17539
17616
|
onExport: onExport,
|
|
17540
|
-
label: (_crud$dict$label = crud.dict.label) === null || _crud$dict$label === void 0 ? void 0 : _crud$dict$label.
|
|
17617
|
+
label: (_crud$dict$label = crud.dict.label) === null || _crud$dict$label === void 0 ? void 0 : _crud$dict$label.export,
|
|
17541
17618
|
slots: slots
|
|
17542
17619
|
};
|
|
17543
17620
|
},
|
|
@@ -17552,7 +17629,7 @@ var ExportBtn = defineComponent({
|
|
|
17552
17629
|
visible: ctx.exportVisible
|
|
17553
17630
|
}, {
|
|
17554
17631
|
default: function _default() {
|
|
17555
|
-
return createVNode(Fragment, null, [createVNode("p", null, [createTextVNode("\u5373\u5C06\u6309\u7167\
|
|
17632
|
+
return createVNode(Fragment, null, [createVNode("p", null, [createTextVNode("\u5373\u5C06\u6309\u7167\u6700\u8FD1\u4E00\u6B21\u67E5\u8BE2\u6761\u4EF6\u5BFC\u51FA")]), createVNode("div", {
|
|
17556
17633
|
"style": "text-align: right; margin-top: 8px;"
|
|
17557
17634
|
}, [createVNode(resolveComponent("el-button"), {
|
|
17558
17635
|
"size": "small",
|
|
@@ -18743,7 +18820,7 @@ var Upsert = defineComponent({
|
|
|
18743
18820
|
crud.refresh();
|
|
18744
18821
|
resolve(res);
|
|
18745
18822
|
}).catch(function (err) {
|
|
18746
|
-
ElMessage.error(err.
|
|
18823
|
+
ElMessage.error(err.msg);
|
|
18747
18824
|
done();
|
|
18748
18825
|
reject(err);
|
|
18749
18826
|
});
|
|
@@ -18959,7 +19036,7 @@ var Upsert = defineComponent({
|
|
|
18959
19036
|
done(res.data);
|
|
18960
19037
|
resolve(res.data);
|
|
18961
19038
|
}).catch(function (err) {
|
|
18962
|
-
ElMessage.error(err.
|
|
19039
|
+
ElMessage.error(err.msg);
|
|
18963
19040
|
reject(err);
|
|
18964
19041
|
});
|
|
18965
19042
|
|
|
@@ -19455,8 +19532,7 @@ function useRender$1(ctx) {
|
|
|
19455
19532
|
e._hidden = Parse("hidden", {
|
|
19456
19533
|
value: e.hidden,
|
|
19457
19534
|
scope: ctx.form
|
|
19458
|
-
});
|
|
19459
|
-
console.log("children is ".concat(e)); // 隐藏
|
|
19535
|
+
}); // 隐藏
|
|
19460
19536
|
|
|
19461
19537
|
if (e._hidden) {
|
|
19462
19538
|
return null;
|
package/lib/bi-crud.umd.js
CHANGED
|
@@ -14827,7 +14827,7 @@
|
|
|
14827
14827
|
resolve(res);
|
|
14828
14828
|
done();
|
|
14829
14829
|
}).catch(function (err) {
|
|
14830
|
-
elementPlus.ElMessage.error(err.
|
|
14830
|
+
elementPlus.ElMessage.error(err.msg);
|
|
14831
14831
|
reject(err);
|
|
14832
14832
|
done();
|
|
14833
14833
|
});
|
|
@@ -14867,14 +14867,6 @@
|
|
|
14867
14867
|
mitt.emit("crud.proxy", {
|
|
14868
14868
|
name: "add"
|
|
14869
14869
|
});
|
|
14870
|
-
} // 导出当前结果
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
function doExport(callback) {
|
|
14874
|
-
mitt.emit("crud.proxy", {
|
|
14875
|
-
name: "export",
|
|
14876
|
-
callback: callback
|
|
14877
|
-
});
|
|
14878
14870
|
} // 打开编辑
|
|
14879
14871
|
|
|
14880
14872
|
|
|
@@ -14945,7 +14937,7 @@
|
|
|
14945
14937
|
elementPlus.ElMessage.success("删除成功");
|
|
14946
14938
|
resolve(res);
|
|
14947
14939
|
}).catch(function (err) {
|
|
14948
|
-
elementPlus.ElMessage.error(err.
|
|
14940
|
+
elementPlus.ElMessage.error(err.msg);
|
|
14949
14941
|
reject(err);
|
|
14950
14942
|
});
|
|
14951
14943
|
}
|
|
@@ -15025,7 +15017,6 @@
|
|
|
15025
15017
|
rowDelete: rowDelete,
|
|
15026
15018
|
rowClose: rowClose,
|
|
15027
15019
|
refresh: refresh,
|
|
15028
|
-
doExport: doExport,
|
|
15029
15020
|
rowDescription: rowDescription,
|
|
15030
15021
|
getPermission: getPermission,
|
|
15031
15022
|
paramsReplace: paramsReplace,
|
|
@@ -15157,7 +15148,8 @@
|
|
|
15157
15148
|
update: "update",
|
|
15158
15149
|
delete: "delete",
|
|
15159
15150
|
info: "info",
|
|
15160
|
-
page: "page"
|
|
15151
|
+
page: "page",
|
|
15152
|
+
export: "export"
|
|
15161
15153
|
},
|
|
15162
15154
|
pagination: {
|
|
15163
15155
|
page: "page",
|
|
@@ -15178,7 +15170,7 @@
|
|
|
15178
15170
|
update: "编辑",
|
|
15179
15171
|
refresh: "刷新",
|
|
15180
15172
|
advSearch: "高级搜索",
|
|
15181
|
-
|
|
15173
|
+
export: "导出"
|
|
15182
15174
|
}
|
|
15183
15175
|
},
|
|
15184
15176
|
// 权限
|
|
@@ -17514,7 +17506,11 @@
|
|
|
17514
17506
|
|
|
17515
17507
|
var ExportBtn = vue.defineComponent({
|
|
17516
17508
|
name: "epie-export-btn",
|
|
17517
|
-
|
|
17509
|
+
props: {
|
|
17510
|
+
// 导出钩子
|
|
17511
|
+
onExport: Function
|
|
17512
|
+
},
|
|
17513
|
+
setup: function setup(props, _ref) {
|
|
17518
17514
|
var _crud$dict$label;
|
|
17519
17515
|
|
|
17520
17516
|
var slots = _ref.slots;
|
|
@@ -17523,15 +17519,96 @@
|
|
|
17523
17519
|
crud = _useCore.crud;
|
|
17524
17520
|
|
|
17525
17521
|
var exportVisible = vue.ref(false);
|
|
17526
|
-
var exportLoading = vue.ref(false);
|
|
17522
|
+
var exportLoading = vue.ref(false); // 根据字典替换请求参数
|
|
17523
|
+
|
|
17524
|
+
function paramsReplaceExport(params) {
|
|
17525
|
+
var _crud$dict = crud.dict,
|
|
17526
|
+
pagination = _crud$dict.pagination,
|
|
17527
|
+
search = _crud$dict.search,
|
|
17528
|
+
sort = _crud$dict.sort; // 请求参数
|
|
17529
|
+
|
|
17530
|
+
var a = _objectSpread2({}, params); // 字典
|
|
17531
|
+
|
|
17532
|
+
|
|
17533
|
+
var b = _objectSpread2(_objectSpread2(_objectSpread2({}, pagination), search), sort);
|
|
17534
|
+
|
|
17535
|
+
for (var i in b) {
|
|
17536
|
+
if (a[i]) {
|
|
17537
|
+
if (i != b[i]) {
|
|
17538
|
+
a["_".concat(b[i])] = a[i];
|
|
17539
|
+
delete a[i];
|
|
17540
|
+
}
|
|
17541
|
+
}
|
|
17542
|
+
}
|
|
17543
|
+
|
|
17544
|
+
for (var _i in a) {
|
|
17545
|
+
if (_i[0] === "_") {
|
|
17546
|
+
a[_i.substr(1)] = a[_i];
|
|
17547
|
+
delete a[_i];
|
|
17548
|
+
}
|
|
17549
|
+
}
|
|
17550
|
+
|
|
17551
|
+
return a;
|
|
17552
|
+
}
|
|
17527
17553
|
|
|
17528
17554
|
var onExport = function onExport() {
|
|
17529
|
-
|
|
17530
|
-
|
|
17531
|
-
|
|
17532
|
-
|
|
17533
|
-
|
|
17534
|
-
|
|
17555
|
+
return new Promise(function (r1) {
|
|
17556
|
+
exportLoading.value = true;
|
|
17557
|
+
|
|
17558
|
+
function done() {
|
|
17559
|
+
exportLoading.value = false;
|
|
17560
|
+
exportVisible.value = false;
|
|
17561
|
+
r1(true);
|
|
17562
|
+
}
|
|
17563
|
+
|
|
17564
|
+
function nextExport(res) {
|
|
17565
|
+
if (res && res.code === 0) {
|
|
17566
|
+
elementPlus.ElMessage({
|
|
17567
|
+
type: 'success',
|
|
17568
|
+
message: '导出成功'
|
|
17569
|
+
});
|
|
17570
|
+
window.open(res.data);
|
|
17571
|
+
} else {
|
|
17572
|
+
elementPlus.ElMessage({
|
|
17573
|
+
type: 'error',
|
|
17574
|
+
message: "\u5BFC\u51FA\u5931\u8D25 ".concat(res.msg)
|
|
17575
|
+
});
|
|
17576
|
+
}
|
|
17577
|
+
|
|
17578
|
+
done();
|
|
17579
|
+
}
|
|
17580
|
+
|
|
17581
|
+
function next() {
|
|
17582
|
+
return new Promise(function (resolve, reject) {
|
|
17583
|
+
var reqName = crud.dict.api["export"] || ""; // 验证请求
|
|
17584
|
+
|
|
17585
|
+
if (!crud.service[reqName]) {
|
|
17586
|
+
done();
|
|
17587
|
+
return reject("[\u914D\u7F6E] Service \u4E2D\u4E0D\u5B58\u5728 ".concat(reqName, " \u65B9\u6CD5"));
|
|
17588
|
+
}
|
|
17589
|
+
|
|
17590
|
+
var data = paramsReplaceExport(crud.getParams()); // 发送请求
|
|
17591
|
+
|
|
17592
|
+
crud.service[reqName](data).then(function (res) {
|
|
17593
|
+
if (props.onExport) {
|
|
17594
|
+
props.onExport(res, {
|
|
17595
|
+
done: done
|
|
17596
|
+
});
|
|
17597
|
+
} else {
|
|
17598
|
+
nextExport(res);
|
|
17599
|
+
resolve(res);
|
|
17600
|
+
}
|
|
17601
|
+
}).catch(function (err) {
|
|
17602
|
+
done();
|
|
17603
|
+
reject(err);
|
|
17604
|
+
});
|
|
17605
|
+
});
|
|
17606
|
+
}
|
|
17607
|
+
|
|
17608
|
+
next().catch(function (err) {
|
|
17609
|
+
elementPlus.ElMessage.error(err);
|
|
17610
|
+
});
|
|
17611
|
+
});
|
|
17535
17612
|
};
|
|
17536
17613
|
|
|
17537
17614
|
var hasPermission = crud.getPermission("export");
|
|
@@ -17540,7 +17617,7 @@
|
|
|
17540
17617
|
exportVisible: exportVisible,
|
|
17541
17618
|
exportLoading: exportLoading,
|
|
17542
17619
|
onExport: onExport,
|
|
17543
|
-
label: (_crud$dict$label = crud.dict.label) === null || _crud$dict$label === void 0 ? void 0 : _crud$dict$label.
|
|
17620
|
+
label: (_crud$dict$label = crud.dict.label) === null || _crud$dict$label === void 0 ? void 0 : _crud$dict$label.export,
|
|
17544
17621
|
slots: slots
|
|
17545
17622
|
};
|
|
17546
17623
|
},
|
|
@@ -17555,7 +17632,7 @@
|
|
|
17555
17632
|
visible: ctx.exportVisible
|
|
17556
17633
|
}, {
|
|
17557
17634
|
default: function _default() {
|
|
17558
|
-
return vue.createVNode(vue.Fragment, null, [vue.createVNode("p", null, [vue.createTextVNode("\u5373\u5C06\u6309\u7167\
|
|
17635
|
+
return vue.createVNode(vue.Fragment, null, [vue.createVNode("p", null, [vue.createTextVNode("\u5373\u5C06\u6309\u7167\u6700\u8FD1\u4E00\u6B21\u67E5\u8BE2\u6761\u4EF6\u5BFC\u51FA")]), vue.createVNode("div", {
|
|
17559
17636
|
"style": "text-align: right; margin-top: 8px;"
|
|
17560
17637
|
}, [vue.createVNode(vue.resolveComponent("el-button"), {
|
|
17561
17638
|
"size": "small",
|
|
@@ -18746,7 +18823,7 @@
|
|
|
18746
18823
|
crud.refresh();
|
|
18747
18824
|
resolve(res);
|
|
18748
18825
|
}).catch(function (err) {
|
|
18749
|
-
elementPlus.ElMessage.error(err.
|
|
18826
|
+
elementPlus.ElMessage.error(err.msg);
|
|
18750
18827
|
done();
|
|
18751
18828
|
reject(err);
|
|
18752
18829
|
});
|
|
@@ -18962,7 +19039,7 @@
|
|
|
18962
19039
|
done(res.data);
|
|
18963
19040
|
resolve(res.data);
|
|
18964
19041
|
}).catch(function (err) {
|
|
18965
|
-
elementPlus.ElMessage.error(err.
|
|
19042
|
+
elementPlus.ElMessage.error(err.msg);
|
|
18966
19043
|
reject(err);
|
|
18967
19044
|
});
|
|
18968
19045
|
|
|
@@ -19458,8 +19535,7 @@
|
|
|
19458
19535
|
e._hidden = Parse("hidden", {
|
|
19459
19536
|
value: e.hidden,
|
|
19460
19537
|
scope: ctx.form
|
|
19461
|
-
});
|
|
19462
|
-
console.log("children is ".concat(e)); // 隐藏
|
|
19538
|
+
}); // 隐藏
|
|
19463
19539
|
|
|
19464
19540
|
if (e._hidden) {
|
|
19465
19541
|
return null;
|
|
@@ -9,7 +9,6 @@ export declare function useHelper({ mitt, props, crud }: any): {
|
|
|
9
9
|
rowDelete: (...selection: any[]) => void;
|
|
10
10
|
rowClose: () => void;
|
|
11
11
|
refresh: (params?: any) => Promise<unknown>;
|
|
12
|
-
doExport: (callback: Function) => void;
|
|
13
12
|
rowDescription: (data: any) => void;
|
|
14
13
|
getPermission: (key: "page" | "list" | "info" | "update" | "add" | "delete") => boolean;
|
|
15
14
|
paramsReplace: (params: any) => any;
|
|
@@ -28,6 +28,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
delete?: string | undefined;
|
|
29
29
|
info?: string | undefined;
|
|
30
30
|
page?: string | undefined;
|
|
31
|
+
export?: string | undefined;
|
|
31
32
|
} | undefined;
|
|
32
33
|
pagination?: {
|
|
33
34
|
page?: string | undefined;
|
|
@@ -48,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
49
|
update?: string | undefined;
|
|
49
50
|
refresh?: string | undefined;
|
|
50
51
|
advSearch?: string | undefined;
|
|
51
|
-
|
|
52
|
+
export?: string | undefined;
|
|
52
53
|
} | undefined;
|
|
53
54
|
};
|
|
54
55
|
service: {
|
|
@@ -77,7 +78,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
77
78
|
refresh: (params?: {
|
|
78
79
|
[key: string]: any;
|
|
79
80
|
page?: number | undefined;
|
|
80
|
-
|
|
81
|
+
pageSize?: number | undefined;
|
|
81
82
|
keyWord?: string | undefined;
|
|
82
83
|
} | undefined) => Promise<{
|
|
83
84
|
[key: string]: any;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
onExport: FunctionConstructor;
|
|
3
|
+
}, {
|
|
2
4
|
hasPermission: boolean;
|
|
3
5
|
exportVisible: import("vue").Ref<boolean>;
|
|
4
6
|
exportLoading: import("vue").Ref<boolean>;
|
|
5
|
-
onExport: () =>
|
|
7
|
+
onExport: () => Promise<unknown>;
|
|
6
8
|
label: string | undefined;
|
|
7
9
|
slots: Readonly<{
|
|
8
10
|
[name: string]: import("vue").Slot | undefined;
|
|
9
11
|
}>;
|
|
10
|
-
},
|
|
12
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
onExport: FunctionConstructor;
|
|
14
|
+
}>>, {}>;
|
|
11
15
|
export default _default;
|
package/lib/types/base/crud.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare namespace EpieCrud {
|
|
|
8
8
|
delete?: string;
|
|
9
9
|
info?: string;
|
|
10
10
|
page?: string;
|
|
11
|
+
export?: string;
|
|
11
12
|
};
|
|
12
13
|
pagination?: {
|
|
13
14
|
page?: string;
|
|
@@ -28,7 +29,7 @@ export declare namespace EpieCrud {
|
|
|
28
29
|
update?: string;
|
|
29
30
|
refresh?: string;
|
|
30
31
|
advSearch?: string;
|
|
31
|
-
|
|
32
|
+
export?: string | undefined;
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
interface Permission {
|
|
@@ -54,7 +55,7 @@ export declare namespace EpieCrud {
|
|
|
54
55
|
page: {
|
|
55
56
|
params: {
|
|
56
57
|
page?: number;
|
|
57
|
-
|
|
58
|
+
pageSize?: number;
|
|
58
59
|
keyWord?: string;
|
|
59
60
|
[key: string]: any;
|
|
60
61
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
1
2
|
import { fun, NSEpieContextMenu, Render } from ".";
|
|
2
3
|
import { EpieSchema } from "./base";
|
|
3
4
|
export declare type EpieDict = {
|
|
@@ -10,7 +11,7 @@ export declare type EpieDict = {
|
|
|
10
11
|
};
|
|
11
12
|
export declare type EpieColumn = EpieSchema<"table"> & {
|
|
12
13
|
type?: "index" | "selection" | "expand" | "op";
|
|
13
|
-
dict?: Array<EpieDict
|
|
14
|
+
dict?: Array<EpieDict> | Ref<Array<EpieDict>>;
|
|
14
15
|
buttons?: Array<"edit" | "delete" | Render.OpButton>;
|
|
15
16
|
align?: "left" | "center" | "right";
|
|
16
17
|
label?: string;
|
package/lib/utils/test.d.ts
CHANGED
|
@@ -20,4 +20,11 @@ export declare const TestService: {
|
|
|
20
20
|
add: (d: any) => Promise<void>;
|
|
21
21
|
delete: (d: any) => Promise<void>;
|
|
22
22
|
update: (d: any) => Promise<void>;
|
|
23
|
+
export: (d: any) => Promise<{
|
|
24
|
+
code: number;
|
|
25
|
+
msg: string;
|
|
26
|
+
}> | Promise<{
|
|
27
|
+
code: number;
|
|
28
|
+
data: string;
|
|
29
|
+
}>;
|
|
23
30
|
};
|