jwt-ui 1.10.8-1 → 1.10.8-2

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
@@ -352,7 +352,7 @@ function filterVal(val2, formatType = "", row = {}, item = {}) {
352
352
  return val2;
353
353
  }
354
354
  }
355
- const index_vue_vue_type_style_index_0_scoped_478b6eed_lang = "";
355
+ const index_vue_vue_type_style_index_0_scoped_ce5a4174_lang = "";
356
356
  const _sfc_main$h = defineComponent({
357
357
  name: "JwtColumnItem",
358
358
  props: {
@@ -376,7 +376,11 @@ const _sfc_main$h = defineComponent({
376
376
  console.log(`value`, value);
377
377
  }
378
378
  });
379
- const handleEditRowProp = () => {
379
+ const handleEditRowProp = (e2) => {
380
+ if (e2.key === "Enter" && !e2.isComposing) {
381
+ e2.currentTarget.blur();
382
+ return;
383
+ }
380
384
  emit("change", appModel.value, props.item);
381
385
  };
382
386
  const handleFillUrl = (row, item) => {
@@ -440,6 +444,8 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
440
444
  const _component_jwt_upload_image = resolveComponent("jwt-upload-image");
441
445
  const _component_el_switch = resolveComponent("el-switch");
442
446
  const _component_jwt_select_server = resolveComponent("jwt-select-server");
447
+ const _component_el_date_picker = resolveComponent("el-date-picker");
448
+ const _component_el_time_picker = resolveComponent("el-time-picker");
443
449
  const _component_jwt_icon = resolveComponent("jwt-icon");
444
450
  const _component_el_image = resolveComponent("el-image");
445
451
  return _ctx.item.dateTimeFormat ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
@@ -452,8 +458,9 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
452
458
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.appModel[_ctx.item.prop] = $event),
453
459
  type: "text"
454
460
  }, ((_a2 = _ctx.item) == null ? void 0 : _a2.attrs) || {}, {
461
+ onBlur: _ctx.handleEditRowProp,
455
462
  onKeydown: withKeys(_ctx.handleEditRowProp, ["enter"])
456
- }), null, 16, ["modelValue", "onKeydown"]),
463
+ }), null, 16, ["modelValue", "onBlur", "onKeydown"]),
457
464
  _ctx.item.sufUnit ? (openBlock(), createElementBlock("span", _hoisted_3$3, toDisplayString(_ctx.item.sufUnit), 1)) : createCommentVNode("", true)
458
465
  ])) : _ctx.item.editType === "inputNumber" ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
459
466
  _ctx.item.preUnit ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(_ctx.item.preUnit), 1)) : createCommentVNode("", true),
@@ -484,16 +491,26 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
484
491
  }, _ctx.item.attrs, {
485
492
  "fill-url": _ctx.fillUrl,
486
493
  request: _ctx.request
487
- }, toHandlers(_ctx.item.formEvents), { onChange: _ctx.handleEditRowProp }), null, 16, ["modelValue", "fill-url", "request", "onChange"])) : createCommentVNode("", true)
494
+ }, toHandlers(_ctx.item.formEvents), { onChange: _ctx.handleEditRowProp }), null, 16, ["modelValue", "fill-url", "request", "onChange"])) : _ctx.item.editType === "datePicker" ? (openBlock(), createBlock(_component_el_date_picker, mergeProps({
495
+ key: 5,
496
+ modelValue: _ctx.appModel[_ctx.item.prop],
497
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.appModel[_ctx.item.prop] = $event),
498
+ "value-format": "YYY-MM-DD"
499
+ }, _ctx.item.attrs, toHandlers(_ctx.item.formEvents || {}), { onChange: _ctx.handleEditRowProp }), null, 16, ["modelValue", "onChange"])) : _ctx.item.editType === "timePicker" ? (openBlock(), createBlock(_component_el_time_picker, mergeProps({
500
+ key: 6,
501
+ modelValue: _ctx.appModel[_ctx.item.prop],
502
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.appModel[_ctx.item.prop] = $event),
503
+ "value-format": "HH:mm:ss"
504
+ }, _ctx.item.attrs, toHandlers(_ctx.item.formEvents || {}), { onChange: _ctx.handleEditRowProp }), null, 16, ["modelValue", "onChange"])) : createCommentVNode("", true)
488
505
  ], 64)) : _ctx.item.editInput ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
