@vipl520/dk-ui 1.0.10 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +133 -104
  3. package/dist/index.min.js +6 -6
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/index.min.mjs +6 -6
  6. package/dist/index.min.mjs.map +1 -1
  7. package/dist/index.mjs +133 -104
  8. package/dist/web-types.json +1 -1
  9. package/es/api/attachment.mjs +10 -6
  10. package/es/api/attachment.mjs.map +1 -1
  11. package/es/attachment/src/attachment.vue2.mjs +7 -7
  12. package/es/attachment/src/attachment.vue2.mjs.map +1 -1
  13. package/es/dialog/index.d.ts +15 -0
  14. package/es/dialog/src/dialog.vue.d.ts +9 -0
  15. package/es/dialog/src/dialog.vue2.mjs +3 -2
  16. package/es/dialog/src/dialog.vue2.mjs.map +1 -1
  17. package/es/dialog/src/props.d.ts +4 -0
  18. package/es/dialog/src/props.mjs +4 -0
  19. package/es/dialog/src/props.mjs.map +1 -1
  20. package/es/file-input/style/index.css +1 -1
  21. package/es/file-input/style/index.scss +2 -0
  22. package/es/file-list-input/style/index.css +1 -1
  23. package/es/file-list-input/style/index.scss +1 -0
  24. package/es/form/index.d.ts +0 -3
  25. package/es/form/src/form.vue.d.ts +0 -2
  26. package/es/form/src/form.vue2.mjs +28 -40
  27. package/es/form/src/form.vue2.mjs.map +1 -1
  28. package/es/form/src/props.d.ts +0 -1
  29. package/es/form/src/props.mjs +2 -3
  30. package/es/form/src/props.mjs.map +1 -1
  31. package/es/form/style/index.css +1 -1
  32. package/es/form/style/index.scss +5 -0
  33. package/es/select/src/select.vue2.mjs +3 -3
  34. package/es/select/src/select.vue2.mjs.map +1 -1
  35. package/es/table/src/components/ComSearch.vue2.mjs +3 -1
  36. package/es/table/src/components/ComSearch.vue2.mjs.map +1 -1
  37. package/es/table/src/components/RecycleDialog.vue2.mjs +1 -2
  38. package/es/table/src/components/RecycleDialog.vue2.mjs.map +1 -1
  39. package/es/table/src/components/header.vue2.mjs +0 -1
  40. package/es/table/src/components/header.vue2.mjs.map +1 -1
  41. package/es/table/src/table.vue2.mjs +0 -4
  42. package/es/table/src/table.vue2.mjs.map +1 -1
  43. package/es/table/style/index.css +1 -1
  44. package/es/table/style/index.scss +0 -5
  45. package/es/table/utils/dkTableApi.mjs +66 -32
  46. package/es/table/utils/dkTableApi.mjs.map +1 -1
  47. package/lib/api/attachment.js +10 -6
  48. package/lib/api/attachment.js.map +1 -1
  49. package/lib/attachment/src/attachment.vue2.js +7 -7
  50. package/lib/attachment/src/attachment.vue2.js.map +1 -1
  51. package/lib/dialog/index.d.ts +15 -0
  52. package/lib/dialog/src/dialog.vue.d.ts +9 -0
  53. package/lib/dialog/src/dialog.vue2.js +3 -2
  54. package/lib/dialog/src/dialog.vue2.js.map +1 -1
  55. package/lib/dialog/src/props.d.ts +4 -0
  56. package/lib/dialog/src/props.js +4 -0
  57. package/lib/dialog/src/props.js.map +1 -1
  58. package/lib/file-input/style/index.css +1 -1
  59. package/lib/file-input/style/index.scss +2 -0
  60. package/lib/file-list-input/style/index.css +1 -1
  61. package/lib/file-list-input/style/index.scss +1 -0
  62. package/lib/form/index.d.ts +0 -3
  63. package/lib/form/src/form.vue.d.ts +0 -2
  64. package/lib/form/src/form.vue2.js +27 -39
  65. package/lib/form/src/form.vue2.js.map +1 -1
  66. package/lib/form/src/props.d.ts +0 -1
  67. package/lib/form/src/props.js +2 -3
  68. package/lib/form/src/props.js.map +1 -1
  69. package/lib/form/style/index.css +1 -1
  70. package/lib/form/style/index.scss +5 -0
  71. package/lib/select/src/select.vue2.js +3 -3
  72. package/lib/select/src/select.vue2.js.map +1 -1
  73. package/lib/table/src/components/ComSearch.vue2.js +3 -1
  74. package/lib/table/src/components/ComSearch.vue2.js.map +1 -1
  75. package/lib/table/src/components/RecycleDialog.vue2.js +1 -2
  76. package/lib/table/src/components/RecycleDialog.vue2.js.map +1 -1
  77. package/lib/table/src/components/header.vue2.js +0 -1
  78. package/lib/table/src/components/header.vue2.js.map +1 -1
  79. package/lib/table/src/table.vue2.js +0 -4
  80. package/lib/table/src/table.vue2.js.map +1 -1
  81. package/lib/table/style/index.css +1 -1
  82. package/lib/table/style/index.scss +0 -5
  83. package/lib/table/utils/dkTableApi.js +66 -32
  84. package/lib/table/utils/dkTableApi.js.map +1 -1
  85. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -174,13 +174,13 @@ function createNamespace(name) {
174
174
 
175
175
  const globalConfig = {
176
176
  // TODO 参数如果未填写自动获取
177
- ApiUrl: "https://independence.heiduoke.cn",
177
+ ApiUrl: "",
178
178
  // 默认的 API 地址
179
- AccessToken: "b5fe9c57-24fc-44da-b7f0-e655554c31d1",
179
+ AccessToken: "",
180
180
  // 用户登录后的 token
181
- Plaid: 16,
181
+ Plaid: 0,
182
182
  // 平台ID
183
- AddonName: "demo_wx",
183
+ AddonName: "",
184
184
  ProjectType: "addon"
185
185
  };
186
186
  function setGlobalConfig(newConfig) {
@@ -366,14 +366,14 @@ const request = (config, custom, loading) => {
366
366
  customOptions.code_error_show && ElMessage.error(res.msg);
367
367
  switch (code) {
368
368
  case -1:
369
- return Promise.reject(res);
370
369
  case 401:
371
- break;
370
+ case 402:
371
+ case 403:
372
+ return Promise.reject(res);
372
373
  default:
373
374
  return Promise.reject(response.data || { msg: "\u672A\u77E5\u9519\u8BEF" });
374
375
  }
375
376
  }
376
- return res;
377
377
  },
378
378
  (error) => {
379
379
  console.log("error", error);
@@ -10283,12 +10283,16 @@ function moveAttachment(ids, groupId) {
10283
10283
  });
10284
10284
  }
