fast-element-plus 1.0.2 → 1.0.4

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.
Files changed (92) hide show
  1. package/dist/index.full.js +159 -104
  2. package/dist/index.full.js.map +1 -1
  3. package/dist/index.full.min.js +1 -1
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +1 -1
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +159 -104
  8. package/dist/index.full.mjs.map +1 -1
  9. package/dist/styles/index.css +1 -1
  10. package/es/components/avatar/src/avatar.d.ts +10 -9
  11. package/es/components/avatar/src/avatar.mjs +1 -1
  12. package/es/components/avatar/src/avatar.mjs.map +1 -1
  13. package/es/components/button/src/button.d.ts +4 -4
  14. package/es/components/carNumber/src/carNumber.d.ts +3 -3
  15. package/es/components/dialog/src/dialog.mjs +1 -1
  16. package/es/components/dialog/src/dialog.mjs.map +1 -1
  17. package/es/components/drawer/src/drawer.mjs +1 -1
  18. package/es/components/drawer/src/drawer.mjs.map +1 -1
  19. package/es/components/form/src/formItem.d.ts +18 -4
  20. package/es/components/image/src/image.d.ts +7 -0
  21. package/es/components/image/src/image.mjs +1 -1
  22. package/es/components/image/src/image.mjs.map +1 -1
  23. package/es/components/index.mjs +1 -1
  24. package/es/components/table/index.d.ts +2 -2
  25. package/es/components/table/index.mjs +1 -1
  26. package/es/components/table/index.mjs.map +1 -1
  27. package/es/components/table/src/table.d.ts +45 -11
  28. package/es/components/table/src/table.mjs +1 -1
  29. package/es/components/table/src/table.mjs.map +1 -1
  30. package/es/components/table/src/table.state.d.ts +0 -4
  31. package/es/components/table/src/table.type.d.ts +3 -62
  32. package/es/components/table/src/table.type.mjs.map +1 -1
  33. package/es/components/table/src/tableColumn.d.ts +9 -0
  34. package/es/components/table/src/tableColumn.mjs +1 -1
  35. package/es/components/table/src/tableColumn.mjs.map +1 -1
  36. package/es/components/table/src/tableColumnSettingDialog.d.ts +3 -3
  37. package/es/components/table/src/tableColumnSettingDialog.mjs +1 -1
  38. package/es/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
  39. package/es/components/table/src/useTable.mjs +1 -1
  40. package/es/components/table/src/useTable.mjs.map +1 -1
  41. package/es/components/table/utils/table.mjs +1 -1
  42. package/es/components/table/utils/table.mjs.map +1 -1
  43. package/es/components/upload/src/upload.d.ts +4 -4
  44. package/es/components/uploadImage/src/uploadImage.d.ts +4 -4
  45. package/es/components/uploadImages/src/uploadImages.d.ts +4 -4
  46. package/es/index.mjs +1 -1
  47. package/es/index.mjs.map +1 -1
  48. package/es/version.d.ts +1 -1
  49. package/es/version.mjs +1 -1
  50. package/es/version.mjs.map +1 -1
  51. package/lib/components/avatar/src/avatar.d.ts +10 -9
  52. package/lib/components/avatar/src/avatar.js +1 -1
  53. package/lib/components/avatar/src/avatar.js.map +1 -1
  54. package/lib/components/button/src/button.d.ts +4 -4
  55. package/lib/components/carNumber/src/carNumber.d.ts +3 -3
  56. package/lib/components/dialog/src/dialog.js +1 -1
  57. package/lib/components/dialog/src/dialog.js.map +1 -1
  58. package/lib/components/drawer/src/drawer.js +1 -1
  59. package/lib/components/drawer/src/drawer.js.map +1 -1
  60. package/lib/components/form/src/formItem.d.ts +18 -4
  61. package/lib/components/image/src/image.d.ts +7 -0
  62. package/lib/components/image/src/image.js +1 -1
  63. package/lib/components/image/src/image.js.map +1 -1
  64. package/lib/components/index.js +1 -1
  65. package/lib/components/table/index.d.ts +2 -2
  66. package/lib/components/table/index.js +1 -1
  67. package/lib/components/table/index.js.map +1 -1
  68. package/lib/components/table/src/table.d.ts +45 -11
  69. package/lib/components/table/src/table.js +1 -1
  70. package/lib/components/table/src/table.js.map +1 -1
  71. package/lib/components/table/src/table.state.d.ts +0 -4
  72. package/lib/components/table/src/table.type.d.ts +3 -62
  73. package/lib/components/table/src/table.type.js.map +1 -1
  74. package/lib/components/table/src/tableColumn.d.ts +9 -0
  75. package/lib/components/table/src/tableColumn.js +1 -1
  76. package/lib/components/table/src/tableColumn.js.map +1 -1
  77. package/lib/components/table/src/tableColumnSettingDialog.d.ts +3 -3
  78. package/lib/components/table/src/tableColumnSettingDialog.js +1 -1
  79. package/lib/components/table/src/tableColumnSettingDialog.js.map +1 -1
  80. package/lib/components/table/src/useTable.js +1 -1
  81. package/lib/components/table/src/useTable.js.map +1 -1
  82. package/lib/components/table/utils/table.js +1 -1
  83. package/lib/components/table/utils/table.js.map +1 -1
  84. package/lib/components/upload/src/upload.d.ts +4 -4
  85. package/lib/components/uploadImage/src/uploadImage.d.ts +4 -4
  86. package/lib/components/uploadImages/src/uploadImages.d.ts +4 -4
  87. package/lib/index.js +1 -1
  88. package/lib/version.d.ts +1 -1
  89. package/lib/version.js +1 -1
  90. package/lib/version.js.map +1 -1
  91. package/package.json +5 -5
  92. package/styles/components/table.scss +1 -1