489
506
  withDirectives(createElementVNode("div", {
490
- onDblclick: _cache[5] || (_cache[5] = ($event) => _ctx.handleEditRow(_ctx.row, _ctx.item))
507
+ onDblclick: _cache[7] || (_cache[7] = ($event) => _ctx.handleEditRow(_ctx.row, _ctx.item))
491
508
  }, toDisplayString(_ctx.filterVal(_ctx.row[_ctx.item.prop], "", _ctx.row, _ctx.item)), 545), [
492
509
  [vShow, !_ctx.appModel[`isEdit${_ctx.item.prop}`]]
493
510
  ]),
494
511
  withDirectives(createVNode(_component_el_input, mergeProps({
495
512
  modelValue: _ctx.appModel[_ctx.item.prop],
496
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.appModel[_ctx.item.prop] = $event),
513
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => _ctx.appModel[_ctx.item.prop] = $event),
497
514
  type: "text"
498
515
  }, ((_d2 = _ctx.item) == null ? void 0 : _d2.attrs) || {}, {
499
516
  onBlur: _ctx.handleEditRowProp,
@@ -525,7 +542,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
525
542
  }, () => [
526
543
  createElementVNode("div", {
527
544
  class: "dl",
528
- onClick: _cache[7] || (_cache[7] = (...args) => _ctx.handleClickRow && _ctx.handleClickRow(...args))
545
+ onClick: _cache[9] || (_cache[9] = (...args) => _ctx.handleClickRow && _ctx.handleClickRow(...args))
529
546
  }, [
530
547
  _ctx.item.preUnit ? (openBlock(), createElementBlock("span", {
531
548
  key: 0,
@@ -541,7 +558,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
541
558
  ])
542
559
  ], true);
543
560
  }
544
- const index$h = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-478b6eed"]]);
561
+ const index$h = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["render", _sfc_render$h], ["__scopeId", "data-v-ce5a4174"]]);
545
562
  const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
546
563
  __proto__: null,
547
564
  default: index$h
@@ -37428,7 +37445,7 @@ const _sfc_main$6 = defineComponent({
37428
37445
  timer: null
37429
37446
  });
