knt-shared 1.4.1 → 1.4.3

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/dist/index.esm.js CHANGED
@@ -1777,7 +1777,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
1777
1777
  };
1778
1778
  }
1779
1779
  });
1780
- const VideoPreview = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-4056caea"]]);
1780
+ const VideoPreview = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-e8cbf700"]]);
1781
1781
  const _hoisted_1$6 = { class: "video-modal-title" };
1782
1782
  const _hoisted_2$5 = { class: "file-name" };
1783
1783
  const _hoisted_3$3 = { class: "video-modal-content" };
@@ -1935,7 +1935,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1935
1935
  emits: ["register", "update:modelValue", "change", "success", "handleSuccess", "error", "handlError", "progress", "remove", "preview", "exceed", "sortChange"],
1936
1936
  setup(__props, { expose: __expose, emit: __emit }) {
1937
1937
  useCssVars((_ctx) => ({
1938
- "v1d2beb5a": cardSizeValue.value
1938
+ "v5e570a54": cardSizeValue.value
1939
1939
  }));
1940
1940
  const props = __props;
1941
1941
  const emit = __emit;
@@ -1990,13 +1990,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1990
1990
  });
1991
1991
  const isVideoFile = (fileItem) => {
1992
1992
  var _a, _b;
1993
- if (!fileItem.url && !fileItem.file) return false;
1994
- const fileName = fileItem.name || ((_a = fileItem.file) == null ? void 0 : _a.name) || "";
1993
+ if (!fileItem.url && !fileItem.originFileObj) return false;
1994
+ const fileName = fileItem.name || ((_a = fileItem.originFileObj) == null ? void 0 : _a.name) || "";
1995
1995
  const videoExtensions = [".mp4", ".avi", ".mov", ".wmv", ".flv", ".mkv", ".webm", ".m4v"];
1996
1996
  const hasVideoExtension = videoExtensions.some(
1997
1997
  (ext) => fileName.toLowerCase().endsWith(ext)
1998
1998
  );
1999
- const mimeType = ((_b = fileItem.file) == null ? void 0 : _b.type) || "";
1999
+ const mimeType = ((_b = fileItem.originFileObj) == null ? void 0 : _b.type) || "";
2000
2000
  const isVideoMimeType = mimeType.startsWith("video/");
2001
2001
  return hasVideoExtension || isVideoMimeType;
2002
2002
  };
@@ -2546,7 +2546,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
2546
2546
  };
2547
2547
  }
2548
2548
  });
2549
- const BasicUpload = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-b2fe6ba6"]]);
2549
+ const BasicUpload = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-640a0bf9"]]);
2550
2550
  function useUpload(props) {
2551
2551
  const uploadRef = ref(null);
2552
2552
  const fileListRef = ref((props == null ? void 0 : props.defaultFileList) || []);
@@ -2770,7 +2770,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2770
2770
  const getRow = computed(() => {
2771
2771
  const propsData = unref(getProps);
2772
2772
  return {
2773
- gutter: propsData.gutter || 24
2773
+ gutter: propsData.gutter ?? 24
2774
2774
  };
2775
2775
  });
2776
2776
  const getActionProps = computed(() => {
@@ -2945,7 +2945,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
2945
2945
  const removeSchema = (field) => {
2946
2946
  const fields = Array.isArray(field) ? field : [field];
2947
2947
  fields.forEach((f) => {
2948
- const index = internalSchemas.value.findIndex((s) => s.field === f);
2948
+ const index = internalSchemas.value.findIndex(
2949
+ (s) => s.field === f
2950
+ );
2949
2951
  if (index !== -1) {
2950
2952
  internalSchemas.value.splice(index, 1);
2951
2953
  delete formModel[f];
@@ -3038,7 +3040,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3038
3040
  const _component_a_tooltip = resolveComponent("a-tooltip");
3039
3041
  const _component_a_form_item = resolveComponent("a-form-item");
3040
3042
  const _component_a_col = resolveComponent("a-col");
3043
+ const _component_icon_search = resolveComponent("icon-search");
3041
3044
  const _component_a_button = resolveComponent("a-button");
3045
+ const _component_icon_refresh = resolveComponent("icon-refresh");
3042
3046
  const _component_a_space = resolveComponent("a-space");
3043
3047
  const _component_a_row = resolveComponent("a-row");
3044
3048
  const _component_a_form = resolveComponent("a-form");
@@ -3116,8 +3120,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3116
3120
  "html-type": "submit",
3117
3121
  loading: submitLoading.value
3118
3122
  }, {
3123
+ icon: withCtx(() => [
3124
+ createVNode(_component_icon_search)
3125
+ ]),
3119
3126
  default: withCtx(() => [
3120
- createTextVNode(toDisplayString(getActionProps.value.submitButtonText), 1)
3127
+ createTextVNode(" " + toDisplayString(getActionProps.value.submitButtonText), 1)
3121
3128
  ]),
3122
3129
  _: 1
3123
3130
  }, 8, ["loading"])) : createCommentVNode("", true),
@@ -3125,8 +3132,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
3125
3132
  key: 1,
3126
3133
  onClick: handleReset
3127
3134
  }, {
3135
+ icon: withCtx(() => [
3136
+ createVNode(_component_icon_refresh)
3137
+ ]),
3128
3138
  default: withCtx(() => [
3129
- createTextVNode(toDisplayString(getActionProps.value.resetButtonText), 1)
3139
+ createTextVNode(" " + toDisplayString(getActionProps.value.resetButtonText), 1)
3130
3140
  ]),
3131
3141
  _: 1
3132
3142
  })) : createCommentVNode("", true),