@vipl520/dk-ui 1.0.55 → 1.0.58

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/dist/index.js +54 -20
  2. package/dist/index.min.js +4 -4
  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 +54 -20
  7. package/dist/web-types.json +1 -1
  8. package/es/style-box-input/src/style-box-input.vue2.mjs +1 -1
  9. package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
  10. package/es/table/index.d.ts +15 -0
  11. package/es/table/src/props.d.ts +4 -0
  12. package/es/table/src/props.mjs +6 -0
  13. package/es/table/src/props.mjs.map +1 -1
  14. package/es/table/src/table.vue.d.ts +9 -0
  15. package/es/table/src/table.vue2.mjs +1 -1
  16. package/es/table/src/table.vue2.mjs.map +1 -1
  17. package/es/table/utils/dkTable.d.ts +1 -1
  18. package/es/table/utils/dkTable.mjs +2 -2
  19. package/es/table/utils/dkTable.mjs.map +1 -1
  20. package/es/table/utils/dkTableApi.d.ts +3 -1
  21. package/es/table/utils/dkTableApi.mjs +21 -12
  22. package/es/table/utils/dkTableApi.mjs.map +1 -1
  23. package/es/url-input/index.d.ts +3 -1
  24. package/es/url-input/src/url-input-content.vue2.mjs +11 -3
  25. package/es/url-input/src/url-input-content.vue2.mjs.map +1 -1
  26. package/es/url-input/src/url-input-table.vue2.mjs +3 -1
  27. package/es/url-input/src/url-input-table.vue2.mjs.map +1 -1
  28. package/es/url-input/src/url-input.vue.d.ts +3 -1
  29. package/es/url-input/src/url-input.vue2.mjs +11 -2
  30. package/es/url-input/src/url-input.vue2.mjs.map +1 -1
  31. package/lib/style-box-input/src/style-box-input.vue2.js +1 -1
  32. package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
  33. package/lib/table/index.d.ts +15 -0
  34. package/lib/table/src/props.d.ts +4 -0
  35. package/lib/table/src/props.js +6 -0
  36. package/lib/table/src/props.js.map +1 -1
  37. package/lib/table/src/table.vue.d.ts +9 -0
  38. package/lib/table/src/table.vue2.js +1 -1
  39. package/lib/table/src/table.vue2.js.map +1 -1
  40. package/lib/table/utils/dkTable.d.ts +1 -1
  41. package/lib/table/utils/dkTable.js +2 -2
  42. package/lib/table/utils/dkTable.js.map +1 -1
  43. package/lib/table/utils/dkTableApi.d.ts +3 -1
  44. package/lib/table/utils/dkTableApi.js +21 -12
  45. package/lib/table/utils/dkTableApi.js.map +1 -1
  46. package/lib/url-input/index.d.ts +3 -1
  47. package/lib/url-input/src/url-input-content.vue2.js +10 -2
  48. package/lib/url-input/src/url-input-content.vue2.js.map +1 -1
  49. package/lib/url-input/src/url-input-table.vue2.js +3 -1
  50. package/lib/url-input/src/url-input-table.vue2.js.map +1 -1
  51. package/lib/url-input/src/url-input.vue.d.ts +3 -1
  52. package/lib/url-input/src/url-input.vue2.js +10 -1
  53. package/lib/url-input/src/url-input.vue2.js.map +1 -1
  54. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5689,7 +5689,7 @@
5689
5689
  const height = vue.computed(() => {
5690
5690
  if (props.height === "auto") {
5691
5691
  const h = width.value / 1.8;
5692
- return h > 300 ? 300 : h;
5692
+ return h > 200 ? 200 : h;
5693
5693
  } else {
5694
5694
  return props.height;
5695
5695
  }
@@ -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(
@@ -27151,12 +27168,20 @@
27151
27168
  emits: ["submit"],
27152
27169
  setup(__props, { emit }) {
27153
27170
  const props = __props;
27171
+ const urlInputData = vue.inject("urlInputData", []);
27154
27172
  const _urlData = vue.computed(() => {
27155
27173
  console.log("urlData", props.urlData);
27156
27174
  if (props.urlData?.length > 0) {
27157
27175
  return props.urlData;
27158
27176
  } else {
27159
- return vue.inject("urlInputData", []);
27177
+ return urlInputData.urlData;
27178
+ }
27179
+ });
27180
+ const _jumpMinApp = vue.computed(() => {
27181
+ if (urlInputData.jumpMinApp !== void 0) {
27182
+ return urlInputData.jumpMinApp;
27183
+ } else {
27184
+ return props.jumpMinApp;
27160
27185
  }
27161
27186
  });
27162
27187
  const minapp = vue.reactive({
@@ -27292,7 +27317,7 @@
27292
27317
  vue.createVNode(_component_el_tab_pane, { label: "\u81EA\u5B9A\u4E49\u94FE\u63A5" }, {
27293
27318
  default: vue.withCtx(() => [
27294
27319
  vue.createElementVNode("div", _hoisted_12, [
27295
- __props.jumpMinApp ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
27320
+ _jumpMinApp.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
27296
27321
  vue.createVNode(_component_el_radio_group, {
27297
27322
  modelValue: urlType.value,
27298
27323
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => urlType.value = $event),
@@ -27428,16 +27453,25 @@
27428
27453
  var _sfc_main = /* @__PURE__ */ vue.defineComponent({
27429
27454
  ...__default__,
27430
27455
  props: urlInputProps,
27431
- emits: ["update:modelValue"],
27456
+ emits: ["input", "update:modelValue", "change"],
27432
27457
  setup(__props, { emit }) {
27433
27458
  const props = __props;
27434
27459
  const show = vue.ref(false);
27435
27460
  const url = vue.ref(props.modelValue);
27436
27461
  const updateUrl = (value) => {
27462
+ console.log("url", url);
27437
27463
  url.value = value;
27438
27464
  emit("update:modelValue", value);
27439
27465
  show.value = false;
27440
27466
  };
27467
+ vue.watch(
27468
+ () => url.value,
27469
+ (val) => {
27470
+ emit("update:modelValue", val);
27471
+ emit("input", val);
27472
+ emit("change", val);
27473
+ }
27474
+ );
27441
27475
  return (_ctx, _cache) => {
27442
27476
  const _component_el_button = vue.resolveComponent("el-button");
27443
27477
  const _component_el_input = vue.resolveComponent("el-input");