@vipl520/dk-ui 1.0.59 → 1.0.60
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/index.js +33 -18
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +33 -18
- package/dist/web-types.json +1 -1
- package/es/table/utils/dkTableApi.d.ts +2 -1
- package/es/table/utils/dkTableApi.mjs +33 -18
- package/es/table/utils/dkTableApi.mjs.map +1 -1
- package/lib/table/utils/dkTableApi.d.ts +2 -1
- package/lib/table/utils/dkTableApi.js +33 -18
- package/lib/table/utils/dkTableApi.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18860,34 +18860,49 @@
|
|
|
18860
18860
|
class dkTableApi {
|
|
18861
18861
|
controllerUrl;
|
|
18862
18862
|
actionUrl;
|
|
18863
|
+
query;
|
|
18863
18864
|
requestConfig = {};
|
|
18864
18865
|
// 新增:用于存储配置的request参数
|
|
18865
18866
|
constructor(controllerUrl, query) {
|
|
18866
|
-
|
|
18867
|
-
|
|
18867
|
+
let qStr = this.objectToQuery(query);
|
|
18868
|
+
if (controllerUrl.indexOf("?") > 0) {
|
|
18869
|
+
const path = controllerUrl.split("?");
|
|
18870
|
+
controllerUrl = path[0];
|
|
18871
|
+
qStr = qStr + "&" + path[1];
|
|
18872
|
+
}
|
|
18873
|
+
this.query = qStr;
|
|
18868
18874
|
if (!controllerUrl.endsWith("/")) {
|
|
18869
18875
|
controllerUrl += "/";
|
|
18870
18876
|
}
|
|
18871
18877
|
this.controllerUrl = controllerUrl;
|
|
18872
|
-
|
|
18873
|
-
|
|
18874
|
-
|
|
18875
|
-
|
|
18876
|
-
|
|
18877
|
-
|
|
18878
|
-
|
|
18879
|
-
|
|
18880
|
-
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
|
|
18884
|
-
|
|
18878
|
+
const actions = [
|
|
18879
|
+
"index",
|
|
18880
|
+
// 列表
|
|
18881
|
+
"add",
|
|
18882
|
+
// 新增
|
|
18883
|
+
"edit",
|
|
18884
|
+
// 编辑
|
|
18885
|
+
"del",
|
|
18886
|
+
// 删除
|
|
18887
|
+
"sortable",
|
|
18888
|
+
// 排序
|
|
18889
|
+
"table",
|
|
18890
|
+
// 表格数据
|
|
18891
|
+
"form",
|
|
18892
|
+
// 表单
|
|
18893
|
+
"recycle",
|
|
18894
|
+
// 回收站数据
|
|
18895
|
+
"recycleTable",
|
|
18885
18896
|
// 回收站表格
|
|
18886
|
-
|
|
18897
|
+
"destroy",
|
|
18887
18898
|
// 回收站销毁
|
|
18888
|
-
|
|
18899
|
+
"restore"
|
|
18889
18900
|
// 回收站还原
|
|
18890
|
-
]
|
|
18901
|
+
];
|
|
18902
|
+
this.actionUrl = /* @__PURE__ */ new Map();
|
|
18903
|
+
for (const action of actions) {
|
|
18904
|
+
this.actionUrl.set(action, this.buildFullUrl(`${controllerUrl}${action}`, qStr));
|
|
18905
|
+
}
|
|
18891
18906
|
}
|
|
18892
18907
|
// 新增方法用于构建完整的URL
|
|
18893
18908
|
buildFullUrl(baseUrl, queryStr) {
|