@vipl520/dk-ui 1.0.57 → 1.0.59

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/dist/index.js +39 -17
  2. package/dist/index.min.js +3 -3
  3. package/dist/index.min.js.map +1 -1
  4. package/dist/index.min.mjs +4 -4
  5. package/dist/index.min.mjs.map +1 -1
  6. package/dist/index.mjs +39 -17
  7. package/dist/web-types.json +1 -1
  8. package/es/group/index.d.ts +9 -0
  9. package/es/group/src/group.vue.d.ts +9 -0
  10. package/es/group/src/group.vue2.mjs +2 -1
  11. package/es/group/src/group.vue2.mjs.map +1 -1
  12. package/es/group/src/props.d.ts +4 -0
  13. package/es/group/src/props.mjs +4 -0
  14. package/es/group/src/props.mjs.map +1 -1
  15. package/es/table/index.d.ts +15 -0
  16. package/es/table/src/props.d.ts +4 -0
  17. package/es/table/src/props.mjs +6 -0
  18. package/es/table/src/props.mjs.map +1 -1
  19. package/es/table/src/table.vue.d.ts +9 -0
  20. package/es/table/src/table.vue2.mjs +1 -1
  21. package/es/table/src/table.vue2.mjs.map +1 -1
  22. package/es/table/utils/dkTable.d.ts +1 -1
  23. package/es/table/utils/dkTable.mjs +2 -2
  24. package/es/table/utils/dkTable.mjs.map +1 -1
  25. package/es/table/utils/dkTableApi.d.ts +3 -1
  26. package/es/table/utils/dkTableApi.mjs +21 -12
  27. package/es/table/utils/dkTableApi.mjs.map +1 -1
  28. package/es/url-input/src/url-input-table.vue2.mjs +3 -1
  29. package/es/url-input/src/url-input-table.vue2.mjs.map +1 -1
  30. package/lib/group/index.d.ts +9 -0
  31. package/lib/group/src/group.vue.d.ts +9 -0
  32. package/lib/group/src/group.vue2.js +2 -1
  33. package/lib/group/src/group.vue2.js.map +1 -1
  34. package/lib/group/src/props.d.ts +4 -0
  35. package/lib/group/src/props.js +4 -0
  36. package/lib/group/src/props.js.map +1 -1
  37. package/lib/table/index.d.ts +15 -0
  38. package/lib/table/src/props.d.ts +4 -0
  39. package/lib/table/src/props.js +6 -0
  40. package/lib/table/src/props.js.map +1 -1
  41. package/lib/table/src/table.vue.d.ts +9 -0
  42. package/lib/table/src/table.vue2.js +1 -1
  43. package/lib/table/src/table.vue2.js.map +1 -1
  44. package/lib/table/utils/dkTable.d.ts +1 -1
  45. package/lib/table/utils/dkTable.js +2 -2
  46. package/lib/table/utils/dkTable.js.map +1 -1
  47. package/lib/table/utils/dkTableApi.d.ts +3 -1
  48. package/lib/table/utils/dkTableApi.js +21 -12
  49. package/lib/table/utils/dkTableApi.js.map +1 -1
  50. package/lib/url-input/src/url-input-table.vue2.js +3 -1
  51. package/lib/url-input/src/url-input-table.vue2.js.map +1 -1
  52. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -973,6 +973,10 @@
973
973
  title: {
974
974
  default: "",
975
975
  type: String
976
+ },
977
+ accordion: {
978
+ type: Boolean,
979
+ default: true
976
980
  }
977
981
  };
978
982
 
@@ -997,7 +1001,8 @@
997
1001
  loading: true
998
1002
  });
999
1003
  const collapseComponentData = vue.reactive({
1000
- modelValue: [0]
1004
+ modelValue: [0],
1005
+ accordion: props.accordion
1001
1006
  });
1002
1007
  const Type = data.form;
1003
1008
  vue.watch(
@@ -15823,6 +15828,12 @@
15823
15828
  return [];
15824
15829
  },
15825
15830
  type: Array
15831
+ },
15832
+ query: {
15833
+ default: () => {
15834
+ return {};
15835
+ },
15836
+ type: Object
15826
15837
  }
15827
15838
  };
15828
15839
 
@@ -18851,31 +18862,40 @@
18851
18862
  actionUrl;
18852
18863
  requestConfig = {};
18853
18864
  // 新增:用于存储配置的request参数
