jwt-ui 1.10.8-7 → 1.10.8-8

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/lib/jwt-ui.es.js CHANGED
@@ -6133,11 +6133,11 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
6133
6133
  key: 0,
6134
6134
  "action-list": (_d2 = (_c2 = _ctx.desConfig) == null ? void 0 : _c2.headerActions) == null ? void 0 : _d2.list,
6135
6135
  "current-path": _ctx.currentPagePath,
6136
- "file-import-api": (_f2 = (_e2 = _ctx.desConfig) == null ? void 0 : _e2.api) == null ? void 0 : _f2.tableFileImportApi,
6136
+ "file-import": (_f2 = (_e2 = _ctx.desConfig) == null ? void 0 : _e2.api) == null ? void 0 : _f2.tableFileImport,
6137
6137
  loading: _ctx.ajaxLoading,
6138
6138
  "menus-obj": _ctx.userMenusAuth,
6139
6139
  onHeaderAction: _ctx.handleHeaderAction
6140
- }, null, 8, ["action-list", "current-path", "file-import-api", "loading", "menus-obj", "onHeaderAction"])) : createCommentVNode("", true)
6140
+ }, null, 8, ["action-list", "current-path", "file-import", "loading", "menus-obj", "onHeaderAction"])) : createCommentVNode("", true)
6141
6141
  ];
6142
6142
  })
6143
6143
  ];
@@ -35600,11 +35600,12 @@ const _sfc_main$c = defineComponent({
35600
35600
  selectionRow: { type: Array, default: () => [] },
35601
35601
  actionList: { type: Object, default: () => {
35602
35602
  } },
35603
- fileImportApi: { type: String, default: "" },
35603
+ fileImport: { type: Object, default: () => {
35604
+ } },
35604
35605
  row: { type: Object, default: () => {
35605
35606
  } }
35606
35607
  },
35607
- emits: ["header-action"],
35608
+ emits: ["header-action", "upload-success"],
35608
35609
  setup(props, { emit }) {
35609
35610
  let headerButtonActions = computed(() => {
35610
35611
  var _a2;
@@ -35636,6 +35637,7 @@ const _sfc_main$c = defineComponent({
35636
35637
  message: res.msg,
35637
35638
  type: res.code === 0 ? "success" : "error"
35638
35639
  });
35640
+ emit("upload-success");
35639
35641
  };
35640
35642
  const handleHeaderAction = (action) => {
35641
35643
  emit("header-action", action);
@@ -35659,11 +35661,10 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
35659
35661
  return _ctx.headerButtonActions.length ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
35660
35662
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.headerButtonActions, (action, index2) => {
35661
35663
  return openBlock(), createElementBlock(Fragment, { key: index2 }, [
35662
- action.code.includes("importF") ? (openBlock(), createBlock(_component_el_upload, {
35664
+ action.code.includes("importF") ? (openBlock(), createBlock(_component_el_upload, mergeProps({
35663
35665
  key: 0,
35664
35666
  "file-list": _ctx.fileList,
35665
35667
  "onUpdate:file-list": _cache[0] || (_cache[0] = ($event) => _ctx.fileList = $event),
35666
- action: _ctx.fileImportApi,
35667
35668
  "before-remove": _ctx.beforeRemove,
35668
35669
  class: "mlr10",
35669
35670
  headers: _ctx.headers,
@@ -35671,7 +35672,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
35671
35672
  "on-success": _ctx.handleSuccess,
35672
35673
  "show-file-list": false,
35673
35674
  "with-credentials": ""
35674
- }, {
35675
+ }, _ctx.fileImport), {
35675
35676
  default: withCtx(() => [
35676
35677
  createVNode(_component_el_button, {
35677
35678
  loading: _ctx.loading,
@@ -35688,7 +35689,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
35688
35689
  }, 1032, ["loading"])
35689
35690
  ]),
35690
35691
  _: 2
35691
- }, 1032, ["file-list", "action", "before-remove", "headers", "on-success"])) : (openBlock(), createBlock(_component_el_button, {
35692
+ }, 1040, ["file-list", "before-remove", "headers", "on-success"])) : (openBlock(), createBlock(_component_el_button, {
35692
35693
  key: 1,
35693
35694
  disabled: (action.code.includes("delete") || action.code.includes("batch")) && !_ctx.selectionRow.length,
35694
35695
  loading: _ctx.loading,
@@ -37612,7 +37613,7 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
37612
37613
  __proto__: null,
37613
37614
  default: index$6
37614
37615
  }, Symbol.toStringTag, { value: "Module" }));
37615
- const index_vue_vue_type_style_index_0_scoped_f79294ef_lang = "";
37616
+ const index_vue_vue_type_style_index_0_scoped_b0700406_lang = "";
37616
37617
  const index_vue_vue_type_style_index_1_lang = "";
37617
37618
  const paginationDefault$1 = {
37618
37619
  "page-sizes": [10, 20, 30, 40, 50, 100],
@@ -38181,7 +38182,8 @@ const _sfc_main$5 = defineComponent({
38181
38182
  });
38182
38183
  };
38183
38184
  const handleImportRequest = () => {
38184
- if (!appConfig.tableFileImportApi) {
38185
+ var _a3;
38186
+ if (!((_a3 = appConfig.tableFileImport) == null ? void 0 : _a3.action)) {
38185
38187
  ElMessage.info(
38186
38188
  (props == null ? void 0 : props.translateTitle("\u8BF7\u914D\u7F6E\u6587\u4EF6\u4E0A\u4F20\u63A5\u53E3\uFF01")) || "\u8BF7\u914D\u7F6E\u6587\u4EF6\u4E0A\u4F20\u63A5\u53E3\uFF01"
38187
38189
  );
@@ -38299,6 +38301,11 @@ const _sfc_main$5 = defineComponent({
38299
38301
  const handleUploadBtn = (item) => {
38300
38302
  emit("upload-btn", item);
38301
38303
  };
38304
+ const handleUploadSuccess = () => {
38305
+ if (appConfig.tableFileImport.refreshTable) {
38306
+ getList();
38307
+ }
38308
+ };
38302
38309
  watch(props, (newValue) => {
38303
38310
  appConfig = lodash.exports.merge(appConfig, newValue.config);
38304
38311
  if (newValue.config.tableData) {
@@ -38352,7 +38359,8 @@ const _sfc_main$5 = defineComponent({
38352
38359
  handleImportRequest,
38353
38360
  handleClickRow,
38354
38361
  handleCloseDrawer,
38355
- handleUploadBtn
38362
+ handleUploadBtn,
38363
+ handleUploadSuccess
38356
38364
  };
38357
38365
  }
38358
38366
  });
@@ -38406,12 +38414,13 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
38406
38414
  key: 0,
38407
38415
  "action-list": _ctx.headerActions,
38408
38416
  "current-path": _ctx.currentPagePath,
38409
- "file-import-api": _ctx.appConfig.tableFileImportApi,
38417
+ "file-import": _ctx.appConfig.tableFileImport,
38410
38418
  loading: _ctx.ajaxLoading,
38411
38419
  "menus-obj": _ctx.userMenusAuth,
38412
38420
  "selection-row": _ctx.selectionRow,
38413
- onHeaderAction: _ctx.handleHeaderAction
38414
- }, null, 8, ["action-list", "current-path", "file-import-api", "loading", "menus-obj", "selection-row", "onHeaderAction"])) : createCommentVNode("", true),
38421
+ onHeaderAction: _ctx.handleHeaderAction,
38422
+ onUploadSuccess: _ctx.handleUploadSuccess
38423
+ }, null, 8, ["action-list", "current-path", "file-import", "loading", "menus-obj", "selection-row", "onHeaderAction", "onUploadSuccess"])) : createCommentVNode("", true),
38415
38424
  renderSlot(_ctx.$slots, "header-button-after", {}, void 0, true)
38416
38425
  ]),
38417
38426
  renderSlot(_ctx.$slots, "table-before", {}, void 0, true),
@@ -38613,13 +38622,13 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
38613
38622
  key: 0,
38614
38623
  "action-list": (_e2 = (_d3 = _ctx.tableDrawerConfig) == null ? void 0 : _d3.descriptions) == null ? void 0 : _e2.headerActions,
38615
38624
  "current-path": _ctx.currentPagePath,
38616
- "file-import-api": _ctx.appConfig.tableFileImportApi,
38625
+ "file-import": _ctx.appConfig.tableFileImport,
38617
38626
  loading: _ctx.ajaxLoading,
38618
38627
  "menus-obj": _ctx.userMenusAuth,
38619
38628
  row: _ctx.tableDrawerDetailInfo,
38620
38629
  "selection-row": _ctx.selectionRow,
38621
38630
  onHeaderAction: _ctx.handleHeaderAction
38622
- }, null, 8, ["action-list", "current-path", "file-import-api", "loading", "menus-obj", "row", "selection-row", "onHeaderAction"])) : createCommentVNode("", true)
38631
+ }, null, 8, ["action-list", "current-path", "file-import", "loading", "menus-obj", "row", "selection-row", "onHeaderAction"])) : createCommentVNode("", true)
38623
38632
  ];
38624
38633
  }, true)