@@ -25,9 +25,9 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
25
25
  type: utils.definePropType([String, Object, Function]),
26
26
  default: () => ElementPlusIconsVue2.Picture
27
27
  },
28
- /**
29
- * @description 原图
30
- */
28
+ /** @description Base64图片 */
29
+ base64: Boolean,
30
+ /** @description 原图 */
31
31
  original: Boolean,
32
32
  /** @description 标准 */
33
33
  normal: Boolean,
@@ -52,20 +52,20 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
52
52
  }) {
53
53
  const state = vue.reactive({
54
54
  src: vue.computed(() => {
55
- if (props.src) {
56
- if (props.original) {
57
- return props.src;
58
- } else if (props.normal) {
59
- return `${props.src}@!normal`;
60
- } else if (props.small) {
61
- return `${props.src}@!small`;
62
- } else if (props.thumb) {
63
- return `${props.src}@!thumb`;
64
- } else {
65
- return `${props.src}@!thumb`;
66
- }
55
+ if (!props.src) return void 0;
56
+ if (props.base64) {
57
+ return `data:image/png;base64,${props.src}`;
58
+ } else if (props.original) {
59
+ return props.src;
60
+ } else if (props.normal) {
61
+ return `${props.src}@!normal`;
62
+ } else if (props.small) {
63
+ return `${props.src}@!small`;
64
+ } else if (props.thumb) {
65
+ return `${props.src}@!thumb`;
66
+ } else {
67
+ return `${props.src}@!thumb`;
67
68
  }
68
- return void 0;
69
69
  })
70
70
  });
71
71
  const elAvatarProps = utils.useProps(props, ElementPlus2.avatarProps, ["src"]);
@@ -6992,7 +6992,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
6992
6992
  const isIOS = /* @__PURE__ */ getIsIOS();
6993
6993
  function getIsIOS() {
6994
6994
  var _window, _window2, _window3;
6995
- return isClient && ((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));
6995
+ return isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));
6996
6996
  }
6997
6997
  function toRef(...args) {
6998
6998
  if (args.length !== 1) return vue.toRef(...args);
@@ -8332,11 +8332,6 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
8332
8332
  return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
8333
8333
  }
8334
8334
  function useEventListener(...args) {
8335
- const cleanups = [];
8336
- const cleanup = () => {
8337
- cleanups.forEach((fn) => fn());
8338
- cleanups.length = 0;
8339
- };
8340
8335
  const register = (el, event, listener, options) => {
8341
8336
  el.addEventListener(event, listener, options);
8342
8337
  return () => el.removeEventListener(event, listener, options);
@@ -8345,7 +8340,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
8345
8340
  const test = toArray(vue.toValue(args[0])).filter((e) => e != null);
8346
8341
  return test.every((e) => typeof e !== "string") ? test : void 0;
8347
8342
  });