10285
10285
  function getAttachmentGroupList(type) {
10286
- console.log("typetypetype", type);
10287
- return request({
10288
- method: "get",
10289
- url: "/adminapi/attachment/group",
10290
- params: { type }
10291
- });
10286
+ return request(
10287
+ {
10288
+ method: "get",
10289
+ url: "/adminapi/attachment/group",
10290
+ params: { type }
10291
+ },
10292
+ {
10293
+ code_error_show: true
10294
+ }
10295
+ );
10292
10296
  }
10293
10297
  function delAttachmentGroup(id) {
10294
10298
  return request(
@@ -10711,6 +10715,10 @@ const dialogProps = {
10711
10715
  draggable: {
10712
10716
  type: Boolean,
10713
10717
  default: true
10718
+ },
10719
+ zIndex: {
10720
+ type: Number,
10721
+ default: 1299
10714
10722
  }
10715
10723
  };
10716
10724
 
@@ -10780,7 +10788,8 @@ var _sfc_main$V = /* @__PURE__ */ defineComponent({
10780
10788
  draggable: _ctx.draggable,
10781
10789
  "close-on-click-modal": false,
10782
10790
  "show-close": false,
10783
- class: "dk-dialog"
10791
+ class: "dk-dialog",
10792
+ "z-index": props.zIndex
10784
10793
  }), createSlots({
10785
10794
  header: withCtx(({ close }) => [
10786
10795
  renderSlot(_ctx.$slots, "header", {}, () => [
@@ -10833,7 +10842,7 @@ var _sfc_main$V = /* @__PURE__ */ defineComponent({
10833
10842
  ]),
10834
10843
  key: "0"
10835
10844
  } : void 0
10836
- ]), 1040, ["fullscreen", "draggable"]);
10845
+ ]), 1040, ["fullscreen", "draggable", "z-index"]);
10837
10846
  };
10838
10847
  }
10839
10848
  });
