@robot-admin/naive-ui-components 0.11.3 → 0.11.5

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 (84) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +35 -0
  3. package/README_EN.md +34 -0
  4. package/SECURITY.md +1 -0
  5. package/dist/C_Form.d.cts +2 -2
  6. package/dist/C_Form.d.ts +2 -2
  7. package/dist/C_Form2.cjs +1 -1
  8. package/dist/C_Form2.js +1 -1
  9. package/dist/C_Map.cjs +1 -1
  10. package/dist/C_Map.css +8 -8
  11. package/dist/C_Map.d.cts +2 -2
  12. package/dist/C_Map.d.ts +2 -2
  13. package/dist/C_Map.js +1 -1
  14. package/dist/C_Map2.cjs +1 -1
  15. package/dist/C_Map2.js +1 -1
  16. package/dist/C_Table.d.ts +1 -0
  17. package/dist/constants3.d.cts +1 -1
  18. package/dist/constants3.d.ts +1 -1
  19. package/dist/constants4.d.cts +1 -1
  20. package/dist/constants4.d.ts +1 -1
  21. package/dist/images/layers-2x.png +0 -0
  22. package/dist/images/layers.png +0 -0
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.d.cts +3 -3
  25. package/dist/index.d.ts +4 -3
  26. package/dist/index.js +1 -1
  27. package/dist/index13.vue.d.ts +2 -2
  28. package/dist/index14.vue.d.cts +2 -2
  29. package/dist/index14.vue.d.ts +1 -1
  30. package/dist/index15.vue.d.cts +1 -1
  31. package/dist/index17.vue.d.ts +1 -1
  32. package/dist/index18.vue.d.cts +1 -1
  33. package/dist/index18.vue.d.ts +1 -1
  34. package/dist/index19.vue.d.cts +1 -1
  35. package/dist/index19.vue.d.ts +1 -1
  36. package/dist/index2.vue.d.cts +1 -1
  37. package/dist/index2.vue.d.ts +1 -1
  38. package/dist/index21.vue.d.cts +1 -1
  39. package/dist/index21.vue.d.ts +1 -1
  40. package/dist/index22.vue.d.cts +2 -2
  41. package/dist/index22.vue.d.ts +2 -2
  42. package/dist/index24.vue.d.cts +1 -1
  43. package/dist/index24.vue.d.ts +1 -1
  44. package/dist/index25.vue.d.cts +1 -1
  45. package/dist/index25.vue.d.ts +1 -1
  46. package/dist/index26.vue.d.cts +3 -3
  47. package/dist/index26.vue.d.ts +3 -3
  48. package/dist/index3.vue.d.cts +2 -2
  49. package/dist/index3.vue.d.ts +2 -2
  50. package/dist/index5.vue.d.cts +1 -1
  51. package/dist/index7.vue.d.ts +1 -1
  52. package/dist/index8.vue.d.cts +1 -1
  53. package/dist/mapUtils.d.cts +135 -0
  54. package/dist/mapUtils.d.ts +135 -0
  55. package/dist/style.css +8 -8
  56. package/dist/useCollapsePanel.d.cts +3 -3
  57. package/dist/useCollapsePanel.d.ts +3 -3
  58. package/dist/useCropperCore.d.cts +6 -6
  59. package/dist/useCropperCore.d.ts +6 -6
  60. package/dist/useDraggableLayout.d.cts +5 -5
  61. package/dist/useDraggableLayout.d.ts +5 -5
  62. package/dist/useDynamicFormState.d.cts +41 -22
  63. package/dist/useDynamicFormState.d.ts +41 -22
  64. package/dist/useFullscreen.d.cts +2 -2
  65. package/dist/useFullscreen.d.ts +2 -2
  66. package/dist/useInfiniteScroll.d.cts +2 -2
  67. package/dist/useInfiniteScroll.d.ts +2 -2
  68. package/dist/useQRCode.d.cts +1 -1
  69. package/dist/useQRCode.d.ts +1 -1
  70. package/dist/useSearchState.d.cts +6 -6
  71. package/dist/useSearchState.d.ts +6 -6
  72. package/dist/useSplitResize.d.cts +6 -6
  73. package/dist/useSplitResize.d.ts +6 -6
  74. package/dist/useTableQuery.d.cts +1 -1
  75. package/dist/useTableQuery.d.ts +1 -1
  76. package/dist/useTimeSelection.d.cts +2 -2
  77. package/dist/useTimeSelection.d.ts +2 -2
  78. package/dist/useTreeOperations.d.cts +3 -3
  79. package/dist/useTreeOperations.d.ts +3 -3
  80. package/dist/useWorkflowValidation.d.cts +3 -3
  81. package/dist/useWorkflowValidation.d.ts +3 -3
  82. package/package.json +2 -1
  83. package/dist/data.d.cts +0 -67
  84. package/dist/data.d.ts +0 -67