8348
- const stopWatch = watchImmediate(() => {
8343
+ return watchImmediate(() => {
8349
8344
  var _firstParamTargets$va, _firstParamTargets$va2;
8350
8345
  return [
8351
8346
  (_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
@@ -8353,18 +8348,14 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
8353
8348
  toArray(vue.unref(firstParamTargets.value ? args[2] : args[1])),
8354
8349
  vue.toValue(firstParamTargets.value ? args[3] : args[2])
8355
8350
  ];
8356
- }, ([raw_targets, raw_events, raw_listeners, raw_options]) => {
8357
- cleanup();
8351
+ }, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
8358
8352
  if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
8359
8353
  const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
8360
- cleanups.push(...raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone)))));
8354
+ const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
8355
+ onCleanup(() => {
8356
+ cleanups.forEach((fn) => fn());
8357
+ });
8361
8358
  }, { flush: "post" });
8362
- const stop = () => {
8363
- stopWatch();
8364
- cleanup();
8365
- };
8366
- tryOnScopeDispose(cleanup);
8367
- return stop;
8368
8359
  }
8369
8360
  let _iOSWorkaround = false;
8370
8361
  function onClickOutside(target, handler, options = {}) {
@@ -9028,6 +9019,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
9028
9019
  }
9029
9020
  updateResult(promiseState.rejected, e);
9030
9021
  onError();
9022
+ if (activeIndex.value === tasks.length - 1) onFinished();
9031
9023
  return e;
9032
9024
  });
9033
9025
  }, Promise.resolve());
@@ -9619,6 +9611,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
9619
9611
  ta.value = value;
9620
9612
  ta.style.position = "absolute";
9621
9613
  ta.style.opacity = "0";
9614
+ ta.setAttribute("readonly", "");
9622
9615
  document.body.appendChild(ta);
9623
9616
  ta.select();
9624
9617
  document.execCommand("copy");
@@ -10576,6 +10569,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
10576
10569
  return types.every((type) => dataTypes.some((allowedType) => type.includes(allowedType)));
10577
10570
  };
10578
10571
  const checkValidity = (items) => {
10572
+ if (_options.checkValidity) return _options.checkValidity(items);
10579
10573
  const dataTypesValid = checkDataTypes(Array.from(items !== null && items !== void 0 ? items : []).map((item) => item.type));
10580
10574
  const multipleFilesValid = multiple || items.length <= 1;
10581
10575
  return dataTypesValid && multipleFilesValid;
@@ -10862,8 +10856,8 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
10862
10856
  };
10863
10857
  }
10864
10858
  function useElementVisibility(element, options = {}) {
10865
- const { window: window$1 = defaultWindow, scrollTarget, threshold = 0, rootMargin, once: once2 = false } = options;
10866
- const elementIsVisible = vue.shallowRef(false);
10859
+ const { window: window$1 = defaultWindow, scrollTarget, threshold = 0, rootMargin, once: once2 = false, initialValue = false } = options;
10860
+ const elementIsVisible = vue.shallowRef(initialValue);
10867
10861
  const { stop } = useIntersectionObserver(element, (intersectionObserverEntries) => {
10868
10862
  let isIntersecting = elementIsVisible.value;
10869
10863
  let latestTime = 0;
@@ -11972,7 +11966,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
11972
11966
  var _document2;
11973
11967
  if (!window$1) return;
11974
11968
  const el = (target === null || target === void 0 || (_document2 = target.document) === null || _document2 === void 0 ? void 0 : _document2.documentElement) || (target === null || target === void 0 ? void 0 : target.documentElement) || unrefElement(target);
11975
- const { display, flexDirection, direction } = getComputedStyle(el);
11969
+ const { display, flexDirection, direction } = window$1.getComputedStyle(el);
11976
11970
  const directionMultipler = direction === "rtl" ? -1 : 1;
11977
11971
  const scrollLeft = el.scrollLeft;
11978
11972
  directions.left = scrollLeft < internalX.value;
@@ -12058,9 +12052,13 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
12058
12052
  return resolveElement(vue.toValue(element));
12059
12053
  });
12060
12054
  const isElementVisible = useElementVisibility(observedElement);
12055
+ const canLoad = vue.computed(() => {
12056
+ if (!observedElement.value) return false;
12057
+ return canLoadMore(observedElement.value);
12058
+ });
12061
12059
  function checkAndLoad() {
12062
12060
  state.measure();
12063
- if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value)) return;
12061
+ if (!observedElement.value || !isElementVisible.value || !canLoad.value) return;
12064
12062
  const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;
12065
12063
  const isNarrower = direction === "bottom" || direction === "top" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;
12066
12064
  if (state.arrivedState[direction] || isNarrower) {
@@ -12070,7 +12068,11 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
12070
12068
  });
12071
12069
  }
12072
12070
  }
12073
- tryOnUnmounted(vue.watch(() => [state.arrivedState[direction], isElementVisible.value], checkAndLoad, { immediate: true }));
12071
+ tryOnUnmounted(vue.watch(() => [
12072
+ state.arrivedState[direction],
12073
+ isElementVisible.value,
12074
+ canLoad.value
12075
+ ], checkAndLoad, { immediate: true }));
12074
12076
  return {
12075
12077
  isLoading,
12076
12078
  reset() {
@@ -12160,6 +12162,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
12160
12162
  var _e$key, _e$code;
12161
12163
  const key = (_e$key = e.key) === null || _e$key === void 0 ? void 0 : _e$key.toLowerCase();
12162
12164
  const values2 = [(_e$code = e.code) === null || _e$code === void 0 ? void 0 : _e$code.toLowerCase(), key].filter(Boolean);
12165
+ if (key === "") return;
12163
12166
  if (key) if (value) current.add(key);
12164
12167
  else current.delete(key);
12165
12168
  for (const key$1 of values2) {
@@ -12537,17 +12540,20 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
12537
12540
  if (!window$1) return;
12538
12541
  const el = unrefElement(targetRef);
12539
12542
  if (!el || !(el instanceof Element)) return;
12540
- const { left, top, width, height } = el.getBoundingClientRect();
12541
- elementPositionX.value = left + (type === "page" ? window$1.pageXOffset : 0);
12542
- elementPositionY.value = top + (type === "page" ? window$1.pageYOffset : 0);
12543
- elementHeight.value = height;
12544
- elementWidth.value = width;
12545
- const elX = x.value - elementPositionX.value;
12546
- const elY = y.value - elementPositionY.value;
12547
- isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;
12548
- if (handleOutside || !isOutside.value) {
12549
- elementX.value = elX;
12550
- elementY.value = elY;
12543
+ for (const rect of el.getClientRects()) {
12544
+ const { left, top, width, height } = rect;
12545
+ elementPositionX.value = left + (type === "page" ? window$1.pageXOffset : 0);
12546
+ elementPositionY.value = top + (type === "page" ? window$1.pageYOffset : 0);
12547
+ elementHeight.value = height;
12548
+ elementWidth.value = width;
12549
+ const elX = x.value - elementPositionX.value;
12550
+ const elY = y.value - elementPositionY.value;
12551
+ isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;
12552
+ if (handleOutside || !isOutside.value) {
12553
+ elementX.value = elX;
12554
+ elementY.value = elY;
12555
+ }
12556
+ if (!isOutside.value) break;
12551
12557
  }
12552
12558
  }
12553
12559
  const stopFnList = [];
@@ -13398,8 +13404,12 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
13398
13404
  };
13399
13405
  vue.watch(isListening, (newValue, oldValue) => {
13400
13406
  if (newValue === oldValue) return;
13401
- if (newValue) recognition.start();
13402
- else recognition.stop();
13407
+ try {
13408
+ if (newValue) recognition.start();
13409
+ else recognition.stop();
13410
+ } catch (err) {
13411
+ error.value = err;
13412
+ }
13403
13413
  });
13404
13414
  }
13405
13415
  tryOnScopeDispose(() => {
@@ -14002,18 +14012,20 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
14002
14012
  });
14003
14013
  }
14004
14014
  function getTimeAgoIntlResult(from, options = {}, now2 = Date.now()) {
14015
+ var _options$units;
14005
14016
  const { locale, relativeTimeFormatOptions = { numeric: "auto" } } = options;
14006
14017
  const rtf = new Intl.RelativeTimeFormat(locale, relativeTimeFormatOptions);
14007
14018
  const { locale: resolvedLocale } = rtf.resolvedOptions();
14008
14019
  const diff = +from - +now2;
14009
14020
  const absDiff = Math.abs(diff);
14010
- for (const { name, ms } of UNITS) if (absDiff >= ms) return {
14021
+ const units = (_options$units = options.units) !== null && _options$units !== void 0 ? _options$units : UNITS;
14022
+ for (const { name, ms } of units) if (absDiff >= ms) return {
14011
14023
  resolvedLocale,
14012
14024
  parts: rtf.formatToParts(Math.round(diff / ms), name)
14013
14025
  };
14014
14026
  return {
14015
14027
  resolvedLocale,
14016
- parts: rtf.formatToParts(0, "second")
14028
+ parts: rtf.formatToParts(0, units[units.length - 1].name)
14017
14029
  };
14018
14030
  }
14019
14031
  function formatTimeAgoIntlParts(parts, options = {}) {
@@ -14890,7 +14902,8 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
14890
14902
  const { retries = -1, delay: delay2 = 1e3, onFailed } = resolveNestedOptions(options.autoReconnect);
14891
14903
  if ((typeof retries === "function" ? retries : () => typeof retries === "number" && (retries < 0 || retried < retries))(retried)) {
14892
14904
  retried += 1;
14893
- retryTimeout = setTimeout(_init, delay2);
14905
+ const delayTime = typeof delay2 === "function" ? delay2(retried) : delay2;
14906
+ retryTimeout = setTimeout(_init, delayTime);
14894
14907
  } else onFailed === null || onFailed === void 0 || onFailed();
14895
14908
  }
14896
14909
  };
@@ -15418,7 +15431,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
15418
15431
  "class": ["fa-dialog__header-icon", state.loading ? "fa__click__disabled fa__click__disabled__cursor " : "fa__hover__twinkle"],
15419
15432
  "onClick": handleFullscreen
15420
15433
  }, [vue.createVNode(ElementPlus2.ElIcon, null, {
15421
- default: () => [state.fullscreen ? vue.createVNode(FastElementPlusIconsVue2.FullScreenExit, null, null) : vue.createVNode(ElementPlusIconsVue2.FullScreen, null, null)]
15434
+ default: () => [state.fullscreen ? vue.createVNode(FastElementPlusIconsVue2.FullScreenExit, null, null) : vue.createVNode(FastElementPlusIconsVue2.FullScreen, null, null)]
15422
15435
  })]), props.showClose && vue.createVNode("div", {
15423
15436
  "title": "关闭",
15424
15437
  "class": ["fa-dialog__header-icon", state.loading ? "fa__click__disabled fa__click__disabled__cursor " : "fa__hover__twinkle"],
@@ -15684,7 +15697,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
15684
15697
  "class": ["fa-drawer__header-icon", state.loading ? "fa__click__disabled fa__click__disabled__cursor " : "fa__hover__twinkle"],
15685
15698
  "onClick": handleFullscreen
15686
15699
  }, [vue.createVNode(ElementPlus2.ElIcon, null, {
15687
- default: () => [state.fullscreen ? vue.createVNode(FastElementPlusIconsVue2.FullScreenExit, null, null) : vue.createVNode(ElementPlusIconsVue2.FullScreen, null, null)]
15700
+ default: () => [state.fullscreen ? vue.createVNode(FastElementPlusIconsVue2.FullScreenExit, null, null) : vue.createVNode(FastElementPlusIconsVue2.FullScreen, null, null)]
15688
15701
  })]), props.showClose && vue.createVNode("div", {
15689
15702
  "title": "关闭",
15690
15703
  "class": ["fa-drawer__header-icon", state.loading ? "fa__click__disabled fa__click__disabled__cursor " : "fa__hover__twinkle"],
@@ -16608,6 +16621,8 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
16608
16621
  type: Boolean,
16609
16622
  default: true
16610
16623
  },
16624
+ /** @description Base64图片 */
16625
+ base64: Boolean,
16611
16626
  /** @description 原图 */
16612
16627
  original: Boolean,
16613
16628
  /** @description 标准 */
@@ -16634,7 +16649,9 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
16634
16649
  const state = vue.reactive({
16635
16650
  src: vue.computed(() => {
16636
16651
  if (!props.src) return void 0;
16637
- if (props.original) {
16652
+ if (props.base64) {
16653
+ return `data:image/png;base64,${props.src}`;
16654
+ } else if (props.original) {
16638
16655
  return props.src;
16639
16656
  } else if (props.normal) {
16640
16657
  return `${props.src}@!normal`;
@@ -16646,7 +16663,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
16646
16663
  return `${props.src}@!thumb`;
16647
16664
  }
16648
16665
  }),
16649
- previewList: vue.computed(() => props.preview ? [props.src] : [])
16666
+ previewList: vue.computed(() => props.preview ? [props.base64 ? `data:image/png;base64,${props.src}` : props.src] : [])
16650
16667
  });
16651
16668
  const bindProps = utils.useProps(props, ElementPlus2.imageProps, ["src", "previewSrcList"]);
16652
16669
  utils.useRender(() => vue.createVNode(ElementPlus2.ElImage, vue.mergeProps(bindProps.value, {
@@ -18302,7 +18319,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
18302
18319
  filterData = enumData.find((item) => item[value] === callValue);
18303
18320
  }
18304
18321
  if (type === "tag") {
18305
- return filterData?.type ?? "primary";
18322
+ return filterData?.type ?? "info";
18306
18323
  }
18307
18324
  return filterData ? filterData[label] : null;
18308
18325
  },
@@ -18438,7 +18455,6 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
18438
18455
  searchParam: {},
18439
18456
  searchValueUpdate: "",
18440
18457
  searchForm: props.searchForm,
18441
- hideImage: vue.computed(() => props.hideImage),
18442
18458
  selected: false,
18443
18459
  selectedList: [],
18444
18460
  selectedListIds: vue.computed(() => state.selectedList.map((item) => isFunction(props.rowKey) ? props.rowKey(item) : item[props.rowKey])),
@@ -18598,7 +18614,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
18598
18614
  handleTableColumnAutoWidth();
18599
18615
  };
18600
18616
  const loadTableColumns = () => {
18601
- let columns = props.columns;
18617
+ let columns = props.columns ? props.columns : [];
18602
18618
  columns.forEach((col) => {
18603
18619
  if (col.pureSearch || col.search) {
18604
18620
  col.search.key ??= col.prop;
@@ -18940,6 +18956,8 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
18940
18956
  _children: {
18941
18957
  type: utils.definePropType(Array)
18942
18958
  },
18959
+ /** @description 隐藏图片 */
18960
+ hideImage: Boolean,
18943
18961
  /** @description 复制 */
18944
18962
  copy: Boolean,
18945
18963
  /** @description 是否为 Link Button */
@@ -19276,7 +19294,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
19276
19294
  }),
19277
19295
  default: ({
19278
19296
  row
19279
- }) => row[props.prop] ? tableState.hideImage ? vue.createVNode(ElementPlus2.ElImage, {
19297
+ }) => row[props.prop] ? props.hideImage ? vue.createVNode(ElementPlus2.ElImage, {
19280
19298
  "class": "fa-image",
19281
19299
  "lazy": true,
19282
19300
  "src": artwork,
@@ -19308,7 +19326,11 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
19308
19326
  header: ({
19309
19327
  column,
19310
19328
  $index
19311
- }) => headerRender({
19329
+ }) => slots.header ? slots.header({
19330
+ column: columnCtx.value,
19331
+ $index,
19332
+ ...getTableDefaultSlots(tableState)
19333
+ }) : headerRender({
19312
19334
  column,
19313
19335
  $index
19314
19336
  }),
@@ -19316,10 +19338,27 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
19316
19338
  row,
19317
19339
  column,
19318
19340
  $index
19319
- }) => defaultRender({
19341
+ }) => slots.default ? slots.default({
19342
+ row,
19343
+ column: columnCtx.value,
19344
+ $index,
19345
+ ...getTableDefaultSlots(tableState)
19346
+ }) : defaultRender({
19320
19347
  row,
19321
19348
  column,
19322
19349
  $index
19350
+ }),
19351
+ filterIcon: ({
19352
+ filterOpened
19353
+ }) => slots.filterIcon && slots.filterIcon({
19354
+ filterOpened,
19355
+ ...getTableDefaultSlots(tableState)
19356
+ }),
19357
+ expand: ({
19358
+ expanded
19359
+ }) => slots.expand && slots.expand({
19360
+ expanded,
19361
+ ...getTableDefaultSlots(tableState)
19323
19362
  })
19324
19363
  })
19325
19364
  )
@@ -22136,28 +22175,10 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
22136
22175
  });
22137
22176
  };
22138
22177
  const handleChange = async () => {
22139
- if (props.change) {
22140
- if (state.change) {
22141
- await props.change(tableState.orgColumns.map((m) => ({
22142
- columnID: m.columnID,
22143
- label: m.label,
22144
- fixed: m.fixed,
22145
- width: m.width,
22146
- smallWidth: m.smallWidth,
22147
- order: m.order,
22148
- sortable: m.sortable,
22149
- copy: m.copy,
22150
- autoWidth: m.autoWidth,
22151
- show: m.show,
22152
- search: {
22153
- label: m.search?.label,
22154
- order: m.search?.order
22155
- }
22156
- })));
22157
- ElementPlus2.ElMessage.success("保存列配置成功");
22158
- } else {
22159
- ElementPlus2.ElMessage.info("列配置未发生变化");
22160
- }
22178
+ if (state.change) {
22179
+ props.change && await props.change(tableState.orgColumns);
22180
+ } else {
22181
+ ElementPlus2.ElMessage.info("列配置未发生变化");
22161
22182
  }
22162
22183
  };
22163
22184
  const handleConfirmClick = () => {
@@ -23147,7 +23168,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
23147
23168
  /** @description 列配置 */
23148
23169
  columns: {
23149
23170
  type: utils.definePropType([Array, Boolean]),
23150
- default: () => []
23171
+ default: () => false
23151
23172
  },
23152
23173
  /** @description 表格列改变 */
23153
23174
  columnsChange: {
@@ -23164,6 +23185,16 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
23164
23185
  xl: 6
23165
23186
  })
23166
23187
  },
23188
+ /** @description 折叠搜素 */
23189
+ collapsedSearch: {
23190
+ type: Boolean,
23191
+ default: true
23192
+ },
23193
+ /** @description 高级搜素抽屉 */
23194
+ advancedSearchDrawer: {
23195
+ type: Boolean,
23196
+ default: false
23197
+ },
23167
23198
  /** @description 搜索表单 */
23168
23199
  searchForm: {
23169
23200
  type: Boolean,
@@ -23559,12 +23590,17 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
23559
23590
  };
23560
23591
  vue.onMounted(async () => {
23561
23592
  state.initParam = props.initParam;
23562
- loadTableColumns();
23563
23593
  defaultSearchTime();
23564
23594
  Object.keys(props.initParam ?? {}).forEach((key) => {
23565
23595
  state.searchParam[key] = props.initParam[key];
23566
23596
  });
23567
23597
  await tableSearch();
23598
+ vue.watch(() => props.columns, async () => {
23599
+ loadTableColumns();
23600
+ }, {
23601
+ deep: true,
23602
+ immediate: true
23603
+ });
23568
23604
  vue.watch(() => props.initParam, () => {
23569
23605
  Object.keys(props.initParam ?? {}).forEach((key) => {
23570
23606
  state.searchParam[key] = props.initParam[key];
@@ -23608,7 +23644,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
23608
23644
  });
23609
23645
  const searchFormSlotNames = vue.computed(() => state.searchColumns.filter((f) => f.search.slot).map((m) => m.search.slot));
23610
23646
  const tableColumnSlotNames = vue.computed(() => state.tableColumns.filter((f) => f.slot).map((m) => m.slot));
23611
- const tableColumnOmitNames = ["multiOrder", "columnID", "order", "sortableField", "disabledSortable", "spanProp", "pureSearch", "search"];
23647
+ const tableColumnOmitNames = ["multiOrder", "columnId", "order", "sortableField", "disabledSortable", "spanProp", "pureSearch", "search"];
23612
23648
  const elTableProps = utils.useProps(props, tableProps, ["data", "spanMethod", "headerCellClassName", "cellClassName"]);
23613
23649
  utils.useRender(() => vue.createVNode("div", {
23614
23650
  "ref": elementRef,
@@ -23621,6 +23657,8 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
23621
23657
  }
23622
23658
  }, [vue.createVNode(TableSearchForm, {
23623
23659
  "show": props.searchForm && state.searchForm,
23660
+ "collapsedSearch": props.collapsedSearch,
23661
+ "advancedSearchDrawer": props.advancedSearchDrawer,
23624
23662
  "cols": props.searchFormCols,
23625
23663
  "search": tableSearch,
23626
23664
  "reset": tableReset
@@ -23681,12 +23719,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
23681
23719
  "teleported": false,
23682
23720
  "unlinkPanels": true,
23683
23721
  "onChange": () => tableSearch()
23684
- }, null), slots.toolButton && slots.toolButton({
23685
- ...{
23686
- search: tableSearch
23687
- },
23688
- ...getTableDefaultSlots(state)
23689
- }), props.refreshBtn && vue.createVNode(ElementPlus2.ElButton, {
23722
+ }, null), props.refreshBtn && vue.createVNode(ElementPlus2.ElButton, {
23690
23723
  "loading": state.loading,
23691
23724
  "loadingIcon": ElementPlusIconsVue2.Eleme,
23692
23725
  "title": "刷新",
@@ -23700,14 +23733,31 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
23700
23733
  "circle": true,
23701
23734
  "icon": ElementPlusIconsVue2.Search,
23702
23735
  "onClick": () => state.searchForm = !state.searchForm
23703
- }, null), props.columnSettingBtn && !props.columns && vue.createVNode(ElementPlus2.ElButton, {
23704
- "loading": state.loading,
23705
- "loadingIcon": ElementPlusIconsVue2.Eleme,
23736
+ }, null), props.columnSettingBtn && props.columns && vue.createVNode(ElementPlus2.ElDropdown, {
23706
23737
  "title": "表格列配置",
23707
- "circle": true,
23708
- "icon": ElementPlusIconsVue2.Setting,
23709
- "onClick": () => columnSettingRef.value.open()
23710
- }, null), slots.toolButtonAdv && vue.createVNode(ElementPlus2.ElDropdown, {
23738
+ "trigger": "click"
23739
+ }, {
23740
+ default: () => vue.createVNode(ElementPlus2.ElButton, {
23741
+ "loading": state.loading,
23742
+ "loadingIcon": ElementPlusIconsVue2.Eleme,
23743
+ "circle": true,
23744
+ "icon": ElementPlusIconsVue2.Setting
23745
+ }, null),
23746
+ dropdown: () => vue.createVNode(ElementPlus2.ElDropdownMenu, null, {
23747
+ default: () => [slots.columnSetting && slots.columnSetting(), vue.createVNode(ElementPlus2.ElDropdownItem, {
23748
+ "title": "表格列配置",
23749
+ "divided": true,
23750
+ "onClick": () => columnSettingRef.value.open()
23751
+ }, {
23752
+ default: () => [vue.createTextVNode("表格列配置")]
23753
+ })]
23754
+ })
23755
+ }), slots.toolButton && slots.toolButton({
23756
+ ...{
23757
+ search: tableSearch
23758
+ },
23759
+ ...getTableDefaultSlots(state)
23760
+ }), slots.toolButtonAdv && vue.createVNode(ElementPlus2.ElDropdown, {
23711
23761
  "title": "高级操作",
23712
23762
  "trigger": "click"
23713
23763
  }, {
@@ -23830,6 +23880,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
23830
23880
  ...getTableDefaultSlots(state)
23831
23881
  })])
23832
23882
  }) : col.prop && vue.createVNode(TableColumn, vue.mergeProps(omit(col, tableColumnOmitNames), {
23883
+ "hideImage": props.hideImage,
23833
23884
  "resizable": true,
23834
23885
  "onImagePreview": handleImagePreview,
23835
23886
  "onCustomCellClick": handleCustomCellClick
@@ -23863,9 +23914,9 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
23863
23914
  "teleported": true,
23864
23915
  "onClose": () => state.imagePreview = false,
23865
23916
  "urlList": state.previewList
23866
- }, null), vue.createVNode(TableColumnsSettingDialog, {
23917
+ }, null), props.columnSettingBtn && vue.createVNode(TableColumnsSettingDialog, {
23867
23918
  "ref": columnSettingRef,
23868
- "save": props.columnsChange
23919
+ "change": props.columnsChange
23869
23920
  }, null)]));
