@sunny-base-web/effects 0.8.17 → 0.8.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ import { ComponentOptionsBase } from 'vue';
11
11
  import { ComponentOptionsMixin } from 'vue';
12
12
  import { ComponentProvideOptions } from 'vue';
13
13
  import { ComponentPublicInstance } from 'vue';
14
+ import { computed } from 'vue';
14
15
  import { ComputedRef } from 'vue';
15
16
  import { CreateAxiosDefaults } from 'axios';
16
17
  import { CreateComponentPublicInstanceWithMixins } from 'vue';
@@ -37,6 +38,7 @@ import { PiniaCustomStateProperties } from 'pinia';
37
38
  import { PropType } from 'vue';
38
39
  import { PublicProps } from 'vue';
39
40
  import { Ref } from 'vue';
41
+ import { ref } from 'vue';
40
42
  import { RendererElement } from 'vue';
41
43
  import { RendererNode } from 'vue';
42
44
  import { SelectFieldMapping } from '../../../@ui/src/index.ts';
@@ -2425,6 +2427,41 @@ export declare const tabsConfig: ({
2425
2427
  /** useForm 的默认配置,外部可 import 后进行覆盖/合并 */
2426
2428
  export declare const USE_FORM_DEFAULTS: Partial<SunnyFormProps>;
2427
2429
 
2430
+ /**
2431
+ * BusinessSearchModal Composable
2432
+ *
2433
+ * 复用 BusinessSearch 的 cNum 逻辑,直接驱动 SunnySearchModal。
2434
+ * 通过全局配置的 businessSearchAdapter 加载后端配置并执行搜索。
2435
+ */
2436
+ export declare function useBusinessSearchModal(options: UseBusinessSearchModalOptions): UseBusinessSearchModalReturn;
2437
+
2438
+ export declare interface UseBusinessSearchModalOptions {
2439
+ /** 业务编码,必填 */
2440
+ cNum: string;
2441
+ /** 字段映射 */
2442
+ fieldNames?: {
2443
+ label?: string;
2444
+ value?: string;
2445
+ desc?: string;
2446
+ };
2447
+ /** 是否多选 */
2448
+ multiple?: boolean;
2449
+ /** 表单默认值,打开弹窗时自动填充到搜索表单 */
2450
+ defaultModel?: Record<string, any>;
2451
+ /** 确认选择回调 */
2452
+ onConfirm?: (rows: any[]) => void;
2453
+ }
2454
+
2455
+ export declare interface UseBusinessSearchModalReturn {
2456
+ visible: ReturnType<typeof ref<boolean>>;
2457
+ loading: ReturnType<typeof ref<boolean>>;
2458
+ modalProps: ComputedRef<Record<string, any>>;
2459
+ open: () => Promise<void>;
2460
+ handleConfirm: (rows: any[]) => void;
2461
+ selectedValues: ReturnType<typeof computed<any[]>>;
2462
+ setSelectedValues: (val: any[]) => void;
2463
+ }
2464
+
2428
2465
  /**
2429
2466
  * Composition API Hook: 获取全局配置
2430
2467
  * 在组件 setup() 中调用此方法获取配置信息