@wfrog/vc-ui 1.10.8 → 1.10.10

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.
@@ -3,6 +3,7 @@ import { IColumnConfig } from '../explorer-column-table/explorer-column-table';
3
3
  export interface IExplorerPanelProps {
4
4
  resizable?: boolean;
5
5
  padding?: number;
6
+ commonState?: Record<string, any>;
6
7
  }
7
8
  export interface IExplorerPanelState {
8
9
  fullscreenTarget: Ref<HTMLElement>;
@@ -11,6 +12,7 @@ export interface IExplorerPanelState {
11
12
  actions: Reactive<{
12
13
  saveColumnConfig: () => void;
13
14
  }>;
15
+ commonState: Ref<Record<string, any>>;
14
16
  }
15
17
  export declare const KEY_NAME: unique symbol;
16
18
  export declare const injectExplorerPanelState: () => IExplorerPanelState;
@@ -1,7 +1,7 @@
1
1
  import './index.css'
2
2
  import '../../chunk/Gk1J52Yw.mjs';
3
3
  /* empty css */
4
- import { defineComponent, useCssVars, useTemplateRef, ref, reactive, onMounted, createBlock, openBlock, mergeProps, withCtx, createElementVNode, normalizeClass, renderSlot } from 'vue';
4
+ import { defineComponent, useCssVars, useTemplateRef, ref, reactive, watch, onMounted, onBeforeUnmount, createBlock, openBlock, mergeProps, withCtx, createElementVNode, normalizeClass, renderSlot } from 'vue';
5
5
  import { useProvide } from '../../use/useStore/index.mjs';
6
6
  import { K as KEY_NAME } from './explorer-panel2.mjs';
7
7
  import { a as ElSplitterPanel } from '../../chunk/C0XgBrDz.mjs';
@@ -11,12 +11,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  __name: "explorer-panel",
12
12
  props: {
13
13
  resizable: { type: Boolean, default: false },
14
- padding: { default: 8 }
14
+ padding: { default: 8 },
15
+ commonState: {}
15
16
  },
16
17
  setup(__props) {
17
18
  useCssVars((_ctx) => ({
18
- "v661a71b4": `${_ctx.padding}px`
19
+ "e4d70126": `${_ctx.padding}px`
19
20
  }));
21
+ const props = __props;
20
22
  const panelRef = useTemplateRef("panelRef");
21
23
  const fullscreenTarget = ref();
22
24
  const columnConfig = ref([]);
@@ -25,17 +27,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
25
27
  saveColumnConfig: () => {
26
28
  }
27
29
  });
30
+ const commonState = ref();
28
31
  useProvide(KEY_NAME, {
29
32
  fullscreenTarget,
30
33
  columnConfig,
31
34
  filterKeyword,
32
- actions
35
+ actions,
36
+ commonState
33
37
  });
38
+ const commonStateWatch = watch(() => props.commonState, () => {
39
+ commonState.value = props.commonState;
40
+ }, { immediate: true, deep: true });
34
41
  onMounted(() => {
35
42
  if (panelRef.value?.splitterPanelRef) {
36
43
  fullscreenTarget.value = panelRef.value.splitterPanelRef;
37
44
  }
38
45
  });