37430
37447
  const selectModel = computed({
37431
- get: () => props.modelValue || "",
37448
+ get: () => props.modelValue,
37432
37449
  set: (value) => {
37433
37450
  emit("update:modelValue", value);
37434
37451
  }
@@ -37459,7 +37476,7 @@ const _sfc_main$6 = defineComponent({
37459
37476
  };
37460
37477
  const handleSelectChange = (val2) => {
37461
37478
  emit("change", val2);
37462
- if (val2) {
37479
+ if (val2 || val2 === 0) {
37463
37480
  const { valueKey } = props;
37464
37481
  const item = state.listData.find((v2) => v2[valueKey] === val2);
37465
37482
  emit("select", item);
@@ -37539,7 +37556,7 @@ const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
37539
37556
  __proto__: null,
37540
37557
  default: index$6
37541
37558
  }, Symbol.toStringTag, { value: "Module" }));
37542
- const index_vue_vue_type_style_index_0_scoped_54532660_lang = "";
37559
+ const index_vue_vue_type_style_index_0_scoped_c483acca_lang = "";
37543
37560
  const index_vue_vue_type_style_index_1_lang = "";
37544
37561
  const paginationDefault$1 = {
37545
37562
  "page-sizes": [10, 20, 30, 40, 50, 100],
@@ -37605,7 +37622,8 @@ const _sfc_main$5 = defineComponent({
37605
37622
  let appConfig = lodash.exports.merge(
37606
37623
  {
37607
37624
  headerActions: {
37608
- list: []
37625
+ list: [],
37626
+ deleteText: ""
37609
37627
  },
37610
37628
  headerActionsShow: true,
37611
37629
  tableAttr: {
@@ -37618,6 +37636,7 @@ const _sfc_main$5 = defineComponent({
37618
37636
  tableListApi: null,
37619
37637
  tableListParams: {},
37620
37638
  tableDeleteApi: null,
37639
+ tableDeleteText: "",
37621
37640
  tableDeleteParams: {},
37622
37641
  tableExportApi: "",
37623
37642
  tableExportPathKey: "",
@@ -37864,7 +37883,7 @@ const _sfc_main$5 = defineComponent({
37864
37883
  emit("table-current-change", currentRow);
37865
37884
  };
37866
37885
  const handleHeaderAction = (action) => {
37867
- var _a3, _b2, _c3, _d2, _e2, _f2;
37886
+ var _a3, _b2, _c3, _d2, _e2, _f2, _g;
37868
37887
  console.log("action :>> ", action);
37869
37888
  const { code } = action;
37870
37889
  const rowAction = ((_a3 = appConfig.headerActions) == null ? void 0 : _a3[code]) || ((_c3 = (_b2 = tableDrawerConfig == null ? void 0 : tableDrawerConfig.descriptions) == null ? void 0 : _b2.headerActions) == null ? void 0 : _c3[code]);
@@ -37885,7 +37904,7 @@ const _sfc_main$5 = defineComponent({
37885
37904
  emit(rowAction.event, selectionRow.value);
37886
37905
  } else {
37887
37906
  ElMessageBox.confirm(
37888
- (props == null ? void 0 : props.translateTitle("\u6B64\u64CD\u4F5C\u5C06\u4F1A\u6C38\u4E45\u5220\u9664\u6570\u636E\uFF0C\u662F\u5426\u7EE7\u7EED")) || "\u6B64\u64CD\u4F5C\u5C06\u4F1A\u6C38\u4E45\u5220\u9664\u6570\u636E\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",
37907
+ ((_f2 = appConfig == null ? void 0 : appConfig.headerActions) == null ? void 0 : _f2.deleteText) || (props == null ? void 0 : props.translateTitle("\u6B64\u64CD\u4F5C\u5C06\u4F1A\u6C38\u4E45\u5220\u9664\u6570\u636E\uFF0C\u662F\u5426\u7EE7\u7EED")) || "\u6B64\u64CD\u4F5C\u5C06\u4F1A\u6C38\u4E45\u5220\u9664\u6570\u636E\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",
37889
37908
  {
37890
37909
  confirmButtonText: (props == null ? void 0 : props.translateTitle("\u786E\u5B9A")) || "\u786E\u5B9A",
37891
37910
  cancelButtonText: (props == null ? void 0 : props.translateTitle("\u53D6\u6D88")) || "\u53D6\u6D88",
@@ -37904,7 +37923,7 @@ const _sfc_main$5 = defineComponent({
37904
37923
  } else if (code.startsWith("importF")) {
37905
37924
  handleImportRequest();
37906
37925
  } else {
37907
- if (rowAction && ((_f2 = rowAction == null ? void 0 : rowAction.type) == null ? void 0 : _f2.includes("editBox"))) {
37926
+ if (rowAction && ((_g = rowAction == null ? void 0 : rowAction.type) == null ? void 0 : _g.includes("editBox"))) {
37908
37927
  handleEdit("", rowAction);
37909
37928
  } else {
37910
37929
  emit(
@@ -37937,7 +37956,7 @@ const _sfc_main$5 = defineComponent({
37937
37956
  emit(row.event, selectionRow.value);
37938
37957
  } else {
37939
37958
  ElMessageBox.confirm(
37940
- (props == null ? void 0 : props.translateTitle("\u6B64\u64CD\u4F5C\u5C06\u4F1A\u6C38\u4E45\u5220\u9664\u6570\u636E\uFF0C\u662F\u5426\u7EE7\u7EED?")) || "\u6B64\u64CD\u4F5C\u5C06\u4F1A\u6C38\u4E45\u5220\u9664\u6570\u636E\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",
37959
+ appConfig.tableDeleteText || (props == null ? void 0 : props.translateTitle("\u6B64\u64CD\u4F5C\u5C06\u4F1A\u6C38\u4E45\u5220\u9664\u6570\u636E\uFF0C\u662F\u5426\u7EE7\u7EED?")) || "\u6B64\u64CD\u4F5C\u5C06\u4F1A\u6C38\u4E45\u5220\u9664\u6570\u636E\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",
37941
37960
  {
37942
37961
  confirmButtonText: (props == null ? void 0 : props.translateTitle("\u786E\u5B9A")) || "\u786E\u5B9A",
37943
37962
  cancelButtonText: (props == null ? void 0 : props.translateTitle("\u53D6\u6D88")) || "\u53D6\u6D88",
@@ -38633,7 +38652,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
38633
38652
  }, 16, ["modelValue", "onClose"])
38634
38653
  ], 64);
38635
38654
  }
38636
- const index$5 = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-54532660"]]);
38655
+ const index$5 = /* @__PURE__ */ _export_sfc$1(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-c483acca"]]);
38637
38656
  const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38638
38657
  __proto__: null,
38639
38658
  default: index$5