18854
- constructor(controllerUrl) {
18865
+ constructor(controllerUrl, query) {
18866
+ const qStr = this.objectToQuery(query);
18867
+ console.log("queryStr", qStr);
18855
18868
  if (!controllerUrl.endsWith("/")) {
18856
18869
  controllerUrl += "/";
18857
18870
  }
18858
18871
  this.controllerUrl = controllerUrl;
18859
18872
  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"],
18873
+ ["index", this.buildFullUrl(controllerUrl + "index", qStr)],
18874
+ ["add", this.buildFullUrl(controllerUrl + "add", qStr)],
18875
+ ["edit", this.buildFullUrl(controllerUrl + "edit", qStr)],
18876
+ ["del", this.buildFullUrl(controllerUrl + "del", qStr)],
18877
+ ["sortable", this.buildFullUrl(controllerUrl + "sortable", qStr)],
18878
+ ["table", this.buildFullUrl(controllerUrl + "table", qStr)],
18866
18879
  // 获取表格数据
18867
- ["form", controllerUrl + "form"],
18880
+ ["form", this.buildFullUrl(controllerUrl + "form", qStr)],
18868
18881
  // 获取表单
18869
- ["recycle", controllerUrl + "recycle"],
18882
+ ["recycle", this.buildFullUrl(controllerUrl + "recycle", qStr)],
18870
18883
  // 回收站
18871
- ["recycleTable", controllerUrl + "recycleTable"],
18884
+ ["recycleTable", this.buildFullUrl(controllerUrl + "recycleTable", qStr)],
18872
18885
  // 回收站表格
18873
- ["destroy", controllerUrl + "destroy"],
18886
+ ["destroy", this.buildFullUrl(controllerUrl + "destroy", qStr)],
18874
18887
  // 回收站销毁
18875
- ["restore", controllerUrl + "restore"]
18888
+ ["restore", this.buildFullUrl(controllerUrl + "restore", qStr)]
18876
18889
  // 回收站还原
18877
18890
  ]);
18878
18891
  }
18892
+ // 新增方法用于构建完整的URL
18893
+ buildFullUrl(baseUrl, queryStr) {
18894
+ return queryStr ? `${baseUrl}?${queryStr}` : baseUrl;
18895
+ }
18896
+ objectToQuery(obj) {
18897
+ return Object.keys(obj).map((key) => encodeURIComponent(key) + "=" + encodeURIComponent(obj[key])).join("&");
18898
+ }
18879
18899
  /**
18880
18900
  * 配置request参数
18881
18901
  * @param config 包含HTTP方法、请求头等额外参数的对象
@@ -19139,9 +19159,9 @@
19139
19159
  form: {},
19140
19160
  fieldData: /* @__PURE__ */ new Map()
19141
19161
  });
19142
- constructor(url, before = {}, after = {}) {
19162
+ constructor(url, before = {}, after = {}, query) {
19143
19163
  this.url = url;
19144
- this.api = new dkTableApi(url);
19164
+ this.api = new dkTableApi(url, query);
19145
19165
  this.before = before;
19146
19166
  this.after = after;
19147
19167
  this.buttonCallback = (event, data) => {
@@ -23491,7 +23511,7 @@
23491
23511
  const props = __props;
23492
23512
  const FormRef = vue.ref();
23493
23513
  const TableRef = vue.ref();
23494
- const DkTable = new dkTable(props.tableApi, props.tableBefore, props.tableAfter);
23514
+ const DkTable = new dkTable(props.tableApi, props.tableBefore, props.tableAfter, props.query);
23495
23515
  vue.provide("DkTable", DkTable);
23496
23516
  vue.onMounted(() => {
23497
23517
  DkTable.getTable(props.cacheTable)?.then(() => {
@@ -27094,7 +27114,9 @@
27094
27114
  ref: DkTableRef,
27095
27115
  "table-api": __props.item.tableUrl,
27096
27116
  "cache-table": __props.item.cacheTable,
27097
- height: "300px"
27117
+ height: "300px",
27118
+ query: { _form: "url_input" },
27119
+ buttons: ["refresh", "add", "export_csv", "edit", "delete", "comSearch", "quickSearch", "columnDisplay"]
27098
27120
  }, {
27099
27121
  cate_id_slot: vue.withCtx(({ row }) => [
27100
27122
  vue.createTextVNode(