@vipl520/dk-ui 1.0.57 → 1.0.58
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 -16
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +4 -4
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +33 -16
- package/dist/web-types.json +1 -1
- package/es/table/index.d.ts +15 -0
- package/es/table/src/props.d.ts +4 -0
- package/es/table/src/props.mjs +6 -0
- package/es/table/src/props.mjs.map +1 -1
- package/es/table/src/table.vue.d.ts +9 -0
- package/es/table/src/table.vue2.mjs +1 -1
- package/es/table/src/table.vue2.mjs.map +1 -1
- package/es/table/utils/dkTable.d.ts +1 -1
- package/es/table/utils/dkTable.mjs +2 -2
- package/es/table/utils/dkTable.mjs.map +1 -1
- package/es/table/utils/dkTableApi.d.ts +3 -1
- package/es/table/utils/dkTableApi.mjs +21 -12
- package/es/table/utils/dkTableApi.mjs.map +1 -1
- package/es/url-input/src/url-input-table.vue2.mjs +3 -1
- package/es/url-input/src/url-input-table.vue2.mjs.map +1 -1
- package/lib/table/index.d.ts +15 -0
- package/lib/table/src/props.d.ts +4 -0
- package/lib/table/src/props.js +6 -0
- package/lib/table/src/props.js.map +1 -1
- package/lib/table/src/table.vue.d.ts +9 -0
- package/lib/table/src/table.vue2.js +1 -1
- package/lib/table/src/table.vue2.js.map +1 -1
- package/lib/table/utils/dkTable.d.ts +1 -1
- package/lib/table/utils/dkTable.js +2 -2
- package/lib/table/utils/dkTable.js.map +1 -1
- package/lib/table/utils/dkTableApi.d.ts +3 -1
- package/lib/table/utils/dkTableApi.js +21 -12
- package/lib/table/utils/dkTableApi.js.map +1 -1
- package/lib/url-input/src/url-input-table.vue2.js +3 -1
- package/lib/url-input/src/url-input-table.vue2.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15823,6 +15823,12 @@
|
|
|
15823
15823
|
return [];
|
|
15824
15824
|
},
|
|
15825
15825
|
type: Array
|
|
15826
|
+
},
|
|
15827
|
+
query: {
|
|
15828
|
+
default: () => {
|
|
15829
|
+
return {};
|
|
15830
|
+
},
|
|
15831
|
+
type: Object
|
|
15826
15832
|
}
|
|
15827
15833
|
};
|
|
15828
15834
|
|
|
@@ -18851,31 +18857,40 @@
|
|
|
18851
18857
|
actionUrl;
|
|
18852
18858
|
requestConfig = {};
|
|
18853
18859
|
// 新增:用于存储配置的request参数
|
|
18854
|
-
constructor(controllerUrl) {
|
|
18860
|
+
constructor(controllerUrl, query) {
|
|
18861
|
+
const qStr = this.objectToQuery(query);
|
|
18862
|
+
console.log("queryStr", qStr);
|
|
18855
18863
|
if (!controllerUrl.endsWith("/")) {
|
|
18856
18864
|
controllerUrl += "/";
|
|
18857
18865
|
}
|
|
18858
18866
|
this.controllerUrl = controllerUrl;
|
|
18859
18867
|
this.actionUrl = /* @__PURE__ */ new Map([
|
|
18860
|
-
["index", controllerUrl + "index"],
|
|
18861
|
-
["add", controllerUrl + "add"],
|
|
18862
|
-
["edit", controllerUrl + "edit"],
|
|
18863
|
-
["del", controllerUrl + "del"],
|
|
18864
|
-
["sortable", controllerUrl + "sortable"],
|
|
18865
|
-
["table", controllerUrl + "table"],
|
|
18868
|
+
["index", this.buildFullUrl(controllerUrl + "index", qStr)],
|
|
18869
|
+
["add", this.buildFullUrl(controllerUrl + "add", qStr)],
|
|
18870
|
+
["edit", this.buildFullUrl(controllerUrl + "edit", qStr)],
|
|
18871
|
+
["del", this.buildFullUrl(controllerUrl + "del", qStr)],
|
|
18872
|
+
["sortable", this.buildFullUrl(controllerUrl + "sortable", qStr)],
|
|
18873
|
+
["table", this.buildFullUrl(controllerUrl + "table", qStr)],
|
|
18866
18874
|
// 获取表格数据
|
|
18867
|
-
["form", controllerUrl + "form"],
|
|
18875
|
+
["form", this.buildFullUrl(controllerUrl + "form", qStr)],
|
|
18868
18876
|
// 获取表单
|
|
18869
|
-
["recycle", controllerUrl + "recycle"],
|
|
18877
|
+
["recycle", this.buildFullUrl(controllerUrl + "recycle", qStr)],
|
|
18870
18878
|
// 回收站
|
|
18871
|
-
["recycleTable", controllerUrl + "recycleTable"],
|
|
18879
|
+
["recycleTable", this.buildFullUrl(controllerUrl + "recycleTable", qStr)],
|
|
18872
18880
|
// 回收站表格
|
|
18873
|
-
["destroy", controllerUrl + "destroy"],
|
|
18881
|
+
["destroy", this.buildFullUrl(controllerUrl + "destroy", qStr)],
|
|
18874
18882
|
// 回收站销毁
|
|
18875
|
-
["restore", controllerUrl + "restore"]
|
|
18883
|
+
["restore", this.buildFullUrl(controllerUrl + "restore", qStr)]
|
|
18876
18884
|
// 回收站还原
|
|
18877
18885
|
]);
|
|
18878
18886
|
}
|
|
18887
|
+
// 新增方法用于构建完整的URL
|
|
18888
|
+
buildFullUrl(baseUrl, queryStr) {
|
|
18889
|
+
return queryStr ? `${baseUrl}?${queryStr}` : baseUrl;
|
|
18890
|
+
}
|
|
18891
|
+
objectToQuery(obj) {
|
|
18892
|
+
return Object.keys(obj).map((key) => encodeURIComponent(key) + "=" + encodeURIComponent(obj[key])).join("&");
|
|
18893
|
+
}
|
|
18879
18894
|
/**
|
|
18880
18895
|
* 配置request参数
|
|
18881
18896
|
* @param config 包含HTTP方法、请求头等额外参数的对象
|
|
@@ -19139,9 +19154,9 @@
|
|
|
19139
19154
|
form: {},
|
|
19140
19155
|
fieldData: /* @__PURE__ */ new Map()
|
|
19141
19156
|
});
|
|
19142
|
-
constructor(url, before = {}, after = {}) {
|
|
19157
|
+
constructor(url, before = {}, after = {}, query) {
|
|
19143
19158
|
this.url = url;
|
|
19144
|
-
this.api = new dkTableApi(url);
|
|
19159
|
+
this.api = new dkTableApi(url, query);
|
|
19145
19160
|
this.before = before;
|
|
19146
19161
|
this.after = after;
|
|
19147
19162
|
this.buttonCallback = (event, data) => {
|
|
@@ -23491,7 +23506,7 @@
|
|
|
23491
23506
|
const props = __props;
|
|
23492
23507
|
const FormRef = vue.ref();
|
|
23493
23508
|
const TableRef = vue.ref();
|
|
23494
|
-
const DkTable = new dkTable(props.tableApi, props.tableBefore, props.tableAfter);
|
|
23509
|
+
const DkTable = new dkTable(props.tableApi, props.tableBefore, props.tableAfter, props.query);
|
|
23495
23510
|
vue.provide("DkTable", DkTable);
|
|
23496
23511
|
vue.onMounted(() => {
|
|
23497
23512
|
DkTable.getTable(props.cacheTable)?.then(() => {
|
|
@@ -27094,7 +27109,9 @@
|
|
|
27094
27109
|
ref: DkTableRef,
|
|
27095
27110
|
"table-api": __props.item.tableUrl,
|
|
27096
27111
|
"cache-table": __props.item.cacheTable,
|
|
27097
|
-
height: "300px"
|
|
27112
|
+
height: "300px",
|
|
27113
|
+
query: { _form: "url_input" },
|
|
27114
|
+
buttons: ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay"]
|
|
27098
27115
|
}, {
|
|
27099
27116
|
cate_id_slot: vue.withCtx(({ row }) => [
|
|
27100
27117
|
vue.createTextVNode(
|