46
+ onBeforeUnmount(() => commonStateWatch.stop());
39
47
  return (_ctx, _cache) => {
40
48
  const _component_ElSplitterPanel = ElSplitterPanel;
41
49
  return openBlock(), createBlock(_component_ElSplitterPanel, mergeProps({
@@ -9,7 +9,7 @@
9
9
  ._container_1egb6_9 {
10
10
  display: flex;
11
11
  flex-direction: column;
12
- padding: var(--v661a71b4);
12
+ padding: var(--e4d70126);
13
13
  flex-grow: 1;
14
14
  height: 100px;
15
15
  }
@@ -1,4 +1,5 @@
1
1
  import { SFCWithInstall } from '../../utils/typescript';
2
2
  import { default as Component } from './explorer-panel.vue';
3
+ export * from './explorer-panel';
3
4
  export declare const VcExplorerPanel: SFCWithInstall<typeof Component>;
4
5
  export default VcExplorerPanel;
@@ -1,5 +1,6 @@
1
1
  import { w as withInstall } from '../../chunk/DZ5W9TaA.mjs';
2
2
  import { C as Component } from './explorer-panel.mjs';
3
+ export { K as KEY_NAME, i as injectExplorerPanelState } from './explorer-panel2.mjs';
3
4
 
4
5
  const VcExplorerPanel = withInstall(Component);
5
6
 
@@ -6,7 +6,7 @@ import '../../chunk/DBf73TLo.mjs';
6
6
  /* empty css */
7
7
  import '../../chunk/BH1e_-Fa.mjs';
8
8
  import '../../chunk/CqhShW5K.mjs';
9
- import { defineComponent, h, computed, watch, withDirectives, createElementBlock, openBlock, normalizeClass, createVNode, mergeProps, createSlots, withCtx, createBlock, createCommentVNode, renderSlot, unref, Fragment, renderList, createTextVNode, toDisplayString, resolveDynamicComponent } from 'vue';
9
+ import { defineComponent, h, computed, watch, nextTick, withDirectives, createElementBlock, openBlock, normalizeClass, createVNode, mergeProps, createSlots, withCtx, createBlock, createCommentVNode, renderSlot, unref, Fragment, renderList, createTextVNode, toDisplayString, resolveDynamicComponent } from 'vue';
10
10
  import { ElTableColumn } from 'element-plus';
11
11
  import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
12
12
  import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
@@ -57,8 +57,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
57
  }
58
58
  }
59
59
  __expose({
60
- setColumns: (columns2) => {
60
+ setColumns: async (columns2) => {
61
61
  state.columnConfig.value = columns2;
62
+ await nextTick();
62
63
  state.actions.saveColumnConfig();
63
64
  }
64
65
  });
@@ -18,7 +18,7 @@ declare function __VLS_template(): {
18
18
  };
19
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
20
  declare const __VLS_component: import('vue').DefineComponent<IExplorerTableProps, {
21
- setColumns: (columns: IColumnConfig[]) => void;
21
+ setColumns: (columns: IColumnConfig[]) => Promise<void>;
22
22
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
23
23
  columnEvent: (column: IColumnConfig, row: Record<string, any>, value: Record<string, any>) => any;
24
24
  }, string, import('vue').PublicProps, Readonly<IExplorerTableProps> & Readonly<{
@@ -1,3 +1,4 @@
1
+ import { IColumnConfig } from '../../explorer-column-table/explorer-column-table';
1
2
  import { IColumnSetterProps } from '../explorer-tools';
2
3
  declare function __VLS_template(): {
3
4
  attrs: Partial<{}>;
@@ -9,14 +10,14 @@ declare function __VLS_template(): {
9
10
  $: import('vue').ComponentInternalInstance;
10
11
  $data: {};
11
12
  $props: {
12
- readonly data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[];
13
+ readonly data: IColumnConfig[];
13
14
  readonly size?: "small" | "default" | "large" | undefined;
14
15
  readonly mode?: "easy" | "full" | undefined;
15
16
  readonly highlightCurrent?: boolean | undefined;
16
17
  readonly height?: number | string | undefined;
17
18
  readonly emptyColumn?: boolean | undefined;
18
19
  readonly editable?: boolean | undefined;
19
- readonly "onUpdate:data"?: ((data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any) | undefined;
20
+ readonly "onUpdate:data"?: ((data: IColumnConfig[]) => any) | undefined;
20
21
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
21
22
  $attrs: {
22
23
  [x: string]: unknown;
@@ -1501,10 +1502,10 @@ declare function __VLS_template(): {
1501
1502
  $root: ComponentPublicInstance | null;
1502
1503
  $parent: ComponentPublicInstance | null;
1503
1504
  $host: Element | null;
1504
- $emit: (event: "update:data", data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => void;
1505
+ $emit: (event: "update:data", data: IColumnConfig[]) => void;
1505
1506
  $el: any;
1506
1507
  $options: import('vue').ComponentOptionsBase<Readonly<import('../../explorer-column-table/explorer-column-table').IExplorerColumnTableProps> & Readonly<{
1507
- "onUpdate:data"?: ((data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any) | undefined;
1508
+ "onUpdate:data"?: ((data: IColumnConfig[]) => any) | undefined;
1508
1509
  }>, {
1509
1510
  init: () => void;
1510
1511
  tableRef: Readonly<globalThis.ShallowRef<import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
@@ -2991,7 +2992,7 @@ declare function __VLS_template(): {
2991
2992
  truncate: number;
2992
2993
  };
2993
2994
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
2994
- "update:data": (data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any;
2995
+ "update:data": (data: IColumnConfig[]) => any;
2995
2996
  }, string, {
2996
2997
  mode: "easy" | "full";
2997
2998
  size: "small" | "default" | "large";
@@ -3027,7 +3028,7 @@ declare function __VLS_template(): {
3027
3028
  highlightCurrent: boolean;
3028
3029
  emptyColumn: boolean;
3029
3030
  }> & Omit<Readonly<import('../../explorer-column-table/explorer-column-table').IExplorerColumnTableProps> & Readonly<{
3030
- "onUpdate:data"?: ((data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any) | undefined;
3031
+ "onUpdate:data"?: ((data: IColumnConfig[]) => any) | undefined;
3031
3032
  }>, "init" | ("mode" | "size" | "height" | "editable" | "highlightCurrent" | "emptyColumn") | "tableRef" | "rerender" | "setWidthConfig" | "getWidthConfig"> & import('vue').ShallowUnwrapRef<{
3032
3033
  init: () => void;
3033
3034
  tableRef: Readonly<globalThis.ShallowRef<import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
@@ -4525,27 +4526,27 @@ declare function __VLS_template(): {
4525
4526
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
4526
4527
  declare const __VLS_component: import('vue').DefineComponent<IColumnSetterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
4527
4528
  reset: () => any;
4528
- "update:data": (data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any;
4529
- configConfirm: (data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any;
4529
+ "update:data": (data: IColumnConfig[]) => any;
4530
+ configConfirm: (data: IColumnConfig[]) => any;
4530
4531
  }, string, import('vue').PublicProps, Readonly<IColumnSetterProps> & Readonly<{
4531
4532
  onReset?: (() => any) | undefined;
4532
- "onUpdate:data"?: ((data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any) | undefined;
4533
- onConfigConfirm?: ((data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any) | undefined;
4533
+ "onUpdate:data"?: ((data: IColumnConfig[]) => any) | undefined;
4534
+ onConfigConfirm?: ((data: IColumnConfig[]) => any) | undefined;
4534
4535
  }>, {
4535
- data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[];
4536
+ data: IColumnConfig[];
4536
4537
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
4537
4538
  columnTableRef: ({
4538
4539
  $: import('vue').ComponentInternalInstance;
4539
4540
  $data: {};
4540
4541
  $props: {
4541
- readonly data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[];
4542
+ readonly data: IColumnConfig[];
4542
4543
  readonly size?: "small" | "default" | "large" | undefined;
4543
4544
  readonly mode?: "easy" | "full" | undefined;
4544
4545
  readonly highlightCurrent?: boolean | undefined;
4545
4546
  readonly height?: number | string | undefined;
4546
4547
  readonly emptyColumn?: boolean | undefined;
4547
4548
  readonly editable?: boolean | undefined;
4548
- readonly "onUpdate:data"?: ((data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any) | undefined;
4549
+ readonly "onUpdate:data"?: ((data: IColumnConfig[]) => any) | undefined;
4549
4550
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
4550
4551
  $attrs: {
4551
4552
  [x: string]: unknown;
@@ -6030,10 +6031,10 @@ declare const __VLS_component: import('vue').DefineComponent<IColumnSetterProps,
6030
6031
  $root: ComponentPublicInstance | null;
6031
6032
  $parent: ComponentPublicInstance | null;
6032
6033
  $host: Element | null;
6033
- $emit: (event: "update:data", data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => void;
6034
+ $emit: (event: "update:data", data: IColumnConfig[]) => void;
6034
6035
  $el: any;
6035
6036
  $options: import('vue').ComponentOptionsBase<Readonly<import('../../explorer-column-table/explorer-column-table').IExplorerColumnTableProps> & Readonly<{
6036
- "onUpdate:data"?: ((data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any) | undefined;
6037
+ "onUpdate:data"?: ((data: IColumnConfig[]) => any) | undefined;
6037
6038
  }>, {
6038
6039
  init: () => void;
6039
6040
  tableRef: Readonly<globalThis.ShallowRef<import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
@@ -7520,7 +7521,7 @@ declare const __VLS_component: import('vue').DefineComponent<IColumnSetterProps,
7520
7521
  truncate: number;
7521
7522
  };
7522
7523
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7523
- "update:data": (data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any;
7524
+ "update:data": (data: IColumnConfig[]) => any;
7524
7525
  }, string, {
7525
7526
  mode: "easy" | "full";
7526
7527
  size: "small" | "default" | "large";
@@ -7556,7 +7557,7 @@ declare const __VLS_component: import('vue').DefineComponent<IColumnSetterProps,
7556
7557
  highlightCurrent: boolean;
7557
7558
  emptyColumn: boolean;
7558
7559
  }> & Omit<Readonly<import('../../explorer-column-table/explorer-column-table').IExplorerColumnTableProps> & Readonly<{
7559
- "onUpdate:data"?: ((data: import('../../explorer-column-table/explorer-column-table').IColumnConfig[]) => any) | undefined;
7560
+ "onUpdate:data"?: ((data: IColumnConfig[]) => any) | undefined;
7560
7561
  }>, "init" | ("mode" | "size" | "height" | "editable" | "highlightCurrent" | "emptyColumn") | "tableRef" | "rerender" | "setWidthConfig" | "getWidthConfig"> & import('vue').ShallowUnwrapRef<{
7561
7562
  init: () => void;
7562
7563
  tableRef: Readonly<globalThis.ShallowRef<import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
@@ -298,12 +298,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
298
298
  const isFullMode = computed(() => mode.value === "full");
299
299
  const popoverWidth = computed(() => isFullMode.value ? "800px" : "270px");
300
300
  const isInit = ref(false);
301
- function onHide() {
302
- emits("configConfirm", myData.value);
301
+ function onHide(columnConfig) {
302
+ const columnConfigData = columnConfig || myData.value;
303
+ emits("configConfirm", columnConfigData);
303
304
  if (!props.columnToStorage) {
304
305
  return;
305
306
  }
306
- index.set(columnStorageKey, myData.value);
307
+ index.set(columnStorageKey, columnConfigData);
307
308
  }
308
309
  function loadConfig() {
309
310
  if (props.columnToStorage) {
package/dist/es/index.mjs CHANGED
@@ -156,7 +156,7 @@ const __vite_glob_0_47 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePr
156
156
  default: _sfc_main$8
157
157
  }, Symbol.toStringTag, { value: 'Module' }));
158
158
 
159
- const version = "1.10.8";
159
+ const version = "1.10.10";
160
160
 
161
161
  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/icon-picker/icon-picker.vue": __vite_glob_0_34,"./components/icon/icon.vue": __vite_glob_0_35,"./components/iconify-icon/iconify-icon.vue": __vite_glob_0_36,"./components/image/image.vue": __vite_glob_0_37,"./components/input-number/input-number.vue": __vite_glob_0_38,"./components/input/input.vue": __vite_glob_0_39,"./components/pca-picker/pca-picker.vue": __vite_glob_0_40,"./components/qr-code/qr-code.vue": __vite_glob_0_41,"./components/screenfull/screenfull.vue": __vite_glob_0_42,"./components/scrollbar/scrollbar.vue": __vite_glob_0_43,"./components/select/select.vue": __vite_glob_0_44,"./components/single-player/single-player.vue": __vite_glob_0_45,"./components/splitter-panel/splitter-panel.vue": __vite_glob_0_46,"./components/splitter/splitter.vue": __vite_glob_0_47,"./components/svg-icon/svg-icon.vue": __vite_glob_0_48,"./components/switch/switch.vue": __vite_glob_0_49,"./components/sync-scroll-container/sync-scroll-container.vue": __vite_glob_0_50,"./components/tags/tags.vue": __vite_glob_0_51,"./components/text-ellipsis/text-ellipsis.vue": __vite_glob_0_52,"./components/thousand-input/thousand-input.vue": __vite_glob_0_53,"./components/tinymce/tinymce.vue": __vite_glob_0_54,"./components/transfer-panel/transfer-panel.vue": __vite_glob_0_55,"./components/transfer/transfer.vue": __vite_glob_0_56,"./components/tree-picker/tree-picker.vue": __vite_glob_0_57,"./components/upload-file/upload-file.vue": __vite_glob_0_58});
162
162
  const upper = (_, letter) => letter.toUpperCase();
package/dist/index.css CHANGED
@@ -788,7 +788,7 @@ div._main_k37nc_1 ._header_k37nc_48 {
788
788
  ._container_1egb6_9 {
789
789
  display: flex;
790
790
  flex-direction: column;
791
- padding: var(--v661a71b4);
791
+ padding: var(--e4d70126);
792
792
  flex-grow: 1;
793
793
  height: 100px;
794
794
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wfrog/vc-ui",
3
- "version": "1.10.8",
3
+ "version": "1.10.10",
4
4
  "packageManager": "pnpm@10.20.0",
5
5
  "description": "vue3 组件库 vc-ui",
6
6
  "author": "wellfrog",
@@ -27,6 +27,11 @@
27
27
  "types": "./dist/es/directives/*/index.d.ts",
28
28
  "default": "./dist/es/directives/*/index.mjs"
29
29
  },
30
+ "./es/use/*/type": "./dist/es/use/*/index.d.ts",
31
+ "./es/use/*": {
32
+ "types": "./dist/es/use/*/index.d.ts",
33
+ "default": "./dist/es/use/*/index.mjs"
34
+ },
30
35
  "./resolver": {
31
36
  "types": "./dist/es/utils/resolver.d.ts",
32
37
  "default": "./dist/es/utils/resolver.mjs"