@@ -10861,7 +10870,7 @@ const formProps = {
10861
10870
  // 显示加载
10862
10871
  isLoading: { default: true, type: Boolean },
10863
10872
  // 默认高度
10864
- minHeight: { default: "300px", type: String },
10873
+ minHeight: { default: "100px", type: String },
10865
10874
  // 是否为弹窗
10866
10875
  isDialog: { default: false, type: Boolean },
10867
10876
  // 弹窗显示后获取formData
@@ -10872,8 +10881,7 @@ const formProps = {
10872
10881
  return {
10873
10882
  width: "800px",
10874
10883
  fullscreen: false,
10875
- minHeight: "200px",
10876
- draggable: true
10884
+ draggable: false
10877
10885
  };
10878
10886
  },
10879
10887
  type: Object
@@ -10985,56 +10993,48 @@ var _sfc_main$U = /* @__PURE__ */ defineComponent({
10985
10993
  );
10986
10994
  const dialogWidth = computed(() => {
10987
10995
  let defaultWidth = "800px";
10996
+ const config2 = _formData.value?.config || {};
10997
+ if (config2?.width) {
10998
+ return config2?.width;
10999
+ }
10988
11000
  if (props.dialog?.width) {
10989
11001
  defaultWidth = props.dialog?.width;
10990
11002
  }
10991
- if (_formData.value?.config?.width) {
10992
- defaultWidth = _formData.value?.config?.width;
11003
+ if (config2?.defaultWidth) {
11004
+ defaultWidth = config2?.defaultWidth;
10993
11005
  }
10994
- return width.value < 768 ? "100%" : defaultWidth;
10995
- });
10996
- const dialogStyle = computed(() => {
10997
- const style = {
10998
- minHeight: void 0,
10999
- maxHeight: void 0
11000
- };
11001
- if (props.dialog?.minHeight) {
11002
- style.minHeight = props.dialog?.minHeight;
11003
- }
11004
- if (props.dialog?.maxHeight) {
11005
- style.maxHeight = props.dialog?.maxHeight;
11006
- }
11007
- if (_formData.value?.config?.minHeight) {
11008
- style.minHeight = _formData.value?.config?.minHeight;
11006
+ let minWidth = 768;
11007
+ if (!defaultWidth.endsWith("%")) {
11008
+ minWidth = parseInt(defaultWidth);
11009
11009
  }
11010
- if (_formData.value?.config?.maxHeight) {
11011
- style.maxHeight = _formData.value?.config?.maxHeight;
11012
- }
11013
- return style;
11010
+ return width.value < minWidth ? "100%" : defaultWidth;
11014
11011
  });
11015
- const draggable = computed(() => {
11016
- let draggable2 = true;
11017
- if (props.dialog?.draggable) {
11018
- draggable2 = props.dialog?.draggable;
11012
+ const dialogStyle = computed(() => {
11013
+ if (_formData.value?.config?.style) {
11014
+ return _formData.value?.config?.style;
11019
11015
  }
11020
- if (_formData.value?.config?.draggable !== void 0) {
11021
- draggable2 = _formData.value?.config?.draggable;
11016
+ if (props.dialog?.style) {
11017
+ return props.dialog?.style;
11022
11018
  }
11023
- return draggable2;
11019
+ return {};
11024
11020
  });
11025
11021
  const isFullscreen = computed(() => {
11026
11022
  let defaultFullscreen = false;
11023
+ const autoFullscreen = _formData.value?.config?.autoFullscreen !== false;
11027
11024
  if (props.dialog?.width) {
11028
11025
  defaultFullscreen = props.dialog?.fullscreen;
11029
11026
  }
11030
11027
  if (_formData.value?.config?.fullscreen) {
11031
11028
  defaultFullscreen = _formData.value?.config?.fullscreen;
11032
11029
  }
11033
- if (width.value < 768) {
11030
+ if (width.value < 768 && autoFullscreen) {
11034
11031
  defaultFullscreen = true;
11035
11032
  }
11036
11033
  return defaultFullscreen;
11037
11034
  });
11035
+ const dialogProps = computed(() => {
11036
+ return Object.assign(props.dialog, _formData.value?.config?.dialog);
11037
+ });
11038
11038
  const setFormData = (formData) => {
11039
11039
  value.value = null;
11040
11040
  _formData.value = formData;
@@ -11060,7 +11060,6 @@ var _sfc_main$U = /* @__PURE__ */ defineComponent({
11060
11060
  loading.value = false;
11061
11061
  }).catch((res) => {
11062
11062
  loading.value = false;
11063
- console.error(res);
11064
11063
  });
11065
11064
  }
11066
11065
  };
@@ -11118,17 +11117,15 @@ var _sfc_main$U = /* @__PURE__ */ defineComponent({
11118
11117
  });
11119
11118
  return (_ctx, _cache) => {
11120
11119
  const _component_DkDialog = resolveComponent("DkDialog");
11121
- return props.isDialog ? (openBlock(), createBlock(_component_DkDialog, {
11120
+ return props.isDialog ? (openBlock(), createBlock(_component_DkDialog, mergeProps({
11122
11121
  key: 0,
11123
11122
  modelValue: showDialog.value,
11124
11123
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => showDialog.value = $event),
11125
11124
  title: _formData.value?.title ? _formData.value?.title : "\u8868\u5355",
11126
11125
  width: dialogWidth.value,
11127
11126
  "default-fullscreen": isFullscreen.value,
11128
- "min-height": "200px",
11129
- draggable: draggable.value,
11130
- "append-to-body": ""
11131
- }, {
11127
+ "min-height": "200px"
11128
+ }, dialogProps.value, { "append-to-body": "" }), {
11132
11129
  default: withCtx(() => [
11133
11130
  createElementVNode(
11134
11131
  "div",
@@ -11144,7 +11141,6 @@ var _sfc_main$U = /* @__PURE__ */ defineComponent({
11144
11141
  rule: _formData.value.rules,
11145
11142
  "handle-icon": false,
11146
11143
  class: "formBox",
11147
- style: { "padding": "10px" },
11148
11144
  "onUpdate:api": _cache[1] || (_cache[1] = ($event) => fApi.value = $event),
11149
11145
  "onUpdate:value": _cache[2] || (_cache[2] = ($event) => value.value = $event)
11150
11146
  }, null, 8, ["modelValue", "option", "rule"]),
@@ -11162,7 +11158,7 @@ var _sfc_main$U = /* @__PURE__ */ defineComponent({
11162
11158
  onClick: checkForm
11163
11159
  }, {
11164
11160
  default: withCtx(() => [
11165
- createTextVNode(" \u63D0\u4EA4 ")
11161
+ createTextVNode(" \u63D0\u4EA4")
11166
11162
  ]),
11167
11163
  _: 1
11168
11164
  /* STABLE */
@@ -11179,7 +11175,7 @@ var _sfc_main$U = /* @__PURE__ */ defineComponent({
11179
11175
  ]),
11180
11176
  _: 3
11181
11177
  /* FORWARDED */
11182
- }, 8, ["modelValue", "title", "width", "default-fullscreen", "draggable"])) : (openBlock(), createElementBlock("div", _hoisted_1$F, [
11178
+ }, 16, ["modelValue", "title", "width", "default-fullscreen"])) : (openBlock(), createElementBlock("div", _hoisted_1$F, [
11183
11179
  createElementVNode(
11184
11180
  "div",
11185
11181
  {
@@ -11211,7 +11207,7 @@ var _sfc_main$U = /* @__PURE__ */ defineComponent({
11211
11207
  onClick: checkForm
11212
11208
  }, {
11213
11209
  default: withCtx(() => [
11214
- createTextVNode(" \u63D0\u4EA4 ")
11210
+ createTextVNode(" \u63D0\u4EA4")
11215
11211
  ]),
11216
11212
  _: 1
11217
11213
  /* STABLE */
@@ -11504,10 +11500,10 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
11504
11500
  const chooseFileList = ref([]);
11505
11501
  const chooseFileId = ref([]);
11506
11502
  const globalConfig = getGlobalConfig();
11507
- const uploadUrl = ref(globalConfig.ApiUrl);
11508
- const headers = ref({
11503
+ const uploadUrl = globalConfig.ApiUrl + "/adminapi/attachment/upload";
11504
+ const headers = {
11509
11505
  "Access-Token": globalConfig.AccessToken
11510
- });
11506
+ };
11511
11507
  const upload = ref();
11512
11508
  const data = reactive({
11513
11509
  type: _type.value,
@@ -11521,6 +11517,7 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
11521
11517
  });
11522
11518
  };
11523
11519
  const handleUploadSuccess = (res) => {
11520
+ console.log("res", res);
11524
11521
  if (res.code === 0) {
11525
11522
  ElMessage.success(res.msg);
11526
11523
  onGetAttachmentList();
@@ -11644,7 +11641,6 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
11644
11641
  count.value = res.msg;
11645
11642
  loading.value = false;
11646
11643
  } catch (e) {
11647
- console.log(e);
11648
11644
  }
11649
11645
  };
11650
11646
  const clearChoose = () => {
@@ -11776,11 +11772,11 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
11776
11772
  ref_key: "upload",
11777
11773
  ref: upload,
11778
11774
  class: "dk-upload-button",
11779
- action: uploadUrl.value,
11775
+ action: uploadUrl,
11780
11776
  multiple: "",
11781
11777
  data,
11782
11778
  "show-file-list": false,
11783
- headers: headers.value,
11779
+ headers,
11784
11780
  "on-success": handleUploadSuccess,
11785
11781
  accept: _accept.value,
11786
11782
  "list-type": "text"
@@ -11797,7 +11793,7 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
11797
11793
  ]),
11798
11794
  _: 1
11799
11795
  /* STABLE */
11800
- }, 8, ["action", "data", "headers", "accept"])
11796
+ }, 8, ["data", "accept"])
11801
11797
  ])
11802
11798
  ]),
11803
11799
  createCommentVNode("\u5185\u90E8"),
@@ -26263,62 +26259,92 @@ class dkTableApi {
26263
26259
  * 获取表格配置
26264
26260
  */
26265
26261
  table() {
26266
- return request({
26267
- url: this.actionUrl.get("table"),
26268
- method: "post"
26269
- });
26262
+ return request(
26263
+ {
26264
+ url: this.actionUrl.get("table"),
26265
+ method: "post"
26266
+ },
26267
+ {
26268
+ code_error_show: true
26269
+ }
26270
+ );
26270
26271
  }
26271
26272
  /**
26272
26273
  * 获取表格配置
26273
26274
  */
26274
26275
  recycleTable() {
26275
- return request({
26276
- url: this.actionUrl.get("recycleTable"),
26277
- method: "post"
26278
- });
26276
+ return request(
26277
+ {
26278
+ url: this.actionUrl.get("recycleTable"),
26279
+ method: "post"
26280
+ },
26281
+ {
26282
+ code_error_show: true
26283
+ }
26284
+ );
26279
26285
  }
26280
26286
  /**
26281
26287
  * 获取表单
26282
26288
  */
26283
26289
  form(id) {
26284
- return request({
26285
- url: this.actionUrl.get("form"),
26286
- method: "post",
26287
- data: { id }
26288
- });
26290
+ return request(
26291
+ {
26292
+ url: this.actionUrl.get("form"),
26293
+ method: "post",
26294
+ data: { id }
26295
+ },
26296
+ {
26297
+ code_error_show: true
26298
+ }
26299
+ );
26289
26300
  }
26290
26301
  /**
26291
26302
  * 获取表格列表
26292
26303
  * @param filter
26293
26304
  */
26294
26305
  index(filter = {}) {
26295
- return request({
26296
- url: this.actionUrl.get("index"),
26297
- method: "get",
26298
- params: filter
26299
- });
26306
+ return request(
26307
+ {
26308
+ url: this.actionUrl.get("index"),
26309
+ method: "get",
26310
+ params: filter
26311
+ },
26312
+ {
26313
+ code_error_show: true
26314
+ }
26315
+ );
26300
26316
  }
26301
26317
  /**
26302
26318
  * 回收站列表
26303
26319
  * @param filter
26304
26320
  */
26305
26321
  recycle(filter = {}) {
26306
- return request({
26307
- url: this.actionUrl.get("recycle"),
26308
- method: "get",
26309
- params: filter
26310
- });
26322
+ return request(
26323
+ {
26324
+ url: this.actionUrl.get("recycle"),
26325
+ method: "get",
26326
+ params: filter
26327
+ },
26328
+ {
26329
+ code_error_show: true
26330
+ }
26331
+ );
26311
26332
  }
26312
26333
  /**
26313
26334
  * 编辑
26314
26335
  * @param params
26315
26336
  */
26316
26337
  edit(params) {
26317
- return request({
26318
- url: this.actionUrl.get("edit"),
26319
- method: "get",
26320
- params
26321
- });
26338
+ return request(
26339
+ {
26340
+ url: this.actionUrl.get("edit"),
26341
+ method: "get",
26342
+ params
26343
+ },
26344
+ {
26345
+ code_error_show: true
26346
+ }
26347
+ );
26322
26348
  }
26323
26349
  /**
26324
26350
  * 删除
@@ -26334,7 +26360,8 @@ class dkTableApi {
26334
26360
  }
26335
26361
  },
26336
26362
  {
26337
- code_success_show: true
26363
+ code_success_show: true,
26364
+ code_error_show: true
26338
26365
  }
26339
26366
  );
26340
26367
  }
@@ -26352,7 +26379,8 @@ class dkTableApi {
26352
26379
  }
26353
26380
  },
26354
26381
  {
26355
- code_success_show: true
26382
+ code_success_show: true,
26383
+ code_error_show: true
26356
26384
  }
26357
26385
  );
26358
26386
  }
@@ -26370,7 +26398,8 @@ class dkTableApi {
26370
26398
  }
26371
26399
  },
26372
26400
  {
26373
- code_success_show: true
26401
+ code_success_show: true,
26402
+ code_error_show: true
26374
26403
  }
26375
26404
  );
26376
26405
  }
@@ -26387,7 +26416,8 @@ class dkTableApi {
26387
26416
  data
26388
26417
  },
26389
26418
  {
26390
- code_success_show: true
26419
+ code_success_show: true,
26420
+ code_error_show: true
26391
26421
  }
26392
26422
  );
26393
26423
  }
@@ -28193,8 +28223,10 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
28193
28223
  createVNode(_component_dk_select, {
28194
28224
  modelValue: unref(DkTable).comSearch.form[item.prop],
28195
28225
  "onUpdate:modelValue": ($event) => unref(DkTable).comSearch.form[item.prop] = $event,
28226
+ filterable: "",
28227
+ placeholder: item.operatorPlaceholder,
28196
28228
  "remote-url": item.remoteUrl
28197
- }, null, 8, ["modelValue", "onUpdate:modelValue", "remote-url"])
28229
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "remote-url"])
28198
28230
  ],
28199
28231
  2112
28200
28232
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
@@ -28399,7 +28431,6 @@ var _sfc_main$c = /* @__PURE__ */ defineComponent({
28399
28431
  }
28400
28432
  item.type === "selection" || item.render === "buttons" || item.enableColumnDisplayControl === false ? "" : columnDisplayArr.push(item);
28401
28433
  }
28402
- console.log("columnDisplayArr", columnDisplayArr);
28403
28434
  return columnDisplayArr;
28404
28435
  });
28405
28436
  const enableBatchOpt = computed(() => DkTable.table.selection.length > 0);
@@ -29397,7 +29428,6 @@ var _sfc_main$a = /* @__PURE__ */ defineComponent({
29397
29428
  onSelectionChange
29398
29429
  }, {
29399
29430
  default: withCtx(() => [
29400
- createCommentVNode(' <template v-for="(item, key) in DkTable.recycleTable.column">'),
29401
29431
  (openBlock(true), createElementBlock(
29402
29432
  Fragment,
29403
29433
  null,
@@ -29416,7 +29446,7 @@ var _sfc_main$a = /* @__PURE__ */ defineComponent({
29416
29446
  createCommentVNode(" </template>"),
29417
29447
  createVNode(_component_el_table_column, {
29418
29448
  label: "\u64CD\u4F5C",
29419
- width: "100"
29449
+ align: "right"
29420
29450
  }, {
29421
29451
  default: withCtx(({ row }) => [
29422
29452
  createVNode(_component_el_button, {
@@ -29490,7 +29520,6 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
29490
29520
  DkTable.table.ref = TableRef.value;
29491
29521
  DkTable.form.ref = FormRef.value;
29492
29522
  });
29493
- ref(false);
29494
29523
  const onTableSizeChange = (val) => {
29495
29524
  DkTable.onTableAction("page-size-change", { size: val });
29496
29525
  };
@@ -30050,10 +30079,10 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
30050
30079
  emits: ["update:modelValue", "change", "visible-change", "remove-tag", "clear", "blur", "focus"],
30051
30080
  setup(__props, { emit }) {
30052
30081
  const props = __props;
30053
- console.log("options", props.placeholder);
30054
30082
  const internalValue = ref(props.modelValue);
30055
- const internalOptions = ref(props.options || []);
30083
+ const internalOptions = ref(props.options || {});
30056
30084
  watch(internalValue, (newValue) => {
30085
+ console.log("new", newValue);
30057
30086
  emit("update:modelValue", newValue);
30058
30087
  });
30059
30088
  const remoteMethod = (query) => {
@@ -30088,7 +30117,7 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
30088
30117
  }, { ...props }, {
30089
30118
  "remote-method": remoteMethod,
30090
30119
  remote: "",
30091
- placeholder: "\u8BF7\u9009\u62E9",
30120
+ placeholder: "c\u6D4B\u8BD5",
30092
30121
  options: internalOptions.value,
30093
30122
  style: { "width": "100%" },
30094
30123
  onChange: handleChange,
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "dk",
5
- "version": "1.0.9",
5
+ "version": "1.0.11",
6
6
  "js-types-syntax": "typescript",
7
7
  "description-markup": "markdown",
8
8
  "contributions": {
@@ -47,12 +47,16 @@ function moveAttachment(ids, groupId) {
47
47
  });
48
48
  }
49
49
  function getAttachmentGroupList(type) {
50
- console.log("typetypetype", type);
51
- return request({
52
- method: "get",
53
- url: "/adminapi/attachment/group",
54
- params: { type }
55
- });
50
+ return request(
51
+ {
52
+ method: "get",
53
+ url: "/adminapi/attachment/group",
54
+ params: { type }
55
+ },
56
+ {
57
+ code_error_show: true
58
+ }
59
+ );
56
60
  }
57
61
  function getAttachmentGroupForm(id) {
58
62
  if (id) {
@@ -1 +1 @@
1
- {"version":3,"file":"attachment.mjs","sources":["../../src/api/attachment.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\n/** ************************************************************** 附件 ***************************************************************/\n\n// 获取附件列表\nexport function getAttachmentList(\n page: number,\n size: number,\n type: number = 1,\n groupId: number,\n search: any\n) {\n search.group_id = groupId\n search.type = type\n return request({\n method: 'post',\n url: '/adminapi/attachment/list',\n data: { page, size, search },\n })\n}\n\n// 上传附件\n// export function UploadAttachment(page, size, type = 1, groupId, search) {\n// return request({\n// method: 'post',\n// url: '/adminapi/attachment/upload',\n// data: { page, size, type, groupId, search }\n// })\n// }\n\n// 上传附件\nexport function UploadAttachment(file: any, type = 1, groupId = 0) {\n const formData = new FormData()\n formData.append('file', file)\n formData.append('type', type.toString())\n formData.append('file', 'file')\n formData.append('group_id', groupId.toString())\n return request({\n method: 'post',\n url: '/adminapi/attachment/upload',\n data: formData,\n })\n}\n\n// 获取编辑表单\nexport function getAttachmentEdit(id: number) {\n return request({\n method: 'get',\n url: '/adminapi/attachment/index/' + id + '/edit',\n })\n}\n\nexport function deleteAttachment(ids: number[]) {\n return request(\n {\n method: 'post',\n url: '/adminapi/attachment/delete',\n data: { ids },\n },\n {\n code_success_show: true,\n }\n )\n}\n\nexport function moveAttachment(ids: number[], groupId: number) {\n return request({\n method: 'post',\n url: '/adminapi/attachment/move',\n data: { ids, group_id: groupId },\n })\n}\n\n/** ************************************************************** 附件分组 ***************************************************************/\n\n// 获取附件分组\nexport function getAttachmentGroupList(type: number) {\n console.log('typetypetype', type)\n return request({\n method: 'get',\n url: '/adminapi/attachment/group',\n params: { type },\n })\n}\n\n// 获取表单\nexport function getAttachmentGroupForm(id: number) {\n if (id) {\n return request({\n method: 'get',\n url: '/adminapi/attachment/group/' + id + '/edit',\n })\n } else {\n return request({\n method: 'get',\n url: '/adminapi/attachment/group/create',\n })\n }\n}\n\n// 删除分组\nexport function delAttachmentGroup(id: number) {\n return request(\n {\n method: 'delete',\n url: '/adminapi/attachment/group/' + id,\n },\n {\n code_error_show: true,\n }\n )\n}\n"],"names":[],"mappings":";;AAKO,SAAS,kBACd,IACA,EAAA,IAAA,EACA,IAAe,GAAA,CAAA,EACf,SACA,MACA,EAAA;AACA,EAAA,MAAA,CAAO,QAAW,GAAA,OAAA,CAAA;AAClB,EAAA,MAAA,CAAO,IAAO,GAAA,IAAA,CAAA;AACd,EAAA,OAAO,OAAQ,CAAA;AAAA,IACb,MAAQ,EAAA,MAAA;AAAA,IACR,GAAK,EAAA,2BAAA;AAAA,IACL,IAAM,EAAA,EAAE,IAAM,EAAA,IAAA,EAAM,MAAO,EAAA;AAAA,GAC5B,CAAA,CAAA;AACH,CAAA;AAYO,SAAS,gBAAiB,CAAA,IAAA,EAAW,IAAO,GAAA,CAAA,EAAG,UAAU,CAAG,EAAA;AACjE,EAAM,MAAA,QAAA,GAAW,IAAI,QAAS,EAAA,CAAA;AAC9B,EAAS,QAAA,CAAA,MAAA,CAAO,QAAQ,IAAI,CAAA,CAAA;AAC5B,EAAA,QAAA,CAAS,MAAO,CAAA,MAAA,EAAQ,IAAK,CAAA,QAAA,EAAU,CAAA,CAAA;AACvC,EAAS,QAAA,CAAA,MAAA,CAAO,QAAQ,MAAM,CAAA,CAAA;AAC9B,EAAA,Q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AA;AACN,IAAA,OAAO,OAAQ,CAAA;AAAA,MACb,MAAQ,EAAA,KAAA;AAAA,MACR,GAAA,EAAK,gCAAgC,EAAK,GAAA,OAAA;AAAA,KAC3C,CAAA,CAAA;AAAA,GACI,MAAA;AACL,IAAA,OAAO,OAAQ,CAAA;AAAA,MACb,MAAQ,EAAA,KAAA;AAAA,MACR,GAAK,EAAA,mCAAA;AAAA,KACN,CAAA,CAAA;AAAA,GACH;AACF,CAAA;AAGO,SAAS,mBAAmB,EAAY,EAAA;AAC7C,EAAO,OAAA,OAAA;AAAA,IACL;AAAA,MACE,MAAQ,EAAA,QAAA;AAAA,MACR,KAAK,6BAAgC,GAAA,EAAA;AAAA,KACvC;AAAA,IACA;AAAA,MACE,eAAiB,EAAA,IAAA;AAAA,KACnB;AAAA,GACF,CAAA;AACF;;;;"}
1
+ {"version":3,"file":"attachment.mjs","sources":["../../src/api/attachment.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\n/** ************************************************************** 附件 ***************************************************************/\n\n// 获取附件列表\nexport function getAttachmentList(page: number, size: number, type: number = 1, groupId: number, search: any) {\n search.group_id = groupId\n search.type = type\n return request({\n method: 'post',\n url: '/adminapi/attachment/list',\n data: { page, size, search },\n })\n}\n\n// 上传附件\n// export function UploadAttachment(page, size, type = 1, groupId, search) {\n// return request({\n// method: 'post',\n// url: '/adminapi/attachment/upload',\n// data: { page, size, type, groupId, search }\n// })\n// }\n\n// 上传附件\nexport function UploadAttachment(file: any, type = 1, groupId = 0) {\n const formData = new FormData()\n formData.append('file', file)\n formData.append('type', type.toString())\n formData.append('file', 'file')\n formData.append('group_id', groupId.toString())\n return request({\n method: 'post',\n url: '/adminapi/attachment/upload',\n data: formData,\n })\n}\n\n// 获取编辑表单\nexport function getAttachmentEdit(id: number) {\n return request({\n method: 'get',\n url: '/adminapi/attachment/index/' + id + '/edit',\n })\n}\n\nexport function deleteAttachment(ids: number[]) {\n return request(\n {\n method: 'post',\n url: '/adminapi/attachment/delete',\n data: { ids },\n },\n {\n code_success_show: true,\n }\n )\n}\n\nexport function moveAttachment(ids: number[], groupId: number) {\n return request({\n method: 'post',\n url: '/adminapi/attachment/move',\n data: { ids, group_id: groupId },\n })\n}\n\n/** ************************************************************** 附件分组 ***************************************************************/\n\n// 获取附件分组\nexport function getAttachmentGroupList(type: number) {\n return request(\n {\n method: 'get',\n url: '/adminapi/attachment/group',\n params: { type },\n },\n {\n code_error_show: true,\n }\n )\n}\n\n// 获取表单\nexport function getAttachmentGroupForm(id: number) {\n if (id) {\n return request({\n method: 'get',\n url: '/adminapi/attachment/group/' + id + '/edit',\n })\n } else {\n return request({\n method: 'get',\n url: '/adminapi/attachment/group/create',\n })\n }\n}\n\n// 删除分组\nexport function delAttachmentGroup(id: number) {\n return request(\n {\n method: 'delete',\n url: '/adminapi/attachment/group/' + id,\n },\n {\n code_error_show: true,\n }\n )\n}\n"],"names":[],"mappings":";;AAKO,SAAS,kBAAkB,IAAc,EAAA,IAAA,EAAc,IAAe,GAAA,CAAA,EAAG,SAAiB,MAAa,EAAA;AAC5G,EAAA,MAAA,CAAO,QAAW,GAAA,OAAA,CAAA;AAClB,EAAA,MAAA,CAAO,IAAO,GAAA,IAAA,CAAA;AACd,EAAA,OAAO,OAAQ,CAAA;AAAA,IACb,MAAQ,EAAA,MAAA;AAAA,IACR,GAAK,EAAA,2BAAA;AAAA,IACL,IAAM,EAAA,EAAE,IAAM,EAAA,IAAA,EAAM,MAAO,EAAA;AAAA,GAC5B,CAAA,CAAA;AACH,CAAA;AAYO,SAAS,gBAAiB,CAAA,IAAA,EAAW,IAAO,GAAA,CAAA,EAAG,UAAU,CAAG,EAAA;AACjE,EAAM,MAAA,QAAA,GAAW,IAAI,QAAS,EAAA,CAAA;AAC9B,EAAS,QAAA,CAAA,MAAA,CAAO,QAAQ,IAAI,CAAA,CAAA;AAC5B,EAAA,QAAA,CAAS,MAAO,CAAA,MAAA,EAAQ,IAAK,CAAA,QAAA,EAAU,CAAA,CAAA;AACvC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ACF,CAAA;AAGO,SAAS,uBAAuB,EAAY,EAAA;AACjD,EAAA,IAAI,EAAI,EAAA;AACN,IAAA,OAAO,OAAQ,CAAA;AAAA,MACb,MAAQ,EAAA,KAAA;AAAA,MACR,GAAA,EAAK,gCAAgC,EAAK,GAAA,OAAA;AAAA,KAC3C,CAAA,CAAA;AAAA,GACI,MAAA;AACL,IAAA,OAAO,OAAQ,CAAA;AAAA,MACb,MAAQ,EAAA,KAAA;AAAA,MACR,GAAK,EAAA,mCAAA;AAAA,KACN,CAAA,CAAA;AAAA,GACH;AACF,CAAA;AAGO,SAAS,mBAAmB,EAAY,EAAA;AAC7C,EAAO,OAAA,OAAA;AAAA,IACL;AAAA,MACE,MAAQ,EAAA,QAAA;AAAA,MACR,KAAK,6BAAgC,GAAA,EAAA;AAAA,KACvC;AAAA,IACA;AAAA,MACE,eAAiB,EAAA,IAAA;AAAA,KACnB;AAAA,GACF,CAAA;AACF;;;;"}
@@ -74,10 +74,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
74
74
  const chooseFileList = ref([]);
75
75
  const chooseFileId = ref([]);
76
76
  const globalConfig = getGlobalConfig();
77
- const uploadUrl = ref(globalConfig.ApiUrl);
78
- const headers = ref({
77
+ const uploadUrl = globalConfig.ApiUrl + "/adminapi/attachment/upload";
78
+ const headers = {
79
79
  "Access-Token": globalConfig.AccessToken
80
- });
80
+ };
81
81
  const upload = ref();
82
82
  const data = reactive({
83
83
  type: _type.value,
@@ -91,6 +91,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
91
91
  });
92
92
  };
93
93
  const handleUploadSuccess = (res) => {
94
+ console.log("res", res);
94
95
  if (res.code === 0) {
95
96
  ElMessage.success(res.msg);
96
97
  onGetAttachmentList();
@@ -214,7 +215,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
214
215
  count.value = res.msg;
215
216
  loading.value = false;
216
217
  } catch (e) {
217
- console.log(e);
218
218
  }
219
219
  };
220
220
  const clearChoose = () => {
@@ -346,11 +346,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
346
346
  ref_key: "upload",
347
347
  ref: upload,
348
348
  class: "dk-upload-button",
349
- action: uploadUrl.value,
349
+ action: uploadUrl,
350
350
  multiple: "",
351
351
  data,
352
352
  "show-file-list": false,
353
- headers: headers.value,
353
+ headers,
354
354
  "on-success": handleUploadSuccess,
355
355
  accept: _accept.value,
356
356
  "list-type": "text"
@@ -367,7 +367,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
367
367
  ]),
368
368
  _: 1
369
369
  /* STABLE */
370
- }, 8, ["action", "data", "headers", "accept"])
370
+ }, 8, ["data", "accept"])
371
371
  ])
372
372
  ]),
373
373
  createCommentVNode("\u5185\u90E8"),