@@ -0,0 +1,135 @@
1
+ import * as vue from "vue";
2
+ import { LeafletMouseEvent, Map, TileLayerOptions } from "leaflet";
3
+
4
+ //#region src/components/C_Map/types.d.ts
5
+ type MapType = 'osm' | 'amap';
6
+ type MapCoordinate = [latitude: number, longitude: number];
7
+ type AMapPosition = [longitude: number, latitude: number];
8
+ interface MapMarker {
9
+ id?: string | number;
10
+ lat: number;
11
+ lng: number;
12
+ popup?: string;
13
+ title?: string;
14
+ }
15
+ interface MapTileConfig extends TileLayerOptions {
16
+ url?: string;
17
+ }
18
+ interface MapFitOptions {
19
+ maxZoom?: number;
20
+ padding?: [horizontal: number, vertical: number];
21
+ }
22
+ interface AMapMarkerEvent {
23
+ lnglat?: unknown;
24
+ originalEvent?: Event;
25
+ target?: unknown;
26
+ [key: string]: unknown;
27
+ }
28
+ interface AMapMarkerInstance {
29
+ getPosition(): unknown;
30
+ on(event: 'click', handler: (event: AMapMarkerEvent) => void): void;
31
+ setMap(map: AMapMapInstance | null): void;
32
+ }
33
+ interface AMapInfoWindowInstance {
34
+ close?(): void;
35
+ open(map: AMapMapInstance, position: unknown): void;
36
+ }
37
+ interface AMapMapInstance {
38
+ destroy(): void;
39
+ resize?(): void;
40
+ setCenter(center: AMapPosition): void;
41
+ setFitView?(overlays?: AMapMarkerInstance[], immediately?: boolean, avoid?: [number, number, number, number], maxZoom?: number): void;
42
+ setZoom(zoom: number): void;
43
+ }
44
+ interface AMapApi {
45
+ Map: new (container: HTMLElement, options: Record<string, unknown>) => AMapMapInstance;
46
+ Marker: new (options: Record<string, unknown>) => AMapMarkerInstance;
47
+ InfoWindow: new (options: Record<string, unknown>) => AMapInfoWindowInstance;
48
+ Pixel: new (x: number, y: number) => unknown;
49
+ }
50
+ type MapInstance = Map | AMapMapInstance;
51
+ type MapMarkerEvent = LeafletMouseEvent | AMapMarkerEvent | null;
52
+ interface MapProps {
53
+ /** 地图区域的无障碍名称。 */
54
+ ariaLabel?: string;
55
+ height?: string;
56
+ center?: MapCoordinate;
57
+ zoom?: number;
58
+ markers?: MapMarker[];
59
+ mapType?: MapType;
60
+ amapKey?: string;
61
+ amapLoadTimeout?: number;
62
+ amapOptions?: Record<string, unknown>;
63
+ tileConfig?: MapTileConfig;
64
+ zoomControl?: boolean;
65
+ preferCanvas?: boolean;
66
+ fitMarkersOnInit?: boolean;
67
+ }
68
+ type MapConfig = MapProps;
69
+ interface MapExpose {
70
+ fitToMarkers(options?: MapFitOptions): boolean;
71
+ getMap(): MapInstance | null;
72
+ refresh(): void;
73
+ }
74
+ //#endregion
75
+ //#region src/components/C_Map/index.vue.d.ts
76
+ declare const __VLS_export: vue.DefineComponent<MapProps, MapExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
77
+ error: (error: Error) => any;
78
+ ready: (map: MapInstance) => any;
79
+ markerClick: (marker: MapMarker, event: MapMarkerEvent) => any;
80
+ }, string, vue.PublicProps, Readonly<MapProps> & Readonly<{
81
+ onError?: ((error: Error) => any) | undefined;
82
+ onReady?: ((map: MapInstance) => any) | undefined;
83
+ onMarkerClick?: ((marker: MapMarker, event: MapMarkerEvent) => any) | undefined;
84
+ }>, {
85
+ height: string;
86
+ center: MapCoordinate;
87
+ zoom: number;
88
+ ariaLabel: string;
89
+ mapType: MapType;
90
+ markers: MapMarker[];
91
+ amapKey: string;
92
+ amapLoadTimeout: number;
93
+ amapOptions: Record<string, unknown>;
94
+ tileConfig: MapTileConfig;
95
+ zoomControl: boolean;
96
+ preferCanvas: boolean;
97
+ fitMarkersOnInit: boolean;
98
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
99
+ declare const _default: typeof __VLS_export;
100
+ //#endregion
101
+ //#region src/components/C_Map/data.d.ts
102
+ declare const MAP_TYPES: readonly [{
103
+ readonly label: "OpenStreetMap";
104
+ readonly value: "osm";
105
+ }, {
106
+ readonly label: "高德地图";
107
+ readonly value: "amap";
108
+ }];
109
+ declare const DEFAULT_MAP_CONFIG: Required<Pick<MapConfig, 'height' | 'center' | 'zoom' | 'mapType'>>;
110
+ declare const OSM_TILE_CONFIG: {
111
+ readonly url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
112
+ readonly attribution: "© OpenStreetMap contributors";
113
+ readonly maxZoom: 19;
114
+ readonly minZoom: 1;
115
+ readonly tileSize: 256;
116
+ readonly detectRetina: true;
117
+ };
118
+ //#endregion
119
+ //#region src/components/C_Map/mapUtils.d.ts
120
+ interface ResolvedTileConfig {
121
+ options: TileLayerOptions;
122
+ url: string;
123
+ }
124
+ /** 判断纬度、经度是否处于合法范围。 */
125
+ declare function isValidMapCoordinate(coordinate: MapCoordinate | readonly number[] | null | undefined): coordinate is MapCoordinate;
126
+ /** 将统一的 [纬度, 经度] 转为高德地图要求的 [经度, 纬度]。 */
127
+ declare function toAMapPosition(coordinate: MapCoordinate): AMapPosition;
128
+ /** 过滤非法标记,防止地图 SDK 因异常坐标中断整个渲染。 */
129
+ declare function getValidMapMarkers(markers: readonly MapMarker[]): MapMarker[];
130
+ /** 将缩放值限制在当前瓦片图层允许的范围内。 */
131
+ declare function normalizeMapZoom(zoom: number, minZoom?: 1, maxZoom?: 19): number;
132
+ /** 合并默认瓦片配置,并将 URL 与 Leaflet options 分离。 */
133
+ declare function resolveTileConfig(config?: MapTileConfig): ResolvedTileConfig;
134
+ //#endregion
135
+ export { MapType as C, MapTileConfig as S, MapFitOptions as _, toAMapPosition as a, MapMarkerEvent as b, OSM_TILE_CONFIG as c, AMapMapInstance as d, AMapMarkerEvent as f, MapExpose as g, MapCoordinate as h, resolveTileConfig as i, _default as l, MapConfig as m, isValidMapCoordinate as n, DEFAULT_MAP_CONFIG as o, AMapPosition as p, normalizeMapZoom as r, MAP_TYPES as s, getValidMapMarkers as t, AMapApi as u, MapInstance as v, MapProps as x, MapMarker as y };
@@ -0,0 +1,135 @@
1
+ import * as vue from "vue";
2
+ import { LeafletMouseEvent, Map, TileLayerOptions } from "leaflet";
3
+
4
+ //#region src/components/C_Map/types.d.ts
5
+ type MapType = 'osm' | 'amap';
6
+ type MapCoordinate = [latitude: number, longitude: number];
7
+ type AMapPosition = [longitude: number, latitude: number];
8
+ interface MapMarker {
9
+ id?: string | number;
10
+ lat: number;
11
+ lng: number;
12
+ popup?: string;
13
+ title?: string;
14
+ }
15
+ interface MapTileConfig extends TileLayerOptions {
16
+ url?: string;
17
+ }
18
+ interface MapFitOptions {
19
+ maxZoom?: number;
20
+ padding?: [horizontal: number, vertical: number];
21
+ }
22
+ interface AMapMarkerEvent {
23
+ lnglat?: unknown;
24
+ originalEvent?: Event;
25
+ target?: unknown;
26
+ [key: string]: unknown;
27
+ }
28
+ interface AMapMarkerInstance {
29
+ getPosition(): unknown;
30
+ on(event: 'click', handler: (event: AMapMarkerEvent) => void): void;
31
+ setMap(map: AMapMapInstance | null): void;
32
+ }
33
+ interface AMapInfoWindowInstance {
34
+ close?(): void;
35
+ open(map: AMapMapInstance, position: unknown): void;
36
+ }
37
+ interface AMapMapInstance {
38
+ destroy(): void;
39
+ resize?(): void;
40
+ setCenter(center: AMapPosition): void;
41
+ setFitView?(overlays?: AMapMarkerInstance[], immediately?: boolean, avoid?: [number, number, number, number], maxZoom?: number): void;
42
+ setZoom(zoom: number): void;
43
+ }
44
+ interface AMapApi {
45
+ Map: new (container: HTMLElement, options: Record<string, unknown>) => AMapMapInstance;
46
+ Marker: new (options: Record<string, unknown>) => AMapMarkerInstance;
47
+ InfoWindow: new (options: Record<string, unknown>) => AMapInfoWindowInstance;
48
+ Pixel: new (x: number, y: number) => unknown;
49
+ }
50
+ type MapInstance = Map | AMapMapInstance;
51
+ type MapMarkerEvent = LeafletMouseEvent | AMapMarkerEvent | null;
52
+ interface MapProps {
53
+ /** 地图区域的无障碍名称。 */
54
+ ariaLabel?: string;
55
+ height?: string;
56
+ center?: MapCoordinate;
57
+ zoom?: number;
58
+ markers?: MapMarker[];
59
+ mapType?: MapType;
60
+ amapKey?: string;
61
+ amapLoadTimeout?: number;
62
+ amapOptions?: Record<string, unknown>;
63
+ tileConfig?: MapTileConfig;
64
+ zoomControl?: boolean;
65
+ preferCanvas?: boolean;
66
+ fitMarkersOnInit?: boolean;
67
+ }
68
+ type MapConfig = MapProps;
69
+ interface MapExpose {
70
+ fitToMarkers(options?: MapFitOptions): boolean;
71
+ getMap(): MapInstance | null;
72
+ refresh(): void;
73
+ }
74
+ //#endregion
75
+ //#region src/components/C_Map/index.vue.d.ts
76
+ declare const __VLS_export: vue.DefineComponent<MapProps, MapExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
77
+ error: (error: Error) => any;
78
+ ready: (map: MapInstance) => any;
79
+ markerClick: (marker: MapMarker, event: MapMarkerEvent) => any;
80
+ }, string, vue.PublicProps, Readonly<MapProps> & Readonly<{
81
+ onError?: ((error: Error) => any) | undefined;
82
+ onReady?: ((map: MapInstance) => any) | undefined;
83
+ onMarkerClick?: ((marker: MapMarker, event: MapMarkerEvent) => any) | undefined;
84
+ }>, {
85
+ height: string;
86
+ center: MapCoordinate;
87
+ zoom: number;
88
+ ariaLabel: string;
89
+ mapType: MapType;
90
+ markers: MapMarker[];
91
+ amapKey: string;
92
+ amapLoadTimeout: number;
93
+ amapOptions: Record<string, unknown>;
94
+ tileConfig: MapTileConfig;
95
+ zoomControl: boolean;
96
+ preferCanvas: boolean;
97
+ fitMarkersOnInit: boolean;
98
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
99
+ declare const _default: typeof __VLS_export;
100
+ //#endregion
101
+ //#region src/components/C_Map/data.d.ts
102
+ declare const MAP_TYPES: readonly [{
103
+ readonly label: "OpenStreetMap";
104
+ readonly value: "osm";
105
+ }, {
106
+ readonly label: "高德地图";
107
+ readonly value: "amap";
108
+ }];
109
+ declare const DEFAULT_MAP_CONFIG: Required<Pick<MapConfig, 'height' | 'center' | 'zoom' | 'mapType'>>;
110
+ declare const OSM_TILE_CONFIG: {
111
+ readonly url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
112
+ readonly attribution: "© OpenStreetMap contributors";
113
+ readonly maxZoom: 19;
114
+ readonly minZoom: 1;
115
+ readonly tileSize: 256;
116
+ readonly detectRetina: true;
117
+ };
118
+ //#endregion
119
+ //#region src/components/C_Map/mapUtils.d.ts
120
+ interface ResolvedTileConfig {
121
+ options: TileLayerOptions;
122
+ url: string;
123
+ }
124
+ /** 判断纬度、经度是否处于合法范围。 */
125
+ declare function isValidMapCoordinate(coordinate: MapCoordinate | readonly number[] | null | undefined): coordinate is MapCoordinate;
126
+ /** 将统一的 [纬度, 经度] 转为高德地图要求的 [经度, 纬度]。 */
127
+ declare function toAMapPosition(coordinate: MapCoordinate): AMapPosition;
128
+ /** 过滤非法标记,防止地图 SDK 因异常坐标中断整个渲染。 */
129
+ declare function getValidMapMarkers(markers: readonly MapMarker[]): MapMarker[];
130
+ /** 将缩放值限制在当前瓦片图层允许的范围内。 */
131
+ declare function normalizeMapZoom(zoom: number, minZoom?: 1, maxZoom?: 19): number;
132
+ /** 合并默认瓦片配置,并将 URL 与 Leaflet options 分离。 */
133
+ declare function resolveTileConfig(config?: MapTileConfig): ResolvedTileConfig;
134
+ //#endregion
135
+ export { MapType as C, MapTileConfig as S, MapFitOptions as _, toAMapPosition as a, MapMarkerEvent as b, OSM_TILE_CONFIG as c, AMapMapInstance as d, AMapMarkerEvent as f, MapExpose as g, MapCoordinate as h, resolveTileConfig as i, _default as l, MapConfig as m, isValidMapCoordinate as n, DEFAULT_MAP_CONFIG as o, AMapPosition as p, normalizeMapZoom as r, MAP_TYPES as s, getValidMapMarkers as t, AMapApi as u, MapInstance as v, MapProps as x, MapMarker as y };
package/dist/style.css CHANGED
@@ -8105,21 +8105,21 @@ to {
8105
8105
 
8106
8106
 
8107
8107
  /* --- C_Map --- */
8108
- /* unplugin-vue-components disabled */.c-map[data-v-09a5ef45] {
8108
+ /* unplugin-vue-components disabled */.c-map[data-v-5e6d0330] {
8109
8109
  position: relative;
8110
8110
  width: 100%;
8111
8111
  min-height: 300px;
8112
- background: #f5f5f5;
8113
- border-radius: 4px;
8112
+ background: var(--c-bg-surface, #fff);
8113
+ border-radius: var(--c-radius-sm, 4px);
8114
8114
  overflow: hidden;
8115
8115
  }
8116
- .c-map .map-container[data-v-09a5ef45] {
8116
+ .c-map .map-container[data-v-5e6d0330] {
8117
8117
  width: 100%;
8118
8118
  height: 100%;
8119
- border-radius: 4px;
8119
+ border-radius: inherit;
8120
8120
  overflow: hidden;
8121
8121
  }
8122
- .c-map .map-loading[data-v-09a5ef45] {
8122
+ .c-map .map-loading[data-v-5e6d0330] {
8123
8123
  position: absolute;
8124
8124
  top: 0;
8125
8125
  left: 0;
@@ -8128,8 +8128,8 @@ to {
8128
8128
  display: flex;
8129
8129
  align-items: center;
8130
8130
  justify-content: center;
8131
- background: rgba(255, 255, 255, 0.9);
8132
- border-radius: 4px;
8131
+ background: color-mix(in srgb, var(--c-bg-surface, #fff) 90%, transparent);
8132
+ border-radius: inherit;
8133
8133
  z-index: 1000;
8134
8134
  }
8135
8135
 
@@ -71,22 +71,22 @@ declare var __VLS_7: `header-${string}`, __VLS_8: {
71
71
  type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any } & { [K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any } & { [K in NonNullable<typeof __VLS_31>]?: (props: typeof __VLS_32) => any };
72
72
  declare const __VLS_base: vue.DefineComponent<Props, CollapsePanelExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
73
73
  change: (activeKeys: string[]) => any;
74
- "update:activeKeys": (keys: string[]) => any;
75
74
  expand: (key: string) => any;
76
75
  collapse: (key: string) => any;
76
+ "update:activeKeys": (keys: string[]) => any;
77
77
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
78
78
  onChange?: ((activeKeys: string[]) => any) | undefined;
79
- "onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
80
79
  onExpand?: ((key: string) => any) | undefined;
81
80
  onCollapse?: ((key: string) => any) | undefined;
81
+ "onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
82
82
  }>, {
83
83
  bordered: boolean;
84
+ persistKey: string;
84
85
  activeKeys: string[];
85
86
  defaultActiveKeys: string[];
86
87
  accordion: boolean;
87
88
  variant: CollapsePanelVariant;
88
89
  expandIconPosition: ExpandIconPosition;
89
- persistKey: string;
90
90
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
91
91
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
92
92
  declare const _default: typeof __VLS_export;
@@ -71,22 +71,22 @@ declare var __VLS_7: `header-${string}`, __VLS_8: {
71
71
  type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any } & { [K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any } & { [K in NonNullable<typeof __VLS_31>]?: (props: typeof __VLS_32) => any };
72
72
  declare const __VLS_base: vue.DefineComponent<Props, CollapsePanelExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
73
73
  change: (activeKeys: string[]) => any;
74
- "update:activeKeys": (keys: string[]) => any;
75
74
  expand: (key: string) => any;
76
75
  collapse: (key: string) => any;
76
+ "update:activeKeys": (keys: string[]) => any;
77
77
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
78
78
  onChange?: ((activeKeys: string[]) => any) | undefined;
79
- "onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
80
79
  onExpand?: ((key: string) => any) | undefined;
81
80
  onCollapse?: ((key: string) => any) | undefined;
81
+ "onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
82
82
  }>, {
83
83
  bordered: boolean;
84
+ persistKey: string;
84
85
  activeKeys: string[];
85
86
  defaultActiveKeys: string[];
86
87
  accordion: boolean;
87
88
  variant: CollapsePanelVariant;
88
89
  expandIconPosition: ExpandIconPosition;
89
- persistKey: string;
90
90
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
91
91
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
92
92
  declare const _default: typeof __VLS_export;
@@ -52,21 +52,19 @@ interface ImageCropperEmits {
52
52
  //#region src/components/C_ImageCropper/index.vue.d.ts
53
53
  declare const __VLS_export: vue.DefineComponent<ImageCropperProps, ImageCropperExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
54
54
  error: (error: Event) => any;
55
+ crop: (result: any) => any;
55
56
  ready: () => any;
56
- cancel: () => any;
57
57
  confirm: (result: any) => any;
58
- crop: (result: any) => any;
58
+ cancel: () => any;
59
59
  }, string, vue.PublicProps, Readonly<ImageCropperProps> & Readonly<{
60
60
  onError?: ((error: Event) => any) | undefined;
61
+ onCrop?: ((result: any) => any) | undefined;
61
62
  onReady?: (() => any) | undefined;
62
- onCancel?: (() => any) | undefined;
63
63
  onConfirm?: ((result: any) => any) | undefined;
64
- onCrop?: ((result: any) => any) | undefined;
64
+ onCancel?: (() => any) | undefined;
65
65
  }>, {
66
66
  disabled: boolean;
67
67
  height: string | number;
68
- showToolbar: boolean;
69
- modal: boolean;
70
68
  src: string;
71
69
  aspectRatio: number;
72
70
  outputFormat: CropOutputFormat;
@@ -74,7 +72,9 @@ declare const __VLS_export: vue.DefineComponent<ImageCropperProps, ImageCropperE
74
72
  maxOutputWidth: number;
75
73
  maxOutputHeight: number;
76
74
  showPreview: boolean;
75
+ showToolbar: boolean;
77
76
  circular: boolean;
77
+ modal: boolean;
78
78
  modalTitle: string;
79
79
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
80
80
  declare const _default: typeof __VLS_export;
@@ -52,21 +52,19 @@ interface ImageCropperEmits {
52
52
  //#region src/components/C_ImageCropper/index.vue.d.ts
53
53
  declare const __VLS_export: vue.DefineComponent<ImageCropperProps, ImageCropperExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
54
54
  error: (error: Event) => any;
55
+ crop: (result: any) => any;
55
56
  ready: () => any;
56
- cancel: () => any;
57
57
  confirm: (result: any) => any;
58
- crop: (result: any) => any;
58
+ cancel: () => any;
59
59
  }, string, vue.PublicProps, Readonly<ImageCropperProps> & Readonly<{
60
60
  onError?: ((error: Event) => any) | undefined;
61
+ onCrop?: ((result: any) => any) | undefined;
61
62
  onReady?: (() => any) | undefined;
62
- onCancel?: (() => any) | undefined;
63
63
  onConfirm?: ((result: any) => any) | undefined;
64
- onCrop?: ((result: any) => any) | undefined;
64
+ onCancel?: (() => any) | undefined;
65
65
  }>, {
66
66
  disabled: boolean;
67
67
  height: string | number;
68
- showToolbar: boolean;
69
- modal: boolean;
70
68
  src: string;
71
69
  aspectRatio: number;
72
70
  outputFormat: CropOutputFormat;
@@ -74,7 +72,9 @@ declare const __VLS_export: vue.DefineComponent<ImageCropperProps, ImageCropperE
74
72
  maxOutputWidth: number;
75
73
  maxOutputHeight: number;
76
74
  showPreview: boolean;
75
+ showToolbar: boolean;
77
76
  circular: boolean;
77
+ modal: boolean;
78
78
  modalTitle: string;
79
79
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
80
80
  declare const _default: typeof __VLS_export;
@@ -116,16 +116,13 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
116
116
  "onItem-remove"?: ((item: DraggableItem, index: number) => any) | undefined;
117
117
  "onList-change"?: ((list: DraggableItem[]) => any) | undefined;
118
118
  }>, {
119
- sort: boolean;
120
119
  modelValue: DraggableItem[];
120
+ sort: boolean;
121
121
  disabled: boolean;
122
122
  delay: number;
123
123
  direction: "vertical" | "horizontal";
124
- itemClass: string;
125
- emptyText: string;
126
- animation: number;
127
- layout: LayoutMode;
128
124
  group: string | GroupOptions;
125
+ animation: number;
129
126
  handle: string;
130
127
  showHandle: boolean;
131
128
  ghostClass: string;
@@ -133,9 +130,12 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
133
130
  dragClass: string;
134
131
  wrapperClass: string;
135
132
  listClass: string;
133
+ itemClass: string;
136
134
  showEmptyState: boolean;
135
+ emptyText: string;
137
136
  swapThreshold: number;
138
137
  invertSwap: boolean;
138
+ layout: LayoutMode;
139
139
  gridColumns: number;
140
140
  gridRows: number;
141
141
  gap: string | number;
@@ -116,16 +116,13 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
116
116
  "onItem-remove"?: ((item: DraggableItem, index: number) => any) | undefined;
117
117
  "onList-change"?: ((list: DraggableItem[]) => any) | undefined;
118
118
  }>, {
119
- sort: boolean;
120
119
  modelValue: DraggableItem[];
120
+ sort: boolean;
121
121
  disabled: boolean;
122
122
  delay: number;
123
123
  direction: "vertical" | "horizontal";
124
- itemClass: string;
125
- emptyText: string;
126
- animation: number;
127
- layout: LayoutMode;
128
124
  group: string | GroupOptions;
125
+ animation: number;
129
126
  handle: string;
130
127
  showHandle: boolean;
131
128
  ghostClass: string;
@@ -133,9 +130,12 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
133
130
  dragClass: string;
134
131
  wrapperClass: string;
135
132
  listClass: string;
133
+ itemClass: string;
136
134
  showEmptyState: boolean;
135
+ emptyText: string;
137
136
  swapThreshold: number;
138
137
  invertSwap: boolean;
138
+ layout: LayoutMode;
139
139
  gridColumns: number;
140
140
  gridRows: number;
141
141
  gap: string | number;
@@ -322,6 +322,43 @@ interface FormInstance<T extends object = FormRecord> {
322
322
  /** 验证并提交,成功返回 true */
323
323
  submit(): Promise<boolean>;
324
324
  }
325
+ /** C_Form 默认操作区插槽参数。 */
326
+ interface FormActionSlotProps<T extends object = FormRecord> {
327
+ form: FormInst | null;
328
+ model: FormModel<T>;
329
+ validate: FormInstance<T>['validate'];
330
+ validateField: FormInstance<T>['validateField'];
331
+ reset: FormInstance<T>['resetFields'];
332
+ setFields: FormInstance<T>['setFields'];
333
+ getModel: FormInstance<T>['getModel'];
334
+ clearValidation: FormInstance<T>['clearValidation'];
335
+ submit: FormInstance<T>['submit'];
336
+ reloadOptions: FormInstance<T>['reloadOptions'];
337
+ submitting: boolean;
338
+ }
339
+ /** Tabs 布局操作区插槽参数。 */
340
+ interface FormTabActionsSlotProps {
341
+ currentTab: string;
342
+ totalTabs: number;
343
+ validateTab: () => Promise<boolean>;
344
+ switchToTab: (targetTab: string) => Promise<boolean>;
345
+ }
346
+ /** Steps 布局操作区插槽参数。 */
347
+ interface FormStepActionsSlotProps {
348
+ currentStep: number;
349
+ totalSteps: number;
350
+ isFirstStep: boolean;
351
+ isLastStep: boolean;
352
+ nextStep: () => Promise<void>;
353
+ previousStep: () => void;
354
+ goToStep: (stepIndex: number) => Promise<void>;
355
+ }
356
+ /** C_Form 对外公开的具名插槽。 */
357
+ interface FormSlots<T extends object = FormRecord> {
358
+ action?: (props: FormActionSlotProps<T>) => unknown;
359
+ 'tab-actions'?: (props: FormTabActionsSlotProps) => unknown;
360
+ 'step-actions'?: (props: FormStepActionsSlotProps) => unknown;
361
+ }
325
362
  /**
326
363
  * 表单数据模型类型(泛型)
327
364
  */
@@ -544,8 +581,8 @@ declare const __VLS_export: <T extends object = FormRecord>(__VLS_props: NonNull
544
581
  renderers?: Record<string, FormRenderer>;
545
582
  } & {
546
583
  "onUpdate:modelValue"?: ((model: T) => any) | undefined;
547
- "onValidate-error"?: ((errors: unknown) => any) | undefined;
548
584
  onSubmit?: ((payload: SubmitEventPayload<T>) => any) | undefined;
585
+ "onValidate-error"?: ((errors: unknown) => any) | undefined;
549
586
  "onValidate-success"?: ((model: T) => any) | undefined;
550
587
  }> & (typeof globalThis extends {
551
588
  __VLS_PROPS_FALLBACK: infer P;
@@ -588,26 +625,8 @@ declare const __VLS_export: <T extends object = FormRecord>(__VLS_props: NonNull
588
625
  submit: () => Promise<boolean>;
589
626
  }>) => void;
590
627
  attrs: any;
591
- slots: {
592
- action?: (props: {
593
- form: {
594
- validate: naive_ui_es_form_src_interface0.FormValidate;
595
- restoreValidation: () => void;
596
- invalidateLabelWidth: () => void;
597
- } | null;
598
- model: FormRecord;
599
- validate: () => Promise<void>;
600
- validateField: (field: string | string[]) => Promise<void>;
601
- reset: () => void;
602
- setFields: (fields: FormModel) => void;
603
- getModel: () => FormModel;
604
- clearValidation: (field?: string | string[]) => void;
605
- submit: () => Promise<boolean>;
606
- reloadOptions: (field?: string) => Promise<void>;
607
- submitting: boolean;
608
- }) => any;
609
- };
610
- emit: ((evt: "update:modelValue", model: T) => void) & ((evt: "validate-error", errors: unknown) => void) & ((evt: "submit", payload: SubmitEventPayload<T>) => void) & ((evt: "validate-success", model: T) => void);
628
+ slots: FormSlots<T>;
629
+ emit: ((evt: "update:modelValue", model: T) => void) & ((evt: "submit", payload: SubmitEventPayload<T>) => void) & ((evt: "validate-error", errors: unknown) => void) & ((evt: "validate-success", model: T) => void);
611
630
  }>) => vue.VNode & {
612
631
  __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
613
632
  };
@@ -737,4 +756,4 @@ type DynamicFormStateType = DynamicFormController;
737
756
  */
738
757
  declare const DYNAMIC_FORM_STATE_KEY: unique symbol;
739
758
  //#endregion
740
- export { OptionItem as $, useFormGlobalConfig as A, FieldPathValue as B, FormConfig as C, mergeFormConfig as D, ResolvedFormConfig as E, DynamicFieldConfig as F, FormOption as G, FormInstance as H, DynamicFormConfig as I, InlineLayoutConfig as J, FormRecord as K, DynamicFormController as L, CardLayoutConfig as M, ComponentType as N, resolveFormConfig as O, CustomLayoutConfig as P, MaybePromise as Q, DynamicFormState as R, FORM_GLOBAL_CONFIG_KEY as S, LayoutCallbacks as T, FormMode as U, FormErrorContext as V, FormModel as W, LayoutConfig as X, LabelPlacement as Y, LayoutType as Z, UseFormRendererOptions as _, UseFormDirtyReturn as a, useFormRenderer as b, UseCFormOptions as c, useCForm as d, StepsLayoutConfig as et, _default as f, RendererProps as g, FormRendererContext as h, useDynamicFormState as i, AsyncOptionsContext as j, shouldShowActions as k, defineFormConfig as l, FormRenderer as m, DynamicFormStateType as n, TabsLayoutConfig as nt, useFormDirty as o, ComponentMap as p, GridLayoutConfig as q, FIELD_TYPE_OPTIONS as r, useFormState as s, DYNAMIC_FORM_STATE_KEY as t, SubmitEventPayload as tt, defineFormOptions as u, registerRenderer as v, LAYOUTS_WITH_OWN_CONTROLS as w, FORM_DEFAULTS as x, unregisterRenderer as y, FieldPath as z };
759
+ export { LabelPlacement as $, useFormGlobalConfig as A, FieldPathValue as B, FormConfig as C, mergeFormConfig as D, ResolvedFormConfig as E, DynamicFieldConfig as F, FormModel as G, FormErrorContext as H, DynamicFormConfig as I, FormSlots as J, FormOption as K, DynamicFormController as L, CardLayoutConfig as M, ComponentType as N, resolveFormConfig as O, CustomLayoutConfig as P, InlineLayoutConfig as Q, DynamicFormState as R, FORM_GLOBAL_CONFIG_KEY as S, LayoutCallbacks as T, FormInstance as U, FormActionSlotProps as V, FormMode as W, FormTabActionsSlotProps as X, FormStepActionsSlotProps as Y, GridLayoutConfig as Z, UseFormRendererOptions as _, UseFormDirtyReturn as a, SubmitEventPayload as at, useFormRenderer as b, UseCFormOptions as c, useCForm as d, LayoutConfig as et, _default as f, RendererProps as g, FormRendererContext as h, useDynamicFormState as i, StepsLayoutConfig as it, AsyncOptionsContext as j, shouldShowActions as k, defineFormConfig as l, FormRenderer as m, DynamicFormStateType as n, MaybePromise as nt, useFormDirty as o, TabsLayoutConfig as ot, ComponentMap as p, FormRecord as q, FIELD_TYPE_OPTIONS as r, OptionItem as rt, useFormState as s, DYNAMIC_FORM_STATE_KEY as t, LayoutType as tt, defineFormOptions as u, registerRenderer as v, LAYOUTS_WITH_OWN_CONTROLS as w, FORM_DEFAULTS as x, unregisterRenderer as y, FieldPath as z };