@gopowerteam/table-render 0.0.115 → 0.0.116
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/dist/cjs/index.cjs +3 -3
- package/dist/cjs/utils/sort.service.d.ts +2 -1
- package/dist/es/index.mjs +25 -24
- package/dist/es/utils/sort.service.d.ts +2 -1
- package/package.json +15 -15
|
@@ -3,7 +3,8 @@ import { RequestPlugin, RequestSendOptions } from '@gopowerteam/request';
|
|
|
3
3
|
|
|
4
4
|
export declare class SortService implements RequestPlugin, SortableOptions {
|
|
5
5
|
private sort;
|
|
6
|
-
|
|
6
|
+
private readonly defaultSort;
|
|
7
|
+
constructor(data?: Record<string, 'asc' | 'desc'>);
|
|
7
8
|
/**
|
|
8
9
|
* 更新排序
|
|
9
10
|
* @param key 排序关键字
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var mr = Object.defineProperty;
|
|
2
2
|
var br = (q, lt, s) => lt in q ? mr(q, lt, { enumerable: !0, configurable: !0, writable: !0, value: s }) : q[lt] = s;
|
|
3
|
-
var
|
|
3
|
+
var Re = (q, lt, s) => (br(q, typeof lt != "symbol" ? lt + "" : lt, s), s);
|
|
4
4
|
import { ref as we, getCurrentInstance as hr, onMounted as Je, onUpdated as gr, reactive as yr, createVNode as Ft, Fragment as Qe, createTextVNode as qe, h as vr, render as wr, defineComponent as Xe, isVNode as _r, mergeProps as fr, nextTick as ir, withDirectives as xr, resolveDirective as kr, computed as sr, readonly as Sr } from "vue";
|
|
5
5
|
import { Button as Be, Tag as Cr, Dropdown as ar, Descriptions as Mr, DescriptionsItem as Tr, Divider as Er, Space as or, Pagination as Ar, Transfer as Rr, Table as Or } from "@arco-design/web-vue";
|
|
6
6
|
import { useModal as Ye, onSubmit as jr, ModalProvider as Ir } from "@gopowerteam/modal-render";
|
|
@@ -48,13 +48,13 @@ class Ge {
|
|
|
48
48
|
* @param size
|
|
49
49
|
*/
|
|
50
50
|
constructor(lt = 1, s = 10) {
|
|
51
|
-
|
|
51
|
+
Re(this, "data", yr({
|
|
52
52
|
index: 1,
|
|
53
53
|
size: 10,
|
|
54
54
|
total: 0
|
|
55
55
|
}));
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
Re(this, "pageSizeOpts", [10, 20, 30, 40, 50]);
|
|
57
|
+
Re(this, "pageLayouts", ["PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "Sizes", "FullJump", "Total"]);
|
|
58
58
|
this.pageIndex = lt, this.pageSize = s;
|
|
59
59
|
}
|
|
60
60
|
get pageIndex() {
|
|
@@ -27125,8 +27125,8 @@ var pr = { exports: {} };
|
|
|
27125
27125
|
if (Fe)
|
|
27126
27126
|
return Fe == Qt;
|
|
27127
27127
|
ve |= 1, ke.set(ae, Qt);
|
|
27128
|
-
var
|
|
27129
|
-
return ke.delete(ae),
|
|
27128
|
+
var Ne = ce(Me(ae), Me(Qt), Ae, De, ve, ke);
|
|
27129
|
+
return ke.delete(ae), Ne;
|
|
27130
27130
|
case "[object Symbol]":
|
|
27131
27131
|
if (ct)
|
|
27132
27132
|
return ct.call(ae) == ct.call(Qt);
|
|
@@ -27134,18 +27134,18 @@ var pr = { exports: {} };
|
|
|
27134
27134
|
return !1;
|
|
27135
27135
|
}(bt, vt, ue, Gt, qt, Xt, Bt);
|
|
27136
27136
|
if (!(2 & Xt)) {
|
|
27137
|
-
var Ee = be && $.call(bt, "__wrapped__"),
|
|
27138
|
-
if (Ee ||
|
|
27139
|
-
var
|
|
27140
|
-
return Bt || (Bt = new Et()), Gt(
|
|
27137
|
+
var Ee = be && $.call(bt, "__wrapped__"), Oe = ge && $.call(vt, "__wrapped__");
|
|
27138
|
+
if (Ee || Oe) {
|
|
27139
|
+
var je = Ee ? bt.value() : bt, Ie = Oe ? vt.value() : vt;
|
|
27140
|
+
return Bt || (Bt = new Et()), Gt(je, Ie, qt, Xt, Bt);
|
|
27141
27141
|
}
|
|
27142
27142
|
}
|
|
27143
27143
|
return _e ? (Bt || (Bt = new Et()), function(ae, Qt, Ce, Ae, De, ve) {
|
|
27144
27144
|
var ke = 2 & De, Me = me(ae), Pe = Me.length, Fe = me(Qt).length;
|
|
27145
27145
|
if (Pe != Fe && !ke)
|
|
27146
27146
|
return !1;
|
|
27147
|
-
for (var
|
|
27148
|
-
var Te = Me[
|
|
27147
|
+
for (var Ne = Pe; Ne--; ) {
|
|
27148
|
+
var Te = Me[Ne];
|
|
27149
27149
|
if (!(ke ? Te in Qt : $.call(Qt, Te)))
|
|
27150
27150
|
return !1;
|
|
27151
27151
|
}
|
|
@@ -27154,8 +27154,8 @@ var pr = { exports: {} };
|
|
|
27154
27154
|
return rr == Qt;
|
|
27155
27155
|
var Le = !0;
|
|
27156
27156
|
ve.set(ae, Qt), ve.set(Qt, ae);
|
|
27157
|
-
for (var Ze = ke; ++
|
|
27158
|
-
Te = Me[
|
|
27157
|
+
for (var Ze = ke; ++Ne < Pe; ) {
|
|
27158
|
+
Te = Me[Ne];
|
|
27159
27159
|
var ze = ae[Te], Ue = Qt[Te];
|
|
27160
27160
|
if (Ae)
|
|
27161
27161
|
var nr = ke ? Ae(Ue, ze, Te, Qt, ae, ve) : Ae(ze, Ue, Te, ae, Qt, ve);
|
|
@@ -27597,18 +27597,18 @@ var pr = { exports: {} };
|
|
|
27597
27597
|
return _e == vt;
|
|
27598
27598
|
var Ee = !0;
|
|
27599
27599
|
Bt.set(bt, vt), Bt.set(vt, bt);
|
|
27600
|
-
for (var
|
|
27600
|
+
for (var Oe = ie; ++be < ue; ) {
|
|
27601
27601
|
ge = se[be];
|
|
27602
|
-
var
|
|
27602
|
+
var je = bt[ge], Ie = vt[ge];
|
|
27603
27603
|
if (qt)
|
|
27604
|
-
var ae = ie ? qt(
|
|
27605
|
-
if (!(ae === void 0 ?
|
|
27604
|
+
var ae = ie ? qt(Ie, je, ge, vt, bt, Bt) : qt(je, Ie, ge, bt, vt, Bt);
|
|
27605
|
+
if (!(ae === void 0 ? je === Ie || Xt(je, Ie, Gt, qt, Bt) : ae)) {
|
|
27606
27606
|
Ee = !1;
|
|
27607
27607
|
break;
|
|
27608
27608
|
}
|
|
27609
|
-
|
|
27609
|
+
Oe || (Oe = ge == "constructor");
|
|
27610
27610
|
}
|
|
27611
|
-
if (Ee && !
|
|
27611
|
+
if (Ee && !Oe) {
|
|
27612
27612
|
var Qt = bt.constructor, Ce = vt.constructor;
|
|
27613
27613
|
Qt == Ce || !("constructor" in bt) || !("constructor" in vt) || typeof Qt == "function" && Qt instanceof Qt && typeof Ce == "function" && Ce instanceof Ce || (Ee = !1);
|
|
27614
27614
|
}
|
|
@@ -33780,14 +33780,15 @@ function xn() {
|
|
|
33780
33780
|
}
|
|
33781
33781
|
class er {
|
|
33782
33782
|
constructor(lt) {
|
|
33783
|
-
|
|
33784
|
-
|
|
33783
|
+
Re(this, "sort", {});
|
|
33784
|
+
Re(this, "defaultSort", {});
|
|
33785
|
+
Re(this, "before", (lt) => {
|
|
33785
33786
|
lt.paramsQuery = {
|
|
33786
33787
|
...lt.paramsQuery || {},
|
|
33787
33788
|
sort: this.stringify(this.sort)
|
|
33788
33789
|
};
|
|
33789
33790
|
});
|
|
33790
|
-
lt && (this.sort = lt);
|
|
33791
|
+
lt && (this.sort = lt, this.defaultSort = lt);
|
|
33791
33792
|
}
|
|
33792
33793
|
/**
|
|
33793
33794
|
* 更新排序
|
|
@@ -33811,7 +33812,7 @@ class er {
|
|
|
33811
33812
|
* 重置分页数据
|
|
33812
33813
|
*/
|
|
33813
33814
|
reset() {
|
|
33814
|
-
this.sort = {};
|
|
33815
|
+
this.sort = this.defaultSort || {};
|
|
33815
33816
|
}
|
|
33816
33817
|
/**
|
|
33817
33818
|
* 转换排序对象为字符串
|
|
@@ -3,7 +3,8 @@ import { RequestPlugin, RequestSendOptions } from '@gopowerteam/request';
|
|
|
3
3
|
|
|
4
4
|
export declare class SortService implements RequestPlugin, SortableOptions {
|
|
5
5
|
private sort;
|
|
6
|
-
|
|
6
|
+
private readonly defaultSort;
|
|
7
|
+
constructor(data?: Record<string, 'asc' | 'desc'>);
|
|
7
8
|
/**
|
|
8
9
|
* 更新排序
|
|
9
10
|
* @param key 排序关键字
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gopowerteam/table-render",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.116",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "zhuchentong",
|
|
7
7
|
"email": "2037630@gmail.com"
|
|
@@ -15,14 +15,11 @@
|
|
|
15
15
|
"bugs": {
|
|
16
16
|
"url": "https://github.com/gopowerteam/x-render/issues"
|
|
17
17
|
},
|
|
18
|
-
"main": "./dist/cjs/index.cjs",
|
|
19
|
-
"module": "./dist/es/index.mjs",
|
|
20
|
-
"types": "./dist/es/index.d.ts",
|
|
21
18
|
"exports": {
|
|
22
19
|
".": {
|
|
23
20
|
"types": "./dist/es/index.d.ts",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
21
|
+
"require": "./dist/cjs/index.cjs",
|
|
22
|
+
"import": "./dist/es/index.mjs"
|
|
26
23
|
},
|
|
27
24
|
"./es": {
|
|
28
25
|
"types": "./dist/es/index.d.ts",
|
|
@@ -37,12 +34,15 @@
|
|
|
37
34
|
"import": "./dist/style.css"
|
|
38
35
|
},
|
|
39
36
|
"./resolver": {
|
|
37
|
+
"types": "./dist/es/resolver.d.ts",
|
|
40
38
|
"require": "./dist/cjs/resolver.cjs",
|
|
41
|
-
"import": "./dist/es/resolver.mjs"
|
|
42
|
-
"types": "./dist/es/resolver.d.ts"
|
|
39
|
+
"import": "./dist/es/resolver.mjs"
|
|
43
40
|
},
|
|
44
41
|
"./*": "./*"
|
|
45
42
|
},
|
|
43
|
+
"main": "./dist/cjs/index.cjs",
|
|
44
|
+
"module": "./dist/es/index.mjs",
|
|
45
|
+
"types": "./dist/es/index.d.ts",
|
|
46
46
|
"files": [
|
|
47
47
|
"dist",
|
|
48
48
|
"README.md"
|
|
@@ -54,16 +54,17 @@
|
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@arco-design/web-vue": "^2.52.1",
|
|
57
|
-
"@gopowerteam/form-render": "^0.0.
|
|
58
|
-
"@gopowerteam/modal-render": "^0.0.
|
|
57
|
+
"@gopowerteam/form-render": "^0.0.66",
|
|
58
|
+
"@gopowerteam/modal-render": "^0.0.42",
|
|
59
59
|
"vue": "^3.0.0"
|
|
60
60
|
},
|
|
61
|
+
"dependencies": {},
|
|
61
62
|
"devDependencies": {
|
|
62
|
-
"@gopowerteam/request": "latest",
|
|
63
63
|
"@arco-design/web-vue": "^2.55.1",
|
|
64
64
|
"@arco-plugins/vite-vue": "^1.4.5",
|
|
65
65
|
"@gopowerteam/form-render": "workspace:*",
|
|
66
66
|
"@gopowerteam/modal-render": "workspace:*",
|
|
67
|
+
"@gopowerteam/request": "latest",
|
|
67
68
|
"@iconify-json/icon-park-outline": "^1.1.15",
|
|
68
69
|
"@types/node": "18.16.0",
|
|
69
70
|
"@unocss/preset-icons": "^0.59.4",
|
|
@@ -72,18 +73,17 @@
|
|
|
72
73
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
73
74
|
"@vue/compiler-sfc": "3.4.23",
|
|
74
75
|
"@vueuse/core": "^10.9.0",
|
|
76
|
+
"exceljs": "^4.4.0",
|
|
75
77
|
"less": "^4.2.0",
|
|
76
78
|
"typescript": "5.4.5",
|
|
77
79
|
"unocss": "^0.59.4",
|
|
78
80
|
"vite": "5.2.10",
|
|
79
81
|
"vite-plugin-dts": "^3.8.3",
|
|
80
82
|
"vue": "3.4.23",
|
|
81
|
-
"vue-tsc": "2.0.14"
|
|
82
|
-
"exceljs": "^4.4.0"
|
|
83
|
+
"vue-tsc": "2.0.14"
|
|
83
84
|
},
|
|
84
85
|
"publishConfig": {
|
|
85
86
|
"registry": "https://registry.npmjs.org",
|
|
86
87
|
"access": "public"
|
|
87
|
-
}
|
|
88
|
-
"dependencies": {}
|
|
88
|
+
}
|
|
89
89
|
}
|