38625
38634
  ];
@@ -38714,7 +38723,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
38714
38723
  }, 16, ["modelValue", "onClose"])
38715
38724
  ], 64);
38716
38725
  }
38717
- const index$5 = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-f79294ef"]]);
38726
+ const index$5 = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-b0700406"]]);
38718
38727
  const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38719
38728
  __proto__: null,
38720
38729
  default: index$5
@@ -39434,8 +39443,6 @@ const _sfc_main = defineComponent({
39434
39443
  }
39435
39444
  });
39436
39445
  const handleInitImgPath = () => {
39437
- if (state.initOnce)
39438
- return;
39439
39446
  let result = [];
39440
39447
  if (props.multiple) {
39441
39448
  if (F$6.hasArray(props.modelValue)) {
@@ -39474,13 +39481,11 @@ const _sfc_main = defineComponent({
39474
39481
  () => props.modelValue,
39475
39482
  (newValue) => {
39476
39483
  nextTick(() => {
39477
- if (!state.initOnce) {
39478
- if (newValue) {
39479
- const fileList = handleInitImgPath();
39480
- state.fileList = fileList;
39481
- } else {
39482
- state.fileList = [];
39483
- }
39484
+ if (newValue) {
39485
+ const fileList = handleInitImgPath();
39486
+ state.fileList = fileList;
39487
+ } else {
39488
+ state.fileList = [];
39484
39489
  }
39485
39490
  });
39486
39491
  }