23870
23921
  return utils.useExpose(expose, {
23871
23922
  /** @description 用于多选表格,清空用户的选择 */
@@ -28254,7 +28305,7 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
28254
28305
  }
28255
28306
  app.use(ElementPlus2);
28256
28307
  };
28257
- const version$1 = "1.0.2";
28308
+ const version$1 = "1.0.4";
28258
28309
  const INSTALLED_KEY = Symbol("INSTALLED_KEY");
28259
28310
  const makeInstaller = () => {
28260
28311
  const install2 = (app) => {
@@ -28317,6 +28368,8 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
28317
28368
  faSelectPageProps,
28318
28369
  faSelectProps,
28319
28370
  faSelectV2Props,
28371
+ faTableEmits,
28372
+ faTableProps,
28320
28373
  faTreeEmits,
28321
28374
  faTreeProps,
28322
28375
  faTreeSelectEmits,
@@ -28383,6 +28436,8 @@ var FastElementPlus = (function(exports, FastElementPlusIconsVue2, utils, vue, E
28383
28436
  exports.faSelectPageProps = faSelectPageProps;
28384
28437
  exports.faSelectProps = faSelectProps;
28385
28438
  exports.faSelectV2Props = faSelectV2Props;
28439
+ exports.faTableEmits = faTableEmits;
28440
+ exports.faTableProps = faTableProps;
28386
28441
  exports.faTreeEmits = faTreeEmits;
28387
28442
  exports.faTreeProps = faTreeProps;
28388
28443
  exports.faTreeSelectEmits = faTreeSelectEmits;