@wfrog/vc-ui 1.11.6 → 1.11.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.
@@ -22,5 +22,5 @@ export interface IExplorerTableEmits {
22
22
  (e: 'singleSelectionChange', row: Record<string, any>): void;
23
23
  (e: 'multipleSelectionChange', row: Record<string, any>, values: Array<string | number>): void;
24
24
  (e: 'selectionChange', rows: Record<string, any>[]): void;
25
- (e: 'selectAll', values: Array<string | number>): void;
25
+ (e: 'selectAll', checked: boolean, values: Array<string | number>): void;
26
26
  }
@@ -7,6 +7,7 @@ import '../../chunk/NsldgdCh.mjs';
7
7
  import '../../chunk/CoGexPPD.mjs';
8
8
  import '../../chunk/CjLR27-a.mjs';
9
9
  import { defineComponent, h, useCssModule, useTemplateRef, computed, ref, watch, withDirectives, createElementBlock, openBlock, normalizeClass, unref, createVNode, mergeProps, createSlots, withCtx, createBlock, createCommentVNode, renderSlot, withModifiers, isRef, Fragment, renderList, createTextVNode, toDisplayString, resolveDynamicComponent } from 'vue';
10
+ import { promiseTimeout } from '@vueuse/core';
10
11
  import { ElTableColumn, ElRadio, ElCheckbox } from 'element-plus';
11
12
  import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
12
13
  import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
@@ -58,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
58
59
  props.data.forEach((row) => {
59
60
  row[props.multipleCheckedKey] = val;
60
61
  });
61
- emits("selectAll", Array.from(selectedValues.value));
62
+ emits("selectAll", val, Array.from(selectedValues.value));
62
63
  }
63
64
  });
64
65
  const indeterminate = computed(() => {
@@ -85,7 +86,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
85
86
  emits("singleSelectionChange", row);
86
87
  }
87
88
  }
88
- function handleCheckboxClick(row) {
89
+ async function handleCheckboxClick(row) {
90
+ await promiseTimeout(0);
89
91
  emits("multipleSelectionChange", row, Array.from(selectedValues.value));
90
92
  }
91
93
  function columnType(item) {
@@ -2968,13 +2968,13 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerTableProps
2968
2968
  singleSelectionChange: (row: Record<string, any>) => any;
2969
2969
  multipleSelectionChange: (row: Record<string, any>, values: (string | number)[]) => any;
2970
2970
  selectionChange: (rows: Record<string, any>[]) => any;
2971
- selectAll: (values: (string | number)[]) => any;
2971
+ selectAll: (checked: boolean, values: (string | number)[]) => any;
2972
2972
  }, string, import('vue').PublicProps, Readonly<IExplorerTableProps> & Readonly<{
2973
2973
  onColumnEvent?: ((column: IColumnConfig, row: Record<string, any>, value: Record<string, any>) => any) | undefined;
2974
2974
  onSingleSelectionChange?: ((row: Record<string, any>) => any) | undefined;
2975
2975
  onMultipleSelectionChange?: ((row: Record<string, any>, values: (string | number)[]) => any) | undefined;
2976
2976
  onSelectionChange?: ((rows: Record<string, any>[]) => any) | undefined;
2977
- onSelectAll?: ((values: (string | number)[]) => any) | undefined;
2977
+ onSelectAll?: ((checked: boolean, values: (string | number)[]) => any) | undefined;
2978
2978
  }>, {
2979
2979
  loading: boolean;
2980
2980
  loadingText: string;
package/dist/es/index.mjs CHANGED
@@ -160,7 +160,7 @@ const __vite_glob_0_49 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePr
160
160
  default: _sfc_main$8
161
161
  }, Symbol.toStringTag, { value: 'Module' }));
162
162
 
163
- const version = "1.11.6";
163
+ const version = "1.11.8";
164
164
 
165
165
  const modules = /* #__PURE__ */ Object.assign({"./components/awesome-icon/awesome-icon.vue": __vite_glob_0_0,"./components/backbottom/backbottom.vue": __vite_glob_0_1,"./components/button/button.vue": __vite_glob_0_2,"./components/chat-container/chat-container.vue": __vite_glob_0_3,"./components/choice-boolean/choice-boolean.vue": __vite_glob_0_4,"./components/choice/choice.vue": __vite_glob_0_5,"./components/color-switch/color-switch.vue": __vite_glob_0_6,"./components/config-provider/config-provider.vue": __vite_glob_0_7,"./components/cropper/cropper.vue": __vite_glob_0_8,"./components/currency/currency.vue": __vite_glob_0_9,"./components/dark-switch/dark-switch.vue": __vite_glob_0_10,"./components/daterange-picker/daterange-picker.vue": __vite_glob_0_11,"./components/dialog-camera-upload/dialog-camera-upload.vue": __vite_glob_0_12,"./components/dialog-map-point/dialog-map-point.vue": __vite_glob_0_13,"./components/dialog-upload-images/dialog-upload-images.vue": __vite_glob_0_14,"./components/dialog/dialog.vue": __vite_glob_0_15,"./components/drag-verify/drag-verify.vue": __vite_glob_0_16,"./components/drawer/drawer.vue": __vite_glob_0_17,"./components/easy-pagination/easy-pagination.vue": __vite_glob_0_18,"./components/el-icon/el-icon.vue": __vite_glob_0_19,"./components/explorer-column-table/explorer-column-table.vue": __vite_glob_0_20,"./components/explorer-container/explorer-container.vue": __vite_glob_0_21,"./components/explorer-filter/explorer-filter.vue": __vite_glob_0_22,"./components/explorer-footer/explorer-footer.vue": __vite_glob_0_23,"./components/explorer-form/explorer-form.vue": __vite_glob_0_24,"./components/explorer-list/explorer-list.vue": __vite_glob_0_25,"./components/explorer-modal-form/explorer-modal-form.vue": __vite_glob_0_26,"./components/explorer-panel/explorer-panel.vue": __vite_glob_0_27,"./components/explorer-query/explorer-query.vue": __vite_glob_0_28,"./components/explorer-table/explorer-table.vue": __vite_glob_0_29,"./components/explorer-tools/explorer-tools.vue": __vite_glob_0_30,"./components/explorer-tree/explorer-tree.vue": __vite_glob_0_31,"./components/explorer/explorer.vue": __vite_glob_0_32,"./components/flag/flag.vue": __vite_glob_0_33,"./components/form-item/form-item.vue": __vite_glob_0_34,"./components/icon-picker/icon-picker.vue": __vite_glob_0_35,"./components/icon/icon.vue": __vite_glob_0_36,"./components/iconify-icon/iconify-icon.vue": __vite_glob_0_37,"./components/image/image.vue": __vite_glob_0_38,"./components/info-tooltip/info-tooltip.vue": __vite_glob_0_39,"./components/input-number/input-number.vue": __vite_glob_0_40,"./components/input/input.vue": __vite_glob_0_41,"./components/pca-picker/pca-picker.vue": __vite_glob_0_42,"./components/qr-code/qr-code.vue": __vite_glob_0_43,"./components/screenfull/screenfull.vue": __vite_glob_0_44,"./components/scrollbar/scrollbar.vue": __vite_glob_0_45,"./components/select/select.vue": __vite_glob_0_46,"./components/single-player/single-player.vue": __vite_glob_0_47,"./components/splitter-panel/splitter-panel.vue": __vite_glob_0_48,"./components/splitter/splitter.vue": __vite_glob_0_49,"./components/svg-icon/svg-icon.vue": __vite_glob_0_50,"./components/switch/switch.vue": __vite_glob_0_51,"./components/sync-scroll-container/sync-scroll-container.vue": __vite_glob_0_52,"./components/tags/tags.vue": __vite_glob_0_53,"./components/text-ellipsis/text-ellipsis.vue": __vite_glob_0_54,"./components/thousand-input/thousand-input.vue": __vite_glob_0_55,"./components/tinymce/tinymce.vue": __vite_glob_0_56,"./components/transfer-panel/transfer-panel.vue": __vite_glob_0_57,"./components/transfer/transfer.vue": __vite_glob_0_58,"./components/tree-picker/tree-picker.vue": __vite_glob_0_59,"./components/upload-file/upload-file.vue": __vite_glob_0_60});
166
166
  const upper = (_, letter) => letter.toUpperCase();
@@ -1,8 +1,23 @@
1
1
  import { useStorage } from '@vueuse/core';
2
2
  import { getCurrentInstance, computed } from 'vue';
3
3
 
4
+ function getSafeStorage() {
5
+ if (typeof window === "undefined" || !window.localStorage)
6
+ return void 0;
7
+ try {
8
+ new StorageEvent("storage", { storageArea: window.localStorage });
9
+ return void 0;
10
+ } catch {
11
+ console.warn("当前操作不支持 StorageEvent,将使用 localStorage 的同步 API");
12
+ return {
13
+ getItem: (key) => window.localStorage.getItem(key),
14
+ setItem: (key, value) => window.localStorage.setItem(key, value),
15
+ removeItem: (key) => window.localStorage.removeItem(key)
16
+ };
17
+ }
18
+ }
4
19
  function usePersistentModel(key, storageKey, defaultValue, options) {
5
- const storage = useStorage(storageKey, defaultValue, void 0, options);
20
+ const storage = useStorage(storageKey, defaultValue, getSafeStorage(), options);
6
21
  const instance = getCurrentInstance();
7
22
  instance?.emit(`update:${key}`, storage.value);
8
23
  return computed({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wfrog/vc-ui",
3
- "version": "1.11.6",
3
+ "version": "1.11.8",
4
4
  "packageManager": "pnpm@10.20.0",
5
5
  "description": "vue3 组件库 vc-ui",
6
6
  "author": "wellfrog",