fast-element-plus 2.0.1 → 2.0.2

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 (88) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +2 -0
  3. package/README.zh.md +2 -0
  4. package/dist/components/avatar/index.d.ts +2 -2
  5. package/dist/components/avatar/index.mjs.map +1 -1
  6. package/dist/components/button/index.d.ts +1 -1
  7. package/dist/components/button/index.mjs.map +1 -1
  8. package/dist/components/contextMenu/src/contextMenu.d.ts +4 -4
  9. package/dist/components/contextMenu/src/contextMenu.type.d.ts +3 -3
  10. package/dist/components/dialog/index.d.ts +1 -1
  11. package/dist/components/dialog/index.mjs.map +1 -1
  12. package/dist/components/drawer/index.d.ts +2 -2
  13. package/dist/components/drawer/index.mjs.map +1 -1
  14. package/dist/components/form/index.d.ts +1 -1
  15. package/dist/components/form/index.mjs.map +1 -1
  16. package/dist/components/form/src/form.d.ts +5 -2
  17. package/dist/components/form/src/form.mjs.map +1 -1
  18. package/dist/components/formItemTip/index.d.ts +1 -1
  19. package/dist/components/formItemTip/index.mjs.map +1 -1
  20. package/dist/components/icon/index.d.ts +2 -2
  21. package/dist/components/icon/index.mjs.map +1 -1
  22. package/dist/components/image/index.d.ts +1 -1
  23. package/dist/components/image/index.mjs.map +1 -1
  24. package/dist/components/inputDialogPage/index.d.ts +1 -1
  25. package/dist/components/inputDialogPage/index.mjs.map +1 -1
  26. package/dist/components/inputDialogPage/src/inputDialogPage.d.ts +15 -15
  27. package/dist/components/inputDialogPage/src/inputDialogPage.mjs.map +1 -1
  28. package/dist/components/layoutGrid/src/layoutGrid.mjs.map +1 -1
  29. package/dist/components/layoutGrid/src/layoutGridItem.mjs.map +1 -1
  30. package/dist/components/select/index.d.ts +2 -2
  31. package/dist/components/select/index.mjs.map +1 -1
  32. package/dist/components/select/src/select.d.ts +15 -14
  33. package/dist/components/select/src/select.mjs.map +1 -1
  34. package/dist/components/select/src/select.type.d.ts +4 -4
  35. package/dist/components/select/src/selectOption.d.ts +5 -5
  36. package/dist/components/selectPage/index.d.ts +1 -1
  37. package/dist/components/selectPage/index.mjs.map +1 -1
  38. package/dist/components/selectPage/src/selectPage.d.ts +10 -10
  39. package/dist/components/selectPage/src/selectPage.mjs.map +1 -1
  40. package/dist/components/selectV2/index.d.ts +2 -2
  41. package/dist/components/selectV2/index.mjs.map +1 -1
  42. package/dist/components/selectV2/src/selectV2.d.ts +28 -36
  43. package/dist/components/selectV2/src/selectV2.mjs.map +1 -1
  44. package/dist/components/table/index.d.ts +1 -1
  45. package/dist/components/table/index.mjs.map +1 -1
  46. package/dist/components/table/src/page.type.d.ts +3 -1
  47. package/dist/components/table/src/page.type.mjs.map +1 -1
  48. package/dist/components/table/src/table.d.ts +38 -39
  49. package/dist/components/table/src/table.mjs +4 -2
  50. package/dist/components/table/src/table.mjs.map +1 -1
  51. package/dist/components/table/src/table.state.d.ts +5 -5
  52. package/dist/components/table/src/table.type.d.ts +13 -10
  53. package/dist/components/table/src/table.type.mjs.map +1 -1
  54. package/dist/components/table/src/tableColumn.d.ts +3 -4
  55. package/dist/components/table/src/tableColumn.mjs +1 -1
  56. package/dist/components/table/src/tableColumn.mjs.map +1 -1
  57. package/dist/components/table/src/tableColumnSettingDialog.mjs.map +1 -1
  58. package/dist/components/table/src/tableSearchForm.d.ts +1 -1
  59. package/dist/components/table/src/tableSearchForm.mjs.map +1 -1
  60. package/dist/components/table/src/tableSearchFormItem.mjs.map +1 -1
  61. package/dist/components/table/src/useTable.d.ts +5 -5
  62. package/dist/components/table/src/useTable.mjs.map +1 -1
  63. package/dist/components/table/utils/table.d.ts +3 -2
  64. package/dist/components/table/utils/table.mjs.map +1 -1
  65. package/dist/components/tree/index.d.ts +1 -1
  66. package/dist/components/tree/index.mjs.map +1 -1
  67. package/dist/components/tree/src/tree.d.ts +27 -25
  68. package/dist/components/tree/src/tree.mjs +3 -1
  69. package/dist/components/tree/src/tree.mjs.map +1 -1
  70. package/dist/components/tree/src/tree.props.d.ts +1 -4
  71. package/dist/components/tree/src/tree.type.d.ts +4 -4
  72. package/dist/components/treeSelect/index.d.ts +1 -1
  73. package/dist/components/treeSelect/index.mjs.map +1 -1
  74. package/dist/components/treeSelect/src/treeSelect.d.ts +32 -31
  75. package/dist/components/treeSelect/src/treeSelect.mjs.map +1 -1
  76. package/dist/components/upload/index.d.ts +1 -1
  77. package/dist/components/upload/index.mjs.map +1 -1
  78. package/dist/components/uploadImage/index.d.ts +1 -1
  79. package/dist/components/uploadImage/index.mjs.map +1 -1
  80. package/dist/components/uploadImages/index.d.ts +2 -2
  81. package/dist/components/uploadImages/index.mjs.map +1 -1
  82. package/dist/directives/click-icon-copy/index.mjs.map +1 -1
  83. package/dist/index.global.min.js +2 -2
  84. package/dist/index.global.min.js.map +1 -1
  85. package/dist/version.d.ts +1 -1
  86. package/dist/version.mjs +1 -1
  87. package/dist/version.mjs.map +1 -1
  88. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to Fast.Element.Plus are documented in this file.
4
4
 
5
+ ## [2.0.2] - 2026-08-29
6
+
7
+ ### Changed
8
+
9
+ - Relaxed open-ended business data types for tables, pagination, selectors, trees, context menus, request parameters, and dynamic configuration while preserving `unknown` at untrusted runtime boundaries.
10
+ - Added generic selector and tree payload types, precise selection change payloads, and consumer type tests for anonymous-data defaults.
11
+ - Renamed the public table row type from `FaTableRow` to `DefaultRow` and removed redundant internal forwarding exports for Element Plus tree types.
12
+
5
13
  ## [2.0.1] - 2026-08-28
6
14
 
7
15
  ### Changed
@@ -43,5 +51,6 @@ All notable changes to Fast.Element.Plus are documented in this file.
43
51
  - Scoped Table styles and added responsive IconSelector styling.
44
52
  - Improved dialogs, drawers, tables, forms, trees, selectors, car-number input, images, and uploads for dark mode, touch input, and narrow viewports.
45
53
 
54
+ [2.0.2]: https://gitee.com/FastDotnet/fast.element.plus/releases/tag/v2.0.2
46
55
  [2.0.1]: https://gitee.com/FastDotnet/fast.element.plus/releases/tag/v2.0.1
47
56
  [2.0.0]: https://gitee.com/FastDotnet/fast.element.plus/releases/tag/v2.0.0
package/README.md CHANGED
@@ -95,6 +95,8 @@ For global component and directive types, add the package type entry to the appl
95
95
 
96
96
  The package root is the only JavaScript API entry. `fast-element-plus/global` provides Vue global declarations, and `fast-element-plus/style.css` provides the component styles. Files under `dist/` are implementation details.
97
97
 
98
+ Open-ended business rows, paging extensions, selector/tree payloads, request parameters, and dynamic configuration use `any` where the SDK cannot know the application schema; exported generics can constrain known models. Untrusted runtime inputs, errors, and values that require validation remain `unknown`. `DefaultRow` is the public default FaTable row type for business tables whose fields are not declared in advance.
99
+
98
100
  ## CDN
99
101
 
100
102
  The `unpkg` and `jsdelivr` fields select `dist/index.global.min.js`. Load Vue, Element Plus, Element Plus Icons, and Fast.Element.Plus.Icons first, then access the library as `globalThis.FastElementPlus`. Load `dist/index.css` separately.
package/README.zh.md CHANGED
@@ -95,6 +95,8 @@ useOverlay.show();
95
95
 
96
96
  包根入口是唯一 JavaScript API 入口;`fast-element-plus/global` 提供 Vue 全局声明,`fast-element-plus/style.css` 提供组件样式。`dist/` 下的其他文件均为实现细节。
97
97
 
98
+ 业务行、分页扩展字段、选择器与树节点附加数据、请求参数和动态配置在 SDK 无法预知应用模型时使用 `any`,已知模型可通过公开泛型约束;未经验证的运行时输入、错误对象和必须先收窄的值继续使用 `unknown`。`DefaultRow` 是 FaTable 默认公开行类型,可直接用于未预先定义字段的业务表格。
99
+
98
100
  ## CDN
99
101
 
100
102
  `unpkg` 和 `jsdelivr` 字段都指向 `dist/index.global.min.js`。页面先加载 Vue、Element Plus、Element Plus Icons 和 Fast.Element.Plus.Icons,再通过 `globalThis.FastElementPlus` 访问组件库。样式需单独加载 `dist/index.css`。
@@ -1,7 +1,7 @@
1
1
  import Avatar from "./src/avatar";
2
- import type { faAvatarEmits, faAvatarProps } from "./src/avatar";
3
- import type { TSXWithInstall } from "../../utils";
4
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
+ import type { faAvatarEmits, faAvatarProps } from "./src/avatar";
5
5
  /** 支持图片地址规格转换的头像组件。 */
6
6
  export declare const FaAvatar: TSXWithInstall<typeof Avatar>;
7
7
  export default FaAvatar;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Avatar"],"sources":["../../../src/components/avatar/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Avatar from \"./src/avatar\";\nimport type { faAvatarEmits, faAvatarProps } from \"./src/avatar\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 支持图片地址规格转换的头像组件。 */\nexport const FaAvatar: TSXWithInstall<typeof Avatar> = withInstall(Avatar);\nexport default FaAvatar;\n\nexport { faAvatarEmits, faAvatarProps } from \"./src/avatar\";\nexport type { FaAvatarSlots } from \"./src/avatar\";\n\n/** FaAvatar 暴露的组件实例类型。 */\nexport type FaAvatarInstance = InstanceType<typeof Avatar>;\n\n/** FaAvatar 的完整 Props 类型。 */\nexport type FaAvatarProps = ExtractPropTypes<typeof faAvatarProps>;\n\n/** FaAvatar 的 Emits 类型。 */\nexport type FaAvatarEmits = typeof faAvatarEmits;\n"],"mappings":";;;;AAOA,MAAa,WAA0C,YAAYA,cAAM"}
1
+ {"version":3,"file":"index.mjs","names":["Avatar"],"sources":["../../../src/components/avatar/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Avatar from \"./src/avatar\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { faAvatarEmits, faAvatarProps } from \"./src/avatar\";\n\n/** 支持图片地址规格转换的头像组件。 */\nexport const FaAvatar: TSXWithInstall<typeof Avatar> = withInstall(Avatar);\nexport default FaAvatar;\n\nexport { faAvatarEmits, faAvatarProps } from \"./src/avatar\";\nexport type { FaAvatarSlots } from \"./src/avatar\";\n\n/** FaAvatar 暴露的组件实例类型。 */\nexport type FaAvatarInstance = InstanceType<typeof Avatar>;\n\n/** FaAvatar 的完整 Props 类型。 */\nexport type FaAvatarProps = ExtractPropTypes<typeof faAvatarProps>;\n\n/** FaAvatar 的 Emits 类型。 */\nexport type FaAvatarEmits = typeof faAvatarEmits;\n"],"mappings":";;;;AAOA,MAAa,WAA0C,YAAYA,cAAM"}
@@ -1,6 +1,6 @@
1
1
  import Button, { faButtonEmits, faButtonProps } from "./src/button";
2
- import type { TSXWithInstall } from "../../utils";
3
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
4
  /** 支持异步加载状态和全局遮罩联动的按钮组件。 */
5
5
  export declare const FaButton: TSXWithInstall<typeof Button>;
6
6
  export default FaButton;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Button"],"sources":["../../../src/components/button/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Button, { faButtonEmits, faButtonProps } from \"./src/button\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 支持异步加载状态和全局遮罩联动的按钮组件。 */\nexport const FaButton: TSXWithInstall<typeof Button> = withInstall(Button);\nexport default FaButton;\n\nexport { faButtonProps, faButtonEmits };\nexport type { FaButtonSlots } from \"./src/button\";\n\n/** FaButton 暴露的组件实例类型。 */\nexport type FaButtonInstance = InstanceType<typeof Button>;\n\n/** FaButton 的完整 Props 类型。 */\nexport type FaButtonProps = ExtractPropTypes<typeof faButtonProps>;\n\n/** FaButton 的 Emits 类型。 */\nexport type FaButtonEmits = typeof faButtonEmits;\n"],"mappings":";;;;AAMA,MAAa,WAA0C,YAAYA,cAAM"}
1
+ {"version":3,"file":"index.mjs","names":["Button"],"sources":["../../../src/components/button/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Button, { faButtonEmits, faButtonProps } from \"./src/button\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 支持异步加载状态和全局遮罩联动的按钮组件。 */\nexport const FaButton: TSXWithInstall<typeof Button> = withInstall(Button);\nexport default FaButton;\n\nexport { faButtonProps, faButtonEmits };\nexport type { FaButtonSlots } from \"./src/button\";\n\n/** FaButton 暴露的组件实例类型。 */\nexport type FaButtonInstance = InstanceType<typeof Button>;\n\n/** FaButton 的完整 Props 类型。 */\nexport type FaButtonProps = ExtractPropTypes<typeof faButtonProps>;\n\n/** FaButton 的 Emits 类型。 */\nexport type FaButtonEmits = typeof faButtonEmits;\n"],"mappings":";;;;AAMA,MAAa,WAA0C,YAAYA,cAAM"}
@@ -2,7 +2,7 @@ import type { FaContextMenuData } from "./contextMenu.type";
2
2
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
3
  /** @description 数据 */
4
4
  data: {
5
- type: import("vue").PropType<FaContextMenuData[]>;
5
+ type: import("vue").PropType<FaContextMenuData<any>[]>;
6
6
  default: () => never[];
7
7
  };
8
8
  }>, {
@@ -21,12 +21,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
21
21
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
22
22
  /** @description 数据 */
23
23
  data: {
24
- type: import("vue").PropType<FaContextMenuData[]>;
24
+ type: import("vue").PropType<FaContextMenuData<any>[]>;
25
25
  default: () => never[];
26
26
  };
27
27
  }>> & Readonly<{
28
- onClick?: ((event: MouseEvent, data: FaContextMenuData) => any) | undefined;
28
+ onClick?: ((event: MouseEvent, data: FaContextMenuData<any>) => any) | undefined;
29
29
  }>, {
30
- data: FaContextMenuData[];
30
+ data: FaContextMenuData<any>[];
31
31
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
32
32
  export default _default;
@@ -1,5 +1,5 @@
1
1
  /** FaContextMenu 菜单项配置。 */
2
- export interface FaContextMenuData {
2
+ export interface FaContextMenuData<Data = any> {
3
3
  /**
4
4
  * @description 名称
5
5
  */
@@ -23,9 +23,9 @@ export interface FaContextMenuData {
23
23
  /**
24
24
  * @description 点击事件
25
25
  */
26
- click?: (event: MouseEvent, data: FaContextMenuData) => Promise<void> | void;
26
+ click?: (event: MouseEvent, data: FaContextMenuData<Data>) => Promise<void> | void;
27
27
  /**
28
28
  * @description 携带数据
29
29
  */
30
- data?: Record<string, unknown>;
30
+ data?: Data;
31
31
  }
@@ -1,6 +1,6 @@
1
1
  import Dialog, { faDialogEmits, faDialogProps } from "./src/dialog";
2
- import type { TSXWithInstall } from "../../utils";
3
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
4
  /** 封装加载、确认与关闭控制的业务对话框组件。 */
5
5
  export declare const FaDialog: TSXWithInstall<typeof Dialog>;
6
6
  export default FaDialog;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Dialog"],"sources":["../../../src/components/dialog/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Dialog, { faDialogEmits, faDialogProps } from \"./src/dialog\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 封装加载、确认与关闭控制的业务对话框组件。 */\nexport const FaDialog: TSXWithInstall<typeof Dialog> = withInstall(Dialog);\nexport default FaDialog;\n\nexport { faDialogProps, faDialogEmits };\nexport type { FaDialogSlots } from \"./src/dialog\";\n\n/** FaDialog 暴露的组件实例类型。 */\nexport type FaDialogInstance = InstanceType<typeof Dialog>;\n\n/** FaDialog 的完整 Props 类型。 */\nexport type FaDialogProps = ExtractPropTypes<typeof faDialogProps>;\n\n/** FaDialog 的 Emits 类型。 */\nexport type FaDialogEmits = typeof faDialogEmits;\n"],"mappings":";;;;AAMA,MAAa,WAA0C,YAAYA,cAAM"}
1
+ {"version":3,"file":"index.mjs","names":["Dialog"],"sources":["../../../src/components/dialog/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Dialog, { faDialogEmits, faDialogProps } from \"./src/dialog\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 封装加载、确认与关闭控制的业务对话框组件。 */\nexport const FaDialog: TSXWithInstall<typeof Dialog> = withInstall(Dialog);\nexport default FaDialog;\n\nexport { faDialogProps, faDialogEmits };\nexport type { FaDialogSlots } from \"./src/dialog\";\n\n/** FaDialog 暴露的组件实例类型。 */\nexport type FaDialogInstance = InstanceType<typeof Dialog>;\n\n/** FaDialog 的完整 Props 类型。 */\nexport type FaDialogProps = ExtractPropTypes<typeof faDialogProps>;\n\n/** FaDialog 的 Emits 类型。 */\nexport type FaDialogEmits = typeof faDialogEmits;\n"],"mappings":";;;;AAMA,MAAa,WAA0C,YAAYA,cAAM"}
@@ -1,7 +1,7 @@
1
1
  import Drawer from "./src/drawer";
2
- import type { faDrawerEmits, faDrawerProps } from "./src/drawer";
3
- import type { TSXWithInstall } from "../../utils";
4
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
+ import type { faDrawerEmits, faDrawerProps } from "./src/drawer";
5
5
  /** 封装加载、确认与关闭控制的业务抽屉组件。 */
6
6
  export declare const FaDrawer: TSXWithInstall<typeof Drawer>;
7
7
  export default FaDrawer;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Drawer"],"sources":["../../../src/components/drawer/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Drawer from \"./src/drawer\";\nimport type { faDrawerEmits, faDrawerProps } from \"./src/drawer\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 封装加载、确认与关闭控制的业务抽屉组件。 */\nexport const FaDrawer: TSXWithInstall<typeof Drawer> = withInstall(Drawer);\nexport default FaDrawer;\n\nexport { faDrawerEmits, faDrawerProps } from \"./src/drawer\";\nexport type { FaDrawerSlots } from \"./src/drawer\";\n\n/** FaDrawer 暴露的组件实例类型。 */\nexport type FaDrawerInstance = InstanceType<typeof Drawer>;\n\n/** FaDrawer 的完整 Props 类型。 */\nexport type FaDrawerProps = ExtractPropTypes<typeof faDrawerProps>;\n\n/** FaDrawer 的 Emits 类型。 */\nexport type FaDrawerEmits = typeof faDrawerEmits;\n"],"mappings":";;;;AAOA,MAAa,WAA0C,YAAYA,cAAM"}
1
+ {"version":3,"file":"index.mjs","names":["Drawer"],"sources":["../../../src/components/drawer/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Drawer from \"./src/drawer\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { faDrawerEmits, faDrawerProps } from \"./src/drawer\";\n\n/** 封装加载、确认与关闭控制的业务抽屉组件。 */\nexport const FaDrawer: TSXWithInstall<typeof Drawer> = withInstall(Drawer);\nexport default FaDrawer;\n\nexport { faDrawerEmits, faDrawerProps } from \"./src/drawer\";\nexport type { FaDrawerSlots } from \"./src/drawer\";\n\n/** FaDrawer 暴露的组件实例类型。 */\nexport type FaDrawerInstance = InstanceType<typeof Drawer>;\n\n/** FaDrawer 的完整 Props 类型。 */\nexport type FaDrawerProps = ExtractPropTypes<typeof faDrawerProps>;\n\n/** FaDrawer 的 Emits 类型。 */\nexport type FaDrawerEmits = typeof faDrawerEmits;\n"],"mappings":";;;;AAOA,MAAa,WAA0C,YAAYA,cAAM"}
@@ -1,7 +1,7 @@
1
1
  import Form, { faFormEmits, faFormProps } from "./src/form";
2
2
  import FormItem, { faFormItemProps } from "./src/formItem";
3
- import type { TSXWithInstall } from "../../utils";
4
3
  import type { ExtractPropTypes } from "vue";
4
+ import type { TSXWithInstall } from "../../utils";
5
5
  /** 支持响应式布局和表单项配置的业务表单组件。 */
6
6
  export declare const FaForm: TSXWithInstall<typeof Form> & {
7
7
  FormItem: typeof FormItem;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Form","FormItem"],"sources":["../../../src/components/form/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Form, { faFormEmits, faFormProps } from \"./src/form\";\nimport FormItem, { faFormItemProps } from \"./src/formItem\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 支持响应式布局和表单项配置的业务表单组件。 */\nexport const FaForm: TSXWithInstall<typeof Form> & { FormItem: typeof FormItem } = withInstall(Form, {\n\tFormItem,\n});\nexport default FaForm;\n\n/** 可独立注册的 FaForm 表单项组件。 */\nexport const FaFormItem: TSXWithInstall<typeof FormItem> = withNoopInstall(FormItem);\n\nexport { faFormEmits, faFormProps, faFormItemProps };\nexport type { FaFormSlots } from \"./src/form\";\nexport type { FaFormItemSlots } from \"./src/formItem\";\n\n/** FaForm 暴露的组件实例类型。 */\nexport type FaFormInstance = InstanceType<typeof Form>;\n\n/** FaForm 的完整 Props 类型。 */\nexport type FaFormProps = ExtractPropTypes<typeof faFormProps>;\n\n/** FaFormItem 暴露的组件实例类型。 */\nexport type FaFormItemInstance = InstanceType<typeof FormItem>;\n\n/** FaFormItem 的完整 Props 类型。 */\nexport type FaFormItemProps = ExtractPropTypes<typeof faFormItemProps>;\n\nexport * from \"./utils/form\";\n"],"mappings":";;;;;;AAOA,MAAa,SAAsE,YAAYA,cAAM,EACpG,UAAA,iBACD,CAAC;;AAID,MAAa,aAA8C,gBAAgBC,gBAAQ"}
1
+ {"version":3,"file":"index.mjs","names":["Form","FormItem"],"sources":["../../../src/components/form/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Form, { faFormEmits, faFormProps } from \"./src/form\";\nimport FormItem, { faFormItemProps } from \"./src/formItem\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 支持响应式布局和表单项配置的业务表单组件。 */\nexport const FaForm: TSXWithInstall<typeof Form> & { FormItem: typeof FormItem } = withInstall(Form, {\n\tFormItem,\n});\nexport default FaForm;\n\n/** 可独立注册的 FaForm 表单项组件。 */\nexport const FaFormItem: TSXWithInstall<typeof FormItem> = withNoopInstall(FormItem);\n\nexport { faFormEmits, faFormProps, faFormItemProps };\nexport type { FaFormSlots } from \"./src/form\";\nexport type { FaFormItemSlots } from \"./src/formItem\";\n\n/** FaForm 暴露的组件实例类型。 */\nexport type FaFormInstance = InstanceType<typeof Form>;\n\n/** FaForm 的完整 Props 类型。 */\nexport type FaFormProps = ExtractPropTypes<typeof faFormProps>;\n\n/** FaFormItem 暴露的组件实例类型。 */\nexport type FaFormItemInstance = InstanceType<typeof FormItem>;\n\n/** FaFormItem 的完整 Props 类型。 */\nexport type FaFormItemProps = ExtractPropTypes<typeof faFormItemProps>;\n\nexport * from \"./utils/form\";\n"],"mappings":";;;;;;AAOA,MAAa,SAAsE,YAAYA,cAAM,EACpG,UAAA,iBACD,CAAC;;AAID,MAAa,aAA8C,gBAAgBC,gBAAQ"}
@@ -1,5 +1,5 @@
1
- import type { FaLayoutGridBreakPoint } from "../../layoutGrid";
2
1
  import type { FormItemContext, FormValidateCallback, FormValidationResult } from "element-plus";
2
+ import type { FaLayoutGridBreakPoint } from "../../layoutGrid";
3
3
  /** FaForm 的运行时 Props 定义。 */
4
4
  export declare const faFormProps: {
5
5
  /** @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported. */
@@ -60,7 +60,10 @@ export declare const faFormEmits: {
60
60
  /** FaForm 的插槽参数。 */
61
61
  export interface FaFormSlots extends Record<string, unknown> {
62
62
  /** @description 默认内容插槽 */
63
- default: unknown;
63
+ default: {
64
+ cols: Record<FaLayoutGridBreakPoint, number>;
65
+ gap: [number, number];
66
+ };
64
67
  }
65
68
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
66
69
  /** @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported. */
@@ -1 +1 @@
1
- {"version":3,"file":"form.mjs","names":[],"sources":["../../../../src/components/form/src/form.tsx"],"sourcesContent":["import { computed, defineComponent, provide, reactive, ref } from \"vue\";\nimport { ElForm, formEmits, formProps, useGlobalSize } from \"element-plus\";\nimport { isNumber, isObject } from \"lodash-unified\";\nimport { definePropType, makeSlots, useEmits, useExpose, useProps, useRender } from \"../../../utils\";\nimport { FaLayoutGrid } from \"../../layoutGrid\";\nimport { formUtil } from \"../utils/form\";\nimport type { FaLayoutGridBreakPoint } from \"../../layoutGrid\";\nimport type { FormInstance, FormItemContext, FormValidateCallback, FormValidationResult } from \"element-plus\";\n\n/** FaForm 的运行时 Props 定义。 */\nexport const faFormProps = {\n\t...formProps,\n\t/** @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported. */\n\tlabelWidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"auto\",\n\t},\n\t/** @description Suffix of the label. */\n\tlabelSuffix: {\n\t\ttype: String,\n\t\tdefault: \":\",\n\t},\n\t/** @description When validation fails, scroll to the first error form entry. */\n\tscrollToError: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 详情From,会删除 FormItem 的 paddinfa-bottom */\n\tdetailForm: Boolean,\n\t/** @description Grid布局*/\n\tgrid: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description Grid布局列配置 */\n\tcols: {\n\t\ttype: definePropType<string | number | Record<FaLayoutGridBreakPoint, number>>([String, Number, Object]),\n\t\tdefault: (): Record<FaLayoutGridBreakPoint, number> => ({ xs: 1, sm: 2, md: 3, lg: 4, xl: 5 }),\n\t},\n};\n\n/** FaForm 的运行时事件定义。 */\nexport const faFormEmits = {\n\t...formEmits,\n};\n\n/** FaForm 的插槽参数。 */\nexport interface FaFormSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: unknown;\n}\n\nexport default defineComponent({\n\tname: \"FaForm\",\n\tprops: faFormProps,\n\temits: faFormEmits,\n\tslots: makeSlots<FaFormSlots>(),\n\tsetup(props, { slots, expose, emit }) {\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tcols: computed(() => {\n\t\t\t\tif (isObject(props.cols)) {\n\t\t\t\t\treturn props.cols;\n\t\t\t\t} else {\n\t\t\t\t\tconst colsNumber = isNumber(props.cols) ? props.cols : Number(props.cols);\n\t\t\t\t\treturn { xs: 1, sm: colsNumber, md: colsNumber, lg: colsNumber, xl: colsNumber };\n\t\t\t\t}\n\t\t\t}),\n\t\t\tgap: computed<[number, number]>(() => (_globalSize.value === \"small\" ? [15, 0] : [20, 0])),\n\t\t});\n\n\t\tconst formRef = ref<FormInstance>();\n\n\t\t// 注入 cols\n\t\tprovide(\"faFormCols\", state.cols);\n\n\t\tconst elFormProps = useProps(props, formProps);\n\t\tconst elFormEmits = useEmits(formEmits, emit);\n\n\t\tuseRender(() => (\n\t\t\t<ElForm\n\t\t\t\t{...elFormProps.value}\n\t\t\t\t{...elFormEmits.value}\n\t\t\t\tref={formRef}\n\t\t\t\tclass={[\"fa-form\", `fa-form-${_globalSize.value}`, { [`fa-form-detail fa-form-detail_${_globalSize.value}`]: props.detailForm }]}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\tprops.grid ? (\n\t\t\t\t\t\t\t<FaLayoutGrid collapsed gap={state.gap} cols={state.cols}>\n\t\t\t\t\t\t\t\t{slots.default?.(state)}\n\t\t\t\t\t\t\t</FaLayoutGrid>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tslots.default?.(state)\n\t\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ElForm>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 对整个表单的内容进行验证。 接收一个回调函数,或返回 Promise。 */\n\t\t\tvalidate: (callback?: FormValidateCallback): FormValidationResult =>\n\t\t\t\tcallback ? (formRef.value?.validate(callback) ?? Promise.reject(new Error(\"ElForm 实例尚未挂载。\"))) : formUtil.validate(formRef),\n\t\t\t/** @description 验证具体的某个字段。 */\n\t\t\tvalidateField: computed(() => formRef.value?.validateField),\n\t\t\t/** @description 重置该表单项,将其值重置为初始值,并移除校验结果 */\n\t\t\tresetFields: computed(() => formRef.value?.resetFields),\n\t\t\t/** @description 清理某个字段的表单验证信息。 */\n\t\t\tclearValidate: computed(() => formRef.value?.clearValidate),\n\t\t\t/** @description 滚动到指定的字段 */\n\t\t\tscrollToField: computed(() => formRef.value?.scrollToField),\n\t\t\t/** @description 获取所有字段的 context */\n\t\t\tfields: computed(() => formRef.value?.fields as FormItemContext[]),\n\t\t\t/** @description 获取指定字段的 context。 */\n\t\t\tgetField: computed(() => formRef.value?.getField),\n\t\t\t/** @description 设置表单字段的初始值。 */\n\t\t\tsetInitialValues: computed(() => formRef.value?.setInitialValues),\n\t\t\t/** @description 对整个表单的内容进行验证,带滚动。 接收一个回调函数,或返回 Promise。 */\n\t\t\tvalidateScrollToField: (): FormValidationResult => formUtil.validateScrollToField(formRef),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;AAUA,MAAa,cAAc;CAC1B,GAAG;;CAEH,YAAY;EACX,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,eAAe;EACd,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;;CAEZ,MAAM;EACL,MAAM;EACN,SAAS;CACV;;CAEA,MAAM;EACL,MAAM,eAAyE;GAAC;GAAQ;GAAQ;EAAM,CAAC;EACvG,gBAAwD;GAAE,IAAI;GAAG,IAAI;GAAG,IAAI;GAAG,IAAI;GAAG,IAAI;EAAE;CAC7F;AACD;;AAGA,MAAa,cAAc,EAC1B,GAAG,UACJ;AAQA,IAAA,eAAe,gBAAgB;CAC9B,MAAM;CACN,OAAO;CACP,OAAO;CACP,OAAO,UAAuB;CAC9B,MAAM,OAAO,EAAE,OAAO,QAAQ,QAAQ;EACrC,MAAM,cAAc,cAAc;EAElC,MAAM,QAAQ,SAAS;GACtB,MAAM,eAAe;IACpB,IAAI,SAAS,MAAM,IAAI,GACtB,OAAO,MAAM;SACP;KACN,MAAM,aAAa,SAAS,MAAM,IAAI,IA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{"version":3,"file":"form.mjs","names":[],"sources":["../../../../src/components/form/src/form.tsx"],"sourcesContent":["import { computed, defineComponent, provide, reactive, ref } from \"vue\";\nimport { ElForm, formEmits, formProps, useGlobalSize } from \"element-plus\";\nimport { isNumber, isObject } from \"lodash-unified\";\nimport { definePropType, makeSlots, useEmits, useExpose, useProps, useRender } from \"../../../utils\";\nimport { FaLayoutGrid } from \"../../layoutGrid\";\nimport { formUtil } from \"../utils/form\";\nimport type { FormInstance, FormItemContext, FormValidateCallback, FormValidationResult } from \"element-plus\";\nimport type { FaLayoutGridBreakPoint } from \"../../layoutGrid\";\n\n/** FaForm 的运行时 Props 定义。 */\nexport const faFormProps = {\n\t...formProps,\n\t/** @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported. */\n\tlabelWidth: {\n\t\ttype: [String, Number],\n\t\tdefault: \"auto\",\n\t},\n\t/** @description Suffix of the label. */\n\tlabelSuffix: {\n\t\ttype: String,\n\t\tdefault: \":\",\n\t},\n\t/** @description When validation fails, scroll to the first error form entry. */\n\tscrollToError: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description 详情From,会删除 FormItem 的 paddinfa-bottom */\n\tdetailForm: Boolean,\n\t/** @description Grid布局*/\n\tgrid: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/** @description Grid布局列配置 */\n\tcols: {\n\t\ttype: definePropType<string | number | Record<FaLayoutGridBreakPoint, number>>([String, Number, Object]),\n\t\tdefault: (): Record<FaLayoutGridBreakPoint, number> => ({ xs: 1, sm: 2, md: 3, lg: 4, xl: 5 }),\n\t},\n};\n\n/** FaForm 的运行时事件定义。 */\nexport const faFormEmits = {\n\t...formEmits,\n};\n\n/** FaForm 的插槽参数。 */\nexport interface FaFormSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: { cols: Record<FaLayoutGridBreakPoint, number>; gap: [number, number] };\n}\n\nexport default defineComponent({\n\tname: \"FaForm\",\n\tprops: faFormProps,\n\temits: faFormEmits,\n\tslots: makeSlots<FaFormSlots>(),\n\tsetup(props, { slots, expose, emit }) {\n\t\tconst _globalSize = useGlobalSize();\n\n\t\tconst state = reactive({\n\t\t\tcols: computed(() => {\n\t\t\t\tif (isObject(props.cols)) {\n\t\t\t\t\treturn props.cols;\n\t\t\t\t} else {\n\t\t\t\t\tconst colsNumber = isNumber(props.cols) ? props.cols : Number(props.cols);\n\t\t\t\t\treturn { xs: 1, sm: colsNumber, md: colsNumber, lg: colsNumber, xl: colsNumber };\n\t\t\t\t}\n\t\t\t}),\n\t\t\tgap: computed<[number, number]>(() => (_globalSize.value === \"small\" ? [15, 0] : [20, 0])),\n\t\t});\n\n\t\tconst formRef = ref<FormInstance>();\n\n\t\t// 注入 cols\n\t\tprovide(\"faFormCols\", state.cols);\n\n\t\tconst elFormProps = useProps(props, formProps);\n\t\tconst elFormEmits = useEmits(formEmits, emit);\n\n\t\tuseRender(() => (\n\t\t\t<ElForm\n\t\t\t\t{...elFormProps.value}\n\t\t\t\t{...elFormEmits.value}\n\t\t\t\tref={formRef}\n\t\t\t\tclass={[\"fa-form\", `fa-form-${_globalSize.value}`, { [`fa-form-detail fa-form-detail_${_globalSize.value}`]: props.detailForm }]}\n\t\t\t>\n\t\t\t\t{{\n\t\t\t\t\tdefault: () =>\n\t\t\t\t\t\tprops.grid ? (\n\t\t\t\t\t\t\t<FaLayoutGrid collapsed gap={state.gap} cols={state.cols}>\n\t\t\t\t\t\t\t\t{slots.default?.(state)}\n\t\t\t\t\t\t\t</FaLayoutGrid>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tslots.default?.(state)\n\t\t\t\t\t\t),\n\t\t\t\t}}\n\t\t\t</ElForm>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 对整个表单的内容进行验证。 接收一个回调函数,或返回 Promise。 */\n\t\t\tvalidate: (callback?: FormValidateCallback): FormValidationResult =>\n\t\t\t\tcallback ? (formRef.value?.validate(callback) ?? Promise.reject(new Error(\"ElForm 实例尚未挂载。\"))) : formUtil.validate(formRef),\n\t\t\t/** @description 验证具体的某个字段。 */\n\t\t\tvalidateField: computed(() => formRef.value?.validateField),\n\t\t\t/** @description 重置该表单项,将其值重置为初始值,并移除校验结果 */\n\t\t\tresetFields: computed(() => formRef.value?.resetFields),\n\t\t\t/** @description 清理某个字段的表单验证信息。 */\n\t\t\tclearValidate: computed(() => formRef.value?.clearValidate),\n\t\t\t/** @description 滚动到指定的字段 */\n\t\t\tscrollToField: computed(() => formRef.value?.scrollToField),\n\t\t\t/** @description 获取所有字段的 context */\n\t\t\tfields: computed(() => formRef.value?.fields as FormItemContext[]),\n\t\t\t/** @description 获取指定字段的 context。 */\n\t\t\tgetField: computed(() => formRef.value?.getField),\n\t\t\t/** @description 设置表单字段的初始值。 */\n\t\t\tsetInitialValues: computed(() => formRef.value?.setInitialValues),\n\t\t\t/** @description 对整个表单的内容进行验证,带滚动。 接收一个回调函数,或返回 Promise。 */\n\t\t\tvalidateScrollToField: (): FormValidationResult => formUtil.validateScrollToField(formRef),\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;AAUA,MAAa,cAAc;CAC1B,GAAG;;CAEH,YAAY;EACX,MAAM,CAAC,QAAQ,MAAM;EACrB,SAAS;CACV;;CAEA,aAAa;EACZ,MAAM;EACN,SAAS;CACV;;CAEA,eAAe;EACd,MAAM;EACN,SAAS;CACV;;CAEA,YAAY;;CAEZ,MAAM;EACL,MAAM;EACN,SAAS;CACV;;CAEA,MAAM;EACL,MAAM,eAAyE;GAAC;GAAQ;GAAQ;EAAM,CAAC;EACvG,gBAAwD;GAAE,IAAI;GAAG,IAAI;GAAG,IAAI;GAAG,IAAI;GAAG,IAAI;EAAE;CAC7F;AACD;;AAGA,MAAa,cAAc,EAC1B,GAAG,UACJ;AAQA,IAAA,eAAe,gBAAgB;CAC9B,MAAM;CACN,OAAO;CACP,OAAO;CACP,OAAO,UAAuB;CAC9B,MAAM,OAAO,EA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e,QAAQ,OAAO,MAA2B;;GAEjE,UAAU,eAAe,QAAQ,OAAO,QAAQ;;GAEhD,kBAAkB,eAAe,QAAQ,OAAO,gBAAgB;;GAEhE,6BAAmD,SAAS,sBAAsB,OAAO;EAC1F,CAAC;CACF;AACD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import FormItemTip, { faFormItemTipProps } from "./src/formItemTip";
2
- import type { TSXWithInstall } from "../../utils";
3
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
4
  /** 为表单项标签提供补充说明的提示组件。 */
5
5
  export declare const FaFormItemTip: TSXWithInstall<typeof FormItemTip>;
6
6
  export default FaFormItemTip;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["FormItemTip"],"sources":["../../../src/components/formItemTip/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport FormItemTip, { faFormItemTipProps } from \"./src/formItemTip\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 为表单项标签提供补充说明的提示组件。 */\nexport const FaFormItemTip: TSXWithInstall<typeof FormItemTip> = withInstall(FormItemTip);\nexport default FaFormItemTip;\n\nexport { faFormItemTipProps };\nexport type { FaFormItemTipSlots } from \"./src/formItemTip\";\n\n/** FaFormItemTip 暴露的组件实例类型。 */\nexport type FaFormItemTipInstance = InstanceType<typeof FormItemTip>;\n\n/** FaFormItemTip 的完整 Props 类型。 */\nexport type FaFormItemTipProps = ExtractPropTypes<typeof faFormItemTipProps>;\n"],"mappings":";;;;AAMA,MAAa,gBAAoD,YAAYA,mBAAW"}
1
+ {"version":3,"file":"index.mjs","names":["FormItemTip"],"sources":["../../../src/components/formItemTip/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport FormItemTip, { faFormItemTipProps } from \"./src/formItemTip\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 为表单项标签提供补充说明的提示组件。 */\nexport const FaFormItemTip: TSXWithInstall<typeof FormItemTip> = withInstall(FormItemTip);\nexport default FaFormItemTip;\n\nexport { faFormItemTipProps };\nexport type { FaFormItemTipSlots } from \"./src/formItemTip\";\n\n/** FaFormItemTip 暴露的组件实例类型。 */\nexport type FaFormItemTipInstance = InstanceType<typeof FormItemTip>;\n\n/** FaFormItemTip 的完整 Props 类型。 */\nexport type FaFormItemTipProps = ExtractPropTypes<typeof faFormItemTipProps>;\n"],"mappings":";;;;AAMA,MAAa,gBAAoD,YAAYA,mBAAW"}
@@ -1,7 +1,7 @@
1
1
  import Icon from "./src/icon";
2
- import type { faIconProps } from "./src/icon";
3
- import type { TSXWithInstall } from "../../utils";
4
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
+ import type { faIconProps } from "./src/icon";
5
5
  /** 按名称或组件渲染图标的统一图标组件。 */
6
6
  export declare const FaIcon: TSXWithInstall<typeof Icon>;
7
7
  export default FaIcon;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Icon"],"sources":["../../../src/components/icon/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Icon from \"./src/icon\";\nimport type { faIconProps } from \"./src/icon\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 按名称或组件渲染图标的统一图标组件。 */\nexport const FaIcon: TSXWithInstall<typeof Icon> = withInstall(Icon);\nexport default FaIcon;\n\nexport { faIconProps } from \"./src/icon\";\n\n/** FaIcon 暴露的组件实例类型。 */\nexport type FaIconInstance = InstanceType<typeof Icon>;\n\n/** FaIcon 的完整 Props 类型。 */\nexport type FaIconProps = ExtractPropTypes<typeof faIconProps>;\n"],"mappings":";;;;AAOA,MAAa,SAAsC,YAAYA,YAAI"}
1
+ {"version":3,"file":"index.mjs","names":["Icon"],"sources":["../../../src/components/icon/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Icon from \"./src/icon\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { faIconProps } from \"./src/icon\";\n\n/** 按名称或组件渲染图标的统一图标组件。 */\nexport const FaIcon: TSXWithInstall<typeof Icon> = withInstall(Icon);\nexport default FaIcon;\n\nexport { faIconProps } from \"./src/icon\";\n\n/** FaIcon 暴露的组件实例类型。 */\nexport type FaIconInstance = InstanceType<typeof Icon>;\n\n/** FaIcon 的完整 Props 类型。 */\nexport type FaIconProps = ExtractPropTypes<typeof faIconProps>;\n"],"mappings":";;;;AAOA,MAAa,SAAsC,YAAYA,YAAI"}
@@ -1,6 +1,6 @@
1
1
  import Image, { faImageEmits, faImageProps } from "./src/image";
2
- import type { TSXWithInstall } from "../../utils";
3
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
4
  /** 支持占位、失败回退和地址处理的图片组件。 */
5
5
  export declare const FaImage: TSXWithInstall<typeof Image>;
6
6
  export default FaImage;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Image"],"sources":["../../../src/components/image/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Image, { faImageEmits, faImageProps } from \"./src/image\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 支持占位、失败回退和地址处理的图片组件。 */\nexport const FaImage: TSXWithInstall<typeof Image> = withInstall(Image);\nexport default FaImage;\n\nexport { faImageEmits, faImageProps };\nexport type { FaImageSlots } from \"./src/image\";\n\n/** FaImage 暴露的组件实例类型。 */\nexport type FaImageInstance = InstanceType<typeof Image>;\n\n/** FaImage 的完整 Props 类型。 */\nexport type FaImageProps = ExtractPropTypes<typeof faImageProps>;\n"],"mappings":";;;;AAMA,MAAa,UAAwC,YAAYA,aAAK"}
1
+ {"version":3,"file":"index.mjs","names":["Image"],"sources":["../../../src/components/image/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport Image, { faImageEmits, faImageProps } from \"./src/image\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 支持占位、失败回退和地址处理的图片组件。 */\nexport const FaImage: TSXWithInstall<typeof Image> = withInstall(Image);\nexport default FaImage;\n\nexport { faImageEmits, faImageProps };\nexport type { FaImageSlots } from \"./src/image\";\n\n/** FaImage 暴露的组件实例类型。 */\nexport type FaImageInstance = InstanceType<typeof Image>;\n\n/** FaImage 的完整 Props 类型。 */\nexport type FaImageProps = ExtractPropTypes<typeof faImageProps>;\n"],"mappings":";;;;AAMA,MAAa,UAAwC,YAAYA,aAAK"}
@@ -1,6 +1,6 @@
1
1
  import InputDialogPage, { faInputDialogPageEmits, faInputDialogPageProps } from "./src/inputDialogPage";
2
- import type { TSXWithInstall } from "../../utils";
3
2
  import type { ExtractPropTypes } from "vue";
3
+ import type { TSXWithInstall } from "../../utils";
4
4
  /** 在对话框中提供分页选择与输入交互的组件。 */
5
5
  export declare const FaInputDialogPage: TSXWithInstall<typeof InputDialogPage>;
6
6
  export default FaInputDialogPage;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["InputDialogPage"],"sources":["../../../src/components/inputDialogPage/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport InputDialogPage, { faInputDialogPageEmits, faInputDialogPageProps } from \"./src/inputDialogPage\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 在对话框中提供分页选择与输入交互的组件。 */\nexport const FaInputDialogPage: TSXWithInstall<typeof InputDialogPage> = withInstall(InputDialogPage);\nexport default FaInputDialogPage;\n\nexport { faInputDialogPageProps, faInputDialogPageEmits };\nexport type { FaInputDialogPageSlots } from \"./src/inputDialogPage\";\n\n/** FaInputDialogPage 暴露的组件实例类型。 */\nexport type FaInputDialogPageInstance = InstanceType<typeof InputDialogPage>;\n\n/** FaInputDialogPage 的完整 Props 类型。 */\nexport type FaInputDialogPageProps = ExtractPropTypes<typeof faInputDialogPageProps>;\n\n/** FaInputDialogPage 的 Emits 类型。 */\nexport type FaInputDialogPageEmits = typeof faInputDialogPageEmits;\n"],"mappings":";;;;AAMA,MAAa,oBAA4D,YAAYA,uBAAe"}
1
+ {"version":3,"file":"index.mjs","names":["InputDialogPage"],"sources":["../../../src/components/inputDialogPage/index.ts"],"sourcesContent":["import { withInstall } from \"../../utils\";\nimport InputDialogPage, { faInputDialogPageEmits, faInputDialogPageProps } from \"./src/inputDialogPage\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\n\n/** 在对话框中提供分页选择与输入交互的组件。 */\nexport const FaInputDialogPage: TSXWithInstall<typeof InputDialogPage> = withInstall(InputDialogPage);\nexport default FaInputDialogPage;\n\nexport { faInputDialogPageProps, faInputDialogPageEmits };\nexport type { FaInputDialogPageSlots } from \"./src/inputDialogPage\";\n\n/** FaInputDialogPage 暴露的组件实例类型。 */\nexport type FaInputDialogPageInstance = InstanceType<typeof InputDialogPage>;\n\n/** FaInputDialogPage 的完整 Props 类型。 */\nexport type FaInputDialogPageProps = ExtractPropTypes<typeof faInputDialogPageProps>;\n\n/** FaInputDialogPage 的 Emits 类型。 */\nexport type FaInputDialogPageEmits = typeof faInputDialogPageEmits;\n"],"mappings":";;;;AAMA,MAAa,oBAA4D,YAAYA,uBAAe"}
@@ -1,11 +1,11 @@
1
- import { type PagedInput, type PagedResult } from "../../table";
2
1
  import type { TableProps } from "element-plus";
3
2
  import type { PropType } from "vue";
3
+ import type { DefaultRow, PagedInput, PagedResult } from "../../table";
4
4
  /** FaInputDialogPage 的运行时 Props 定义。 */
5
5
  export declare const faInputDialogPageProps: {
6
6
  /** @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used */
7
7
  rowKey: {
8
- type: PropType<TableProps<Record<string, unknown>>["rowKey"]>;
8
+ type: PropType<TableProps<DefaultRow>["rowKey"]>;
9
9
  default: string;
10
10
  };
11
11
  /** @description v-model绑定值 */
@@ -23,10 +23,10 @@ export declare const faInputDialogPageProps: {
23
23
  title: StringConstructor;
24
24
  /** @description 请求api */
25
25
  requestApi: {
26
- type: PropType<(params?: PagedInput) => Promise<PagedResult | Record<string, unknown>[]>>;
26
+ type: PropType<(params?: PagedInput) => Promise<PagedResult | DefaultRow[]>>;
27
27
  };
28
28
  /** 初始化参数 */
29
- initParam: PropType<unknown>;
29
+ initParam: PropType<string | number | PagedInput>;
30
30
  /** @description 显示文本 Key */
31
31
  labelKey: {
32
32
  type: StringConstructor;
@@ -40,7 +40,7 @@ export declare const faInputDialogPageEmits: {
40
40
  /** @description v-model:label 回调 */
41
41
  "update:label": (value: string | null) => boolean;
42
42
  /** @description 改变 */
43
- change: (_data: unknown, _value?: string | number | null) => boolean;
43
+ change: (_data: DefaultRow | null, _value?: string | number | null) => boolean;
44
44
  };
45
45
  /** FaInputDialogPage 的插槽参数。 */
46
46
  export interface FaInputDialogPageSlots extends Record<string, unknown> {
@@ -50,7 +50,7 @@ export interface FaInputDialogPageSlots extends Record<string, unknown> {
50
50
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
51
51
  /** @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used */
52
52
  rowKey: {
53
- type: PropType<TableProps<Record<string, unknown>>["rowKey"]>;
53
+ type: PropType<TableProps<DefaultRow>["rowKey"]>;
54
54
  default: string;
55
55
  };
56
56
  /** @description v-model绑定值 */
@@ -68,10 +68,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
68
68
  title: StringConstructor;
69
69
  /** @description 请求api */
70
70
  requestApi: {
71
- type: PropType<(params?: PagedInput) => Promise<PagedResult | Record<string, unknown>[]>>;
71
+ type: PropType<(params?: PagedInput) => Promise<PagedResult | DefaultRow[]>>;
72
72
  };
73
73
  /** 初始化参数 */
74
- initParam: PropType<unknown>;
74
+ initParam: PropType<string | number | PagedInput>;
75
75
  /** @description 显示文本 Key */
76
76
  labelKey: {
77
77
  type: StringConstructor;
@@ -79,7 +79,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
79
79
  };
80
80
  }>, {
81
81
  /** @description 选择行数据 */
82
- selectionRow: import("vue").ComputedRef<Record<string, unknown>>;
82
+ selectionRow: import("vue").ComputedRef<DefaultRow>;
83
83
  /** @description 打开选择器弹窗 */
84
84
  open: () => void;
85
85
  /** @description 清除选择 */
@@ -90,11 +90,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
90
90
  /** @description v-model:label 回调 */
91
91
  "update:label": (value: string | null) => boolean;
92
92
  /** @description 改变 */
93
- change: (_data: unknown, _value?: string | number | null) => boolean;
93
+ change: (_data: DefaultRow | null, _value?: string | number | null) => boolean;
94
94
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
95
95
  /** @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used */
96
96
  rowKey: {
97
- type: PropType<TableProps<Record<string, unknown>>["rowKey"]>;
97
+ type: PropType<TableProps<DefaultRow>["rowKey"]>;
98
98
  default: string;
99
99
  };
100
100
  /** @description v-model绑定值 */
@@ -112,23 +112,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
112
112
  title: StringConstructor;
113
113
  /** @description 请求api */
114
114
  requestApi: {
115
- type: PropType<(params?: PagedInput) => Promise<PagedResult | Record<string, unknown>[]>>;
115
+ type: PropType<(params?: PagedInput) => Promise<PagedResult | DefaultRow[]>>;
116
116
  };
117
117
  /** 初始化参数 */
118
- initParam: PropType<unknown>;
118
+ initParam: PropType<string | number | PagedInput>;
119
119
  /** @description 显示文本 Key */
120
120
  labelKey: {
121
121
  type: StringConstructor;
122
122
  default: string;
123
123
  };
124
124
  }>> & Readonly<{
125
- onChange?: ((_data: unknown, _value?: string | number | null | undefined) => any) | undefined;
125
+ onChange?: ((_data: DefaultRow | null, _value?: string | number | null | undefined) => any) | undefined;
126
126
  "onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
127
127
  "onUpdate:label"?: ((value: string | null) => any) | undefined;
128
128
  }>, {
129
129
  disabled: boolean;
130
130
  placeholder: string;
131
- rowKey: string | ((row: Record<string, unknown>) => string) | undefined;
131
+ rowKey: string | ((row: DefaultRow) => string) | undefined;
132
132
  labelKey: string;
133
133
  }, import("../../../utils").TypedSlotsDeclaration<FaInputDialogPageSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
134
134
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"inputDialogPage.mjs","names":["update:modelValue","update:label"],"sources":["../../../../src/components/inputDialogPage/src/inputDialogPage.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, reactive, ref } from \"vue\";\nimport { Delete, Search } from \"@element-plus/icons-vue\";\nimport { ElButton, ElButtonGroup, ElInput } from \"element-plus\";\nimport { isFunction, isNull, isNumber, isString } from \"lodash-unified\";\nimport { definePropType, makeSlots, useExpose, useRender, withDefineType } from \"../../../utils\";\nimport FaDialog from \"../../dialog\";\nimport { FaTable, type FaTableInstance, type PagedInput, type PagedResult } from \"../../table\";\nimport type { FaDialogInstance } from \"../../dialog\";\nimport type { TableProps } from \"element-plus\";\nimport type { PropType } from \"vue\";\n\n/** FaInputDialogPage 的运行时 Props 定义。 */\nexport const faInputDialogPageProps = {\n\t/** @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used */\n\trowKey: {\n\t\ttype: [String, Function] as PropType<TableProps<Record<string, unknown>>[\"rowKey\"]>,\n\t\tdefault: \"id\",\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: [String, Number] as PropType<string | number | null>,\n\t/** @description v-model:label绑定值 */\n\tlabel: String as PropType<string | null>,\n\t/** @description 输入框占位文本 */\n\tplaceholder: {\n\t\ttype: String,\n\t\tdefault: \"请选择\",\n\t},\n\t/** @description 禁用 */\n\tdisabled: Boolean,\n\t/** @description 标题 */\n\ttitle: String,\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: PagedInput) => Promise<PagedResult | Record<string, unknown>[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<unknown>([String, Number, Object]),\n\t/** @description 显示文本 Key */\n\tlabelKey: {\n\t\ttype: String,\n\t\tdefault: \"name\",\n\t},\n};\n\n/** FaInputDialogPage 的运行时 Emits 定义。 */\nexport const faInputDialogPageEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | null): boolean => isString(value) || isNumber(value) || isNull(value),\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | null): boolean => isString(value) || isNull(value),\n\t/** @description 改变 */\n\tchange: (_data: unknown, _value?: string | number | null): boolean => true,\n};\n\n/** FaInputDialogPage 的插槽参数。 */\nexport interface FaInputDialogPageSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n}\n\nexport default defineComponent({\n\tname: \"FaInputDialogPage\",\n\tprops: faInputDialogPageProps,\n\temits: faInputDialogPageEmits,\n\tslots: makeSlots<FaInputDialogPageSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst modelValue = useVModel(props, \"modelValue\", emit, { passive: true });\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\n\t\tconst state = reactive({\n\t\t\tselectionRow: withDefineType<Record<string, unknown>>(),\n\t\t});\n\n\t\tconst faDialogRef = ref<FaDialogInstance>();\n\t\tconst faTableRef = ref<FaTableInstance>();\n\n\t\tconst handleDeleteClick = (): void => {\n\t\t\tmodelValue.value = null;\n\t\t\tselectedLabel.value = null;\n\t\t\temit(\"change\", null);\n\t\t};\n\n\t\tconst handleSearchClick = (): void => {\n\t\t\tfaDialogRef.value?.open(() => {\n\t\t\t\tconst table = faTableRef.value;\n\t\t\t\tif (table === undefined) return;\n\t\t\t\tif (state.selectionRow) {\n\t\t\t\t\t// 判断当前行是否选中\n\t\t\t\t\tconst rawRowKey = isFunction(props.rowKey) ? props.rowKey(state.selectionRow) : state.selectionRow[props.rowKey];\n\t\t\t\t\tconst rowSelected = (typeof rawRowKey === \"string\" || typeof rawRowKey === \"number\") && table.selectedListIds.includes(rawRowKey);\n\t\t\t\t\tif (!rowSelected) {\n\t\t\t\t\t\ttable.toggleRowSelection?.(state.selectionRow);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tconst handleConfirmClick = (): void => {\n\t\t\tfaDialogRef.value?.close(() => {\n\t\t\t\tconst table = faTableRef.value;\n\t\t\t\tconst selectedData = table?.selectedList[0];\n\t\t\t\tif (table?.selected && selectedData) {\n\t\t\t\t\tconst selectedValue = isFunction(props.rowKey) ? props.rowKey(selectedData) : selectedData[props.rowKey];\n\t\t\t\t\tmodelValue.value = typeof selectedValue === \"string\" || typeof selectedValue === \"number\" ? selectedValue : null;\n\t\t\t\t\tconst label = selectedData[props.labelKey];\n\t\t\t\t\tselectedLabel.value = typeof label === \"string\" ? label : null;\n\t\t\t\t\temit(\"change\", selectedData, modelValue.value);\n\t\t\t\t} else {\n\t\t\t\t\tmodelValue.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tconst handleTableRowDblclick = (row: Record<string, unknown>): void => {\n\t\t\tfaTableRef.value?.clearSelection?.();\n\t\t\tfaTableRef.value?.toggleRowSelection?.(row);\n\t\t\tstate.selectionRow = row;\n\t\t\thandleConfirmClick();\n\t\t};\n\n\t\tuseRender(() => (\n\t\t\t<div class=\"fa-input-dialog-page\">\n\t\t\t\t<ElInput vModel={selectedLabel.value} placeholder={props.placeholder} disabled={props.disabled} readonly>\n\t\t\t\t\t{{\n\t\t\t\t\t\tappend: () => (\n\t\t\t\t\t\t\t<ElButtonGroup>\n\t\t\t\t\t\t\t\t<ElButton disabled={props.disabled} icon={Delete} onClick={handleDeleteClick} />\n\t\t\t\t\t\t\t\t<ElButton disabled={props.disabled} icon={Search} onClick={handleSearchClick} />\n\t\t\t\t\t\t\t</ElButtonGroup>\n\t\t\t\t\t\t),\n\t\t\t\t\t}}\n\t\t\t\t</ElInput>\n\t\t\t\t<FaDialog\n\t\t\t\t\tref={faDialogRef}\n\t\t\t\t\tstyle=\"--height: 70%;\"\n\t\t\t\t\twidth=\"50%\"\n\t\t\t\t\ttitle={props.title}\n\t\t\t\t\tfullHeight\n\t\t\t\t\tdisabledConfirmButton={!faTableRef.value?.selected}\n\t\t\t\t\tonConfirmClick={handleConfirmClick}\n\t\t\t\t>\n\t\t\t\t\t<FaTable\n\t\t\t\t\t\tref={faTableRef}\n\t\t\t\t\t\trowKey={props.rowKey}\n\t\t\t\t\t\trequestApi={props.requestApi}\n\t\t\t\t\t\tinitParam={props.initParam}\n\t\t\t\t\t\tsingle\n\t\t\t\t\t\trowClickSelection\n\t\t\t\t\t\thideSearchTime\n\t\t\t\t\t\tonRowDblclick={handleTableRowDblclick}\n\t\t\t\t\t>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tdefault: () => slots.default?.(),\n\t\t\t\t\t\t}}\n\t\t\t\t\t</FaTable>\n\t\t\t\t</FaDialog>\n\t\t\t</div>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 选择行数据 */\n\t\t\tselectionRow: computed(() => state.selectionRow),\n\t\t\t/** @description 打开选择器弹窗 */\n\t\t\topen: handleSearchClick,\n\t\t\t/** @description 清除选择 */\n\t\t\tclear: handleDeleteClick,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,yBAAyB;;CAErC,QAAQ;EACP,MAAM,CAAC,QAAQ,QA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AA,CAAA,YAAA,SAAA;GAAA,OAG5B;GAAU,UACP,MAAM;GAAM,cACR,MAAM;GAAU,aACjB,MAAM;GAAS,UAAA;GAAA,qBAAA;GAAA,kBAAA;GAAA,iBAIX;EAAsB,GAAA,EAGpC,eAAe,MAAM,UAAU,EAAC,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAKpC;EAED,OAAO,UAAU,QAAQ;;GAExB,cAAc,eAAe,MAAM,YAAY;;GAE/C,MAAM;;GAEN,OAAO;EACR,CAAC;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"inputDialogPage.mjs","names":["update:modelValue","update:label"],"sources":["../../../../src/components/inputDialogPage/src/inputDialogPage.tsx"],"sourcesContent":["import { useVModel } from \"@vueuse/core\";\nimport { computed, defineComponent, reactive, ref } from \"vue\";\nimport { Delete, Search } from \"@element-plus/icons-vue\";\nimport { ElButton, ElButtonGroup, ElInput } from \"element-plus\";\nimport { isFunction, isNull, isNumber, isString } from \"lodash-unified\";\nimport { definePropType, makeSlots, useExpose, useRender, withDefineType } from \"../../../utils\";\nimport FaDialog from \"../../dialog\";\nimport { FaTable } from \"../../table\";\nimport type { TableProps } from \"element-plus\";\nimport type { PropType } from \"vue\";\nimport type { FaDialogInstance } from \"../../dialog\";\nimport type { DefaultRow, FaTableInstance, PagedInput, PagedResult } from \"../../table\";\n\n/** FaInputDialogPage 的运行时 Props 定义。 */\nexport const faInputDialogPageProps = {\n\t/** @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used */\n\trowKey: {\n\t\ttype: [String, Function] as PropType<TableProps<DefaultRow>[\"rowKey\"]>,\n\t\tdefault: \"id\",\n\t},\n\t/** @description v-model绑定值 */\n\tmodelValue: [String, Number] as PropType<string | number | null>,\n\t/** @description v-model:label绑定值 */\n\tlabel: String as PropType<string | null>,\n\t/** @description 输入框占位文本 */\n\tplaceholder: {\n\t\ttype: String,\n\t\tdefault: \"请选择\",\n\t},\n\t/** @description 禁用 */\n\tdisabled: Boolean,\n\t/** @description 标题 */\n\ttitle: String,\n\t/** @description 请求api */\n\trequestApi: {\n\t\ttype: definePropType<(params?: PagedInput) => Promise<PagedResult | DefaultRow[]>>(Function),\n\t},\n\t/** 初始化参数 */\n\tinitParam: definePropType<string | number | PagedInput>([String, Number, Object]),\n\t/** @description 显示文本 Key */\n\tlabelKey: {\n\t\ttype: String,\n\t\tdefault: \"name\",\n\t},\n};\n\n/** FaInputDialogPage 的运行时 Emits 定义。 */\nexport const faInputDialogPageEmits = {\n\t/** @description v-model 回调 */\n\t\"update:modelValue\": (value: string | number | null): boolean => isString(value) || isNumber(value) || isNull(value),\n\t/** @description v-model:label 回调 */\n\t\"update:label\": (value: string | null): boolean => isString(value) || isNull(value),\n\t/** @description 改变 */\n\tchange: (_data: DefaultRow | null, _value?: string | number | null): boolean => true,\n};\n\n/** FaInputDialogPage 的插槽参数。 */\nexport interface FaInputDialogPageSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n}\n\nexport default defineComponent({\n\tname: \"FaInputDialogPage\",\n\tprops: faInputDialogPageProps,\n\temits: faInputDialogPageEmits,\n\tslots: makeSlots<FaInputDialogPageSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst modelValue = useVModel(props, \"modelValue\", emit, { passive: true });\n\t\tconst selectedLabel = useVModel(props, \"label\", emit, { passive: true });\n\n\t\tconst state = reactive({\n\t\t\tselectionRow: withDefineType<DefaultRow>(),\n\t\t});\n\n\t\tconst faDialogRef = ref<FaDialogInstance>();\n\t\tconst faTableRef = ref<FaTableInstance>();\n\n\t\tconst handleDeleteClick = (): void => {\n\t\t\tmodelValue.value = null;\n\t\t\tselectedLabel.value = null;\n\t\t\temit(\"change\", null);\n\t\t};\n\n\t\tconst handleSearchClick = (): void => {\n\t\t\tfaDialogRef.value?.open(() => {\n\t\t\t\tconst table = faTableRef.value;\n\t\t\t\tif (table === undefined) return;\n\t\t\t\tif (state.selectionRow) {\n\t\t\t\t\t// 判断当前行是否选中\n\t\t\t\t\tconst rawRowKey: unknown = isFunction(props.rowKey) ? props.rowKey(state.selectionRow) : state.selectionRow[props.rowKey];\n\t\t\t\t\tconst rowSelected = (typeof rawRowKey === \"string\" || typeof rawRowKey === \"number\") && table.selectedListIds.includes(rawRowKey);\n\t\t\t\t\tif (!rowSelected) {\n\t\t\t\t\t\ttable.toggleRowSelection?.(state.selectionRow);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tconst handleConfirmClick = (): void => {\n\t\t\tfaDialogRef.value?.close(() => {\n\t\t\t\tconst table = faTableRef.value;\n\t\t\t\tconst selectedData = table?.selectedList[0];\n\t\t\t\tif (table?.selected && selectedData) {\n\t\t\t\t\tconst selectedValue: unknown = isFunction(props.rowKey) ? props.rowKey(selectedData) : selectedData[props.rowKey];\n\t\t\t\t\tmodelValue.value = typeof selectedValue === \"string\" || typeof selectedValue === \"number\" ? selectedValue : null;\n\t\t\t\t\tconst label: unknown = selectedData[props.labelKey];\n\t\t\t\t\tselectedLabel.value = typeof label === \"string\" ? label : null;\n\t\t\t\t\temit(\"change\", selectedData, modelValue.value);\n\t\t\t\t} else {\n\t\t\t\t\tmodelValue.value = null;\n\t\t\t\t\tselectedLabel.value = null;\n\t\t\t\t\temit(\"change\", null, null);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tconst handleTableRowDblclick = (row: DefaultRow): void => {\n\t\t\tfaTableRef.value?.clearSelection?.();\n\t\t\tfaTableRef.value?.toggleRowSelection?.(row);\n\t\t\tstate.selectionRow = row;\n\t\t\thandleConfirmClick();\n\t\t};\n\n\t\tuseRender(() => (\n\t\t\t<div class=\"fa-input-dialog-page\">\n\t\t\t\t<ElInput vModel={selectedLabel.value} placeholder={props.placeholder} disabled={props.disabled} readonly>\n\t\t\t\t\t{{\n\t\t\t\t\t\tappend: () => (\n\t\t\t\t\t\t\t<ElButtonGroup>\n\t\t\t\t\t\t\t\t<ElButton disabled={props.disabled} icon={Delete} onClick={handleDeleteClick} />\n\t\t\t\t\t\t\t\t<ElButton disabled={props.disabled} icon={Search} onClick={handleSearchClick} />\n\t\t\t\t\t\t\t</ElButtonGroup>\n\t\t\t\t\t\t),\n\t\t\t\t\t}}\n\t\t\t\t</ElInput>\n\t\t\t\t<FaDialog\n\t\t\t\t\tref={faDialogRef}\n\t\t\t\t\tstyle=\"--height: 70%;\"\n\t\t\t\t\twidth=\"50%\"\n\t\t\t\t\ttitle={props.title}\n\t\t\t\t\tfullHeight\n\t\t\t\t\tdisabledConfirmButton={!faTableRef.value?.selected}\n\t\t\t\t\tonConfirmClick={handleConfirmClick}\n\t\t\t\t>\n\t\t\t\t\t<FaTable\n\t\t\t\t\t\tref={faTableRef}\n\t\t\t\t\t\trowKey={props.rowKey}\n\t\t\t\t\t\trequestApi={props.requestApi}\n\t\t\t\t\t\tinitParam={props.initParam}\n\t\t\t\t\t\tsingle\n\t\t\t\t\t\trowClickSelection\n\t\t\t\t\t\thideSearchTime\n\t\t\t\t\t\tonRowDblclick={handleTableRowDblclick}\n\t\t\t\t\t>\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tdefault: () => slots.default?.(),\n\t\t\t\t\t\t}}\n\t\t\t\t\t</FaTable>\n\t\t\t\t</FaDialog>\n\t\t\t</div>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 选择行数据 */\n\t\t\tselectionRow: computed(() => state.selectionRow),\n\t\t\t/** @description 打开选择器弹窗 */\n\t\t\topen: handleSearchClick,\n\t\t\t/** @description 清除选择 */\n\t\t\tclear: handleDeleteClick,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAa,yBAAyB;;CAErC,QAAQ;EACP,MAAM,CAAC,QAAQ,QAAQ;EACvB,SAAS;CACV;;CAEA,YAAY,CAAC,QAAQ,MAAM;;CAE3B,OAAO;;CAEP,aAAa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ACjB,MAAM;GAAS,UAAA;GAAA,qBAAA;GAAA,kBAAA;GAAA,iBAIX;EAAsB,GAAA,EAGpC,eAAe,MAAM,UAAU,EAAC,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAKpC;EAED,OAAO,UAAU,QAAQ;;GAExB,cAAc,eAAe,MAAM,YAAY;;GAE/C,MAAM;;GAEN,OAAO;EACR,CAAC;CACF;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"layoutGrid.mjs","names":[],"sources":["../../../../src/components/layoutGrid/src/layoutGrid.tsx"],"sourcesContent":["import { computed, defineComponent, nextTick, onActivated, onDeactivated, onMounted, onUnmounted, provide, ref, watch } from \"vue\";\nimport { isArray, isNumber, isObject } from \"lodash-unified\";\nimport { definePropType, makeSlots, useExpose, useRender } from \"../../../utils\";\nimport type { FaLayoutGridBreakPoint, FaLayoutGridItemResponsive } from \"./layoutGrid.type\";\nimport type { VNode, VNodeArrayChildren } from \"vue\";\n\n/** FaLayoutGrid 的插槽参数。 */\nexport interface FaLayoutGridSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n}\n\nexport default defineComponent({\n\tname: \"FaLayoutGrid\",\n\tprops: {\n\t\t/** @description Grid布局列配置 */\n\t\tcols: {\n\t\t\ttype: definePropType<string | number | Record<FaLayoutGridBreakPoint, number>>([String, Number, Object]),\n\t\t\tdefault: (): Record<FaLayoutGridBreakPoint, number> => ({ xs: 1, sm: 2, md: 3, lg: 4, xl: 5 }),\n\t\t},\n\t\t/** @description 折叠 */\n\t\tcollapsed: Boolean,\n\t\t/** @description 折叠行数 */\n\t\tcollapsedRows: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: 1,\n\t\t},\n\t\t/** @description 间距,偏移 */\n\t\tgap: {\n\t\t\ttype: definePropType<number | [number, number]>([Number, Array]),\n\t\t\tdefault: 0,\n\t\t},\n\t},\n\temits: {\n\t\t/** @description 断点变化事件 */\n\t\tbreakPointChange: ({ breakPoint: _breakPoint }: { breakPoint: FaLayoutGridBreakPoint }) => true,\n\t},\n\tslots: makeSlots<FaLayoutGridSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst divElRef = ref<HTMLElement>();\n\n\t\t// 注入 gap 间距\n\t\tprovide(\"gap\", isArray(props.gap) ? props.gap[0] : props.gap);\n\n\t\t// 注入响应式断点\n\t\tconst breakPoint = ref<FaLayoutGridBreakPoint>(\"xl\");\n\t\tprovide(\"breakPoint\", breakPoint);\n\n\t\t// 注入要开始折叠的 index\n\t\tconst hiddenIndex = ref(-1);\n\t\tprovide(\"shouldHiddenIndex\", hiddenIndex);\n\n\t\t// 注入 cols\n\t\tconst cols = computed<string | number>(() => {\n\t\t\tif (isObject(props.cols)) return props.cols[breakPoint.value] ?? 1;\n\t\t\treturn props.cols;\n\t\t});\n\t\tprovide(\"cols\", cols);\n\n\t\tconst collapsedRows = isNumber(props.collapsedRows) ? props.collapsedRows : Number(props.collapsedRows);\n\n\t\t// 断点映射\n\t\tconst breakpoints = {\n\t\t\t// 小于480屏幕(如手机)\n\t\t\txs: { min: 0, max: 479 },\n\t\t\t// 平板竖屏\n\t\t\tsm: { min: 480, max: 768 },\n\t\t\t// 平板横屏\n\t\t\tmd: { min: 768, max: 1024 },\n\t\t\t// 小型桌面\n\t\t\tlg: { min: 1024, max: 1440 },\n\t\t\t// 大型桌面\n\t\t\txl: { min: 1440, max: Infinity },\n\t\t};\n\n\t\t// 监听屏幕变化\n\t\tconst resize = (e: ResizeObserverEntry[]): void => {\n\t\t\t// 当前只监听布局容器,ResizeObserver 每次回调应当只有一个目标。\n\t\t\tif (e.length !== 1 || e[0] === undefined) throw new Error(\"FaLayoutGrid 监听到了非预期数量的布局容器。\");\n\t\t\tconst curEl = e[0];\n\t\t\tconst width = curEl.target.scrollWidth;\n\n\t\t\tfor (const [key, { min, max }] of Object.entries(breakpoints)) {\n\t\t\t\tif (width >= min && width <= max) {\n\t\t\t\t\tbreakPoint.value = key as FaLayoutGridBreakPoint;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tlet resizeObserver: ResizeObserver | undefined;\n\t\tconst observeResize = (): void => {\n\t\t\tconst element = divElRef.value;\n\t\t\tif (!element) return;\n\t\t\tresizeObserver?.disconnect();\n\t\t\tresizeObserver = new ResizeObserver(resize);\n\t\t\tresizeObserver.observe(element);\n\t\t};\n\n\t\tonMounted(() => {\n\t\t\tvoid nextTick(observeResize);\n\n\t\t\t// 断点变化时 执行 findIndex\n\t\t\twatch(\n\t\t\t\t() => breakPoint.value,\n\t\t\t\t(newValue) => {\n\t\t\t\t\temit(\"breakPointChange\", { breakPoint: newValue });\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timmediate: true,\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\n\t\tonActivated(() => {\n\t\t\tvoid nextTick(observeResize);\n\t\t});\n\n\t\tonUnmounted(() => {\n\t\t\tresizeObserver?.disconnect();\n\t\t});\n\n\t\tonDeactivated(() => {\n\t\t\tresizeObserver?.disconnect();\n\t\t});\n\n\t\t// 设置间距\n\t\tconst gap = computed(() => {\n\t\t\tif (isNumber(props.gap)) return `${props.gap}px`;\n\t\t\tif (isArray(props.gap)) return `${props.gap[1]}px ${props.gap[0]}px`;\n\t\t\treturn \"unset\";\n\t\t});\n\n\t\t// 设置 style\n\t\tconst style = computed(() => {\n\t\t\treturn {\n\t\t\t\tdisplay: \"grid\",\n\t\t\t\tgridGap: gap.value,\n\t\t\t\tgridTemplateColumns: `repeat(${cols.value}, minmax(0, 1fr))`,\n\t\t\t};\n\t\t});\n\n\t\tuseRender(() => {\n\t\t\tconst defaultSlot = slots.default?.() ?? [];\n\n\t\t\tif (props.collapsed) {\n\t\t\t\tconst fields: VNodeArrayChildren = [];\n\t\t\t\tlet suffix: VNode | undefined;\n\n\t\t\t\tdefaultSlot.forEach((slot) => {\n\t\t\t\t\t// suffix\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof slot.type === \"object\" &&\n\t\t\t\t\t\tslot.type !== null &&\n\t\t\t\t\t\t\"name\" in slot.type &&\n\t\t\t\t\t\tslot.type.name === \"FaLayoutGridItem\" &&\n\t\t\t\t\t\tslot.props?.[\"suffix\"] !== undefined\n\t\t\t\t\t)\n\t\t\t\t\t\tsuffix = slot;\n\t\t\t\t\t// slot children\n\t\t\t\t\tif (typeof slot.type === \"symbol\" && Array.isArray(slot?.children)) fields.push(...slot.children);\n\t\t\t\t});\n\n\t\t\t\t// 计算 suffix 所占用的列\n\t\t\t\tlet suffixCols = 0;\n\t\t\t\tif (suffix?.props) {\n\t\t\t\t\tconst breakPointProps = suffix.props[breakPoint.value] as FaLayoutGridItemResponsive | undefined;\n\t\t\t\t\tsuffixCols =\n\t\t\t\t\t\t(breakPointProps?.span ?? Number(suffix.props[\"span\"] ?? 1)) +\n\t\t\t\t\t\t(breakPointProps?.offset ?? Number(suffix.props[\"offset\"] ?? 0));\n\t\t\t\t}\n\n\t\t\t\tlet occupiedCols = 0;\n\t\t\t\thiddenIndex.value = -1;\n\t\t\t\tfor (const [index, current] of fields.entries()) {\n\t\t\t\t\tconst currentVNode = current as VNode;\n\t\t\t\t\tconst currentProps = currentVNode.props;\n\t\t\t\t\tif (currentProps === null) continue;\n\t\t\t\t\tconst breakPointProps = currentProps[breakPoint.value] as FaLayoutGridItemResponsive | undefined;\n\t\t\t\t\toccupiedCols +=\n\t\t\t\t\t\t(breakPointProps?.span ?? Number(currentProps[\"span\"] ?? 1)) +\n\t\t\t\t\t\t(breakPointProps?.offset ?? Number(currentProps[\"offset\"] ?? 0));\n\t\t\t\t\tif (occupiedCols > collapsedRows * Number(cols.value) - suffixCols) {\n\t\t\t\t\t\thiddenIndex.value = index;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thiddenIndex.value = -1;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<div ref={divElRef} style={style.value}>\n\t\t\t\t\t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AAA;IACnC,IAAI;IAEJ,YAAY,SAAS,SAAS;KAE7B,IACC,OAAO,KAAK,SAAS,YACrB,KAAK,SAAS,QACd,UAAU,KAAK,QACf,KAAK,KAAK,SAAS,sBACnB,KAAK,QAAQ,cAAc,KAAA,GAE3B,SAAS;KAEV,IAAI,OAAO,KAAK,SAAS,YAAY,MAAM,QAAQ,MAAM,QAAQ,GAAG,OAAO,KAAK,GAAG,KAAK,QAAQ;IACjG,CAAC;IAGD,IAAI,aAAa;IACjB,IAAI,QAAQ,OAAO;KAClB,MAAM,kBAAkB,OAAO,MAAM,WAAW;KAChD,cACE,iBAAiB,QAAQ,OAAO,OAAO,MAAM,WAAW,CAAC,MACzD,iBAAiB,UAAU,OAAO,OAAO,MAAM,aAAa,CAAC;IAChE;IAEA,IAAI,eAAe;IACnB,YAAY,QAAQ;IACpB,KAAK,MAAM,CAAC,OAAO,YAAY,OAAO,QAAQ,GAAG;KAEhD,MAAM,eAAe,QAAa;KAClC,IAAI,iBAAiB,MAAM;KAC3B,MAAM,kBAAkB,aAAa,WAAW;KAChD,iBACE,iBAAiB,QAAQ,OAAO,aAAa,WAAW,CAAC,MACzD,iBAAiB,UAAU,OAAO,aAAa,aAAa,CAAC;KAC/D,IAAI,eAAe,gBAAgB,OAAO,KAAK,KAAK,IAAI,YAAY;MACnE,YAAY,QAAQ;MACpB;KACD;IACD;GACD,OACC,YAAY,QAAQ;GAGrB,OAAA,YAAA,OAAA;IAAA,OACW;IAAQ,SAAS,MAAM;GAAK,GAAA,CACpC,WAAW,CAAA;EAGf,CAAC;EAED,OAAO,UAAU,QAAQ;;AAExB,WACD,CAAC;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"layoutGrid.mjs","names":[],"sources":["../../../../src/components/layoutGrid/src/layoutGrid.tsx"],"sourcesContent":["import { computed, defineComponent, nextTick, onActivated, onDeactivated, onMounted, onUnmounted, provide, ref, watch } from \"vue\";\nimport { isArray, isNumber, isObject } from \"lodash-unified\";\nimport { definePropType, makeSlots, useExpose, useRender } from \"../../../utils\";\nimport type { VNode, VNodeArrayChildren } from \"vue\";\nimport type { FaLayoutGridBreakPoint, FaLayoutGridItemResponsive } from \"./layoutGrid.type\";\n\n/** FaLayoutGrid 的插槽参数。 */\nexport interface FaLayoutGridSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n}\n\nexport default defineComponent({\n\tname: \"FaLayoutGrid\",\n\tprops: {\n\t\t/** @description Grid布局列配置 */\n\t\tcols: {\n\t\t\ttype: definePropType<string | number | Record<FaLayoutGridBreakPoint, number>>([String, Number, Object]),\n\t\t\tdefault: (): Record<FaLayoutGridBreakPoint, number> => ({ xs: 1, sm: 2, md: 3, lg: 4, xl: 5 }),\n\t\t},\n\t\t/** @description 折叠 */\n\t\tcollapsed: Boolean,\n\t\t/** @description 折叠行数 */\n\t\tcollapsedRows: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: 1,\n\t\t},\n\t\t/** @description 间距,偏移 */\n\t\tgap: {\n\t\t\ttype: definePropType<number | [number, number]>([Number, Array]),\n\t\t\tdefault: 0,\n\t\t},\n\t},\n\temits: {\n\t\t/** @description 断点变化事件 */\n\t\tbreakPointChange: ({ breakPoint: _breakPoint }: { breakPoint: FaLayoutGridBreakPoint }) => true,\n\t},\n\tslots: makeSlots<FaLayoutGridSlots>(),\n\tsetup(props, { slots, emit, expose }) {\n\t\tconst divElRef = ref<HTMLElement>();\n\n\t\t// 注入 gap 间距\n\t\tprovide(\"gap\", isArray(props.gap) ? props.gap[0] : props.gap);\n\n\t\t// 注入响应式断点\n\t\tconst breakPoint = ref<FaLayoutGridBreakPoint>(\"xl\");\n\t\tprovide(\"breakPoint\", breakPoint);\n\n\t\t// 注入要开始折叠的 index\n\t\tconst hiddenIndex = ref(-1);\n\t\tprovide(\"shouldHiddenIndex\", hiddenIndex);\n\n\t\t// 注入 cols\n\t\tconst cols = computed<string | number>(() => {\n\t\t\tif (isObject(props.cols)) return props.cols[breakPoint.value] ?? 1;\n\t\t\treturn props.cols;\n\t\t});\n\t\tprovide(\"cols\", cols);\n\n\t\tconst collapsedRows = isNumber(props.collapsedRows) ? props.collapsedRows : Number(props.collapsedRows);\n\n\t\t// 断点映射\n\t\tconst breakpoints = {\n\t\t\t// 小于480屏幕(如手机)\n\t\t\txs: { min: 0, max: 479 },\n\t\t\t// 平板竖屏\n\t\t\tsm: { min: 480, max: 768 },\n\t\t\t// 平板横屏\n\t\t\tmd: { min: 768, max: 1024 },\n\t\t\t// 小型桌面\n\t\t\tlg: { min: 1024, max: 1440 },\n\t\t\t// 大型桌面\n\t\t\txl: { min: 1440, max: Infinity },\n\t\t};\n\n\t\t// 监听屏幕变化\n\t\tconst resize = (e: ResizeObserverEntry[]): void => {\n\t\t\t// 当前只监听布局容器,ResizeObserver 每次回调应当只有一个目标。\n\t\t\tif (e.length !== 1 || e[0] === undefined) throw new Error(\"FaLayoutGrid 监听到了非预期数量的布局容器。\");\n\t\t\tconst curEl = e[0];\n\t\t\tconst width = curEl.target.scrollWidth;\n\n\t\t\tfor (const [key, { min, max }] of Object.entries(breakpoints)) {\n\t\t\t\tif (width >= min && width <= max) {\n\t\t\t\t\tbreakPoint.value = key as FaLayoutGridBreakPoint;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tlet resizeObserver: ResizeObserver | undefined;\n\t\tconst observeResize = (): void => {\n\t\t\tconst element = divElRef.value;\n\t\t\tif (!element) return;\n\t\t\tresizeObserver?.disconnect();\n\t\t\tresizeObserver = new ResizeObserver(resize);\n\t\t\tresizeObserver.observe(element);\n\t\t};\n\n\t\tonMounted(() => {\n\t\t\tvoid nextTick(observeResize);\n\n\t\t\t// 断点变化时 执行 findIndex\n\t\t\twatch(\n\t\t\t\t() => breakPoint.value,\n\t\t\t\t(newValue) => {\n\t\t\t\t\temit(\"breakPointChange\", { breakPoint: newValue });\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timmediate: true,\n\t\t\t\t}\n\t\t\t);\n\t\t});\n\n\t\tonActivated(() => {\n\t\t\tvoid nextTick(observeResize);\n\t\t});\n\n\t\tonUnmounted(() => {\n\t\t\tresizeObserver?.disconnect();\n\t\t});\n\n\t\tonDeactivated(() => {\n\t\t\tresizeObserver?.disconnect();\n\t\t});\n\n\t\t// 设置间距\n\t\tconst gap = computed(() => {\n\t\t\tif (isNumber(props.gap)) return `${props.gap}px`;\n\t\t\tif (isArray(props.gap)) return `${props.gap[1]}px ${props.gap[0]}px`;\n\t\t\treturn \"unset\";\n\t\t});\n\n\t\t// 设置 style\n\t\tconst style = computed(() => {\n\t\t\treturn {\n\t\t\t\tdisplay: \"grid\",\n\t\t\t\tgridGap: gap.value,\n\t\t\t\tgridTemplateColumns: `repeat(${cols.value}, minmax(0, 1fr))`,\n\t\t\t};\n\t\t});\n\n\t\tuseRender(() => {\n\t\t\tconst defaultSlot = slots.default?.() ?? [];\n\n\t\t\tif (props.collapsed) {\n\t\t\t\tconst fields: VNodeArrayChildren = [];\n\t\t\t\tlet suffix: VNode | undefined;\n\n\t\t\t\tdefaultSlot.forEach((slot) => {\n\t\t\t\t\t// suffix\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof slot.type === \"object\" &&\n\t\t\t\t\t\tslot.type !== null &&\n\t\t\t\t\t\t\"name\" in slot.type &&\n\t\t\t\t\t\tslot.type.name === \"FaLayoutGridItem\" &&\n\t\t\t\t\t\tslot.props?.[\"suffix\"] !== undefined\n\t\t\t\t\t)\n\t\t\t\t\t\tsuffix = slot;\n\t\t\t\t\t// slot children\n\t\t\t\t\tif (typeof slot.type === \"symbol\" && Array.isArray(slot?.children)) fields.push(...slot.children);\n\t\t\t\t});\n\n\t\t\t\t// 计算 suffix 所占用的列\n\t\t\t\tlet suffixCols = 0;\n\t\t\t\tif (suffix?.props) {\n\t\t\t\t\tconst breakPointProps = suffix.props[breakPoint.value] as FaLayoutGridItemResponsive | undefined;\n\t\t\t\t\tsuffixCols =\n\t\t\t\t\t\t(breakPointProps?.span ?? Number(suffix.props[\"span\"] ?? 1)) +\n\t\t\t\t\t\t(breakPointProps?.offset ?? Number(suffix.props[\"offset\"] ?? 0));\n\t\t\t\t}\n\n\t\t\t\tlet occupiedCols = 0;\n\t\t\t\thiddenIndex.value = -1;\n\t\t\t\tfor (const [index, current] of fields.entries()) {\n\t\t\t\t\tconst currentVNode = current as VNode;\n\t\t\t\t\tconst currentProps = currentVNode.props;\n\t\t\t\t\tif (currentProps === null) continue;\n\t\t\t\t\tconst breakPointProps = currentProps[breakPoint.value] as FaLayoutGridItemResponsive | undefined;\n\t\t\t\t\toccupiedCols +=\n\t\t\t\t\t\t(breakPointProps?.span ?? Number(currentProps[\"span\"] ?? 1)) +\n\t\t\t\t\t\t(breakPointProps?.offset ?? Number(currentProps[\"offset\"] ?? 0));\n\t\t\t\t\tif (occupiedCols > collapsedRows * Number(cols.value) - suffixCols) {\n\t\t\t\t\t\thiddenIndex.value = index;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thiddenIndex.value = -1;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<div ref={divElRef} style={style.value}>\n\t\t\t\t\t{defaultSlot}\n\t\t\t\t</div>\n\t\t\t);\n\t\t});\n\n\t\treturn useExpose(expose, {\n\t\t\t/** @description 响应式断点 */\n\t\t\tbreakPoint,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;AAYA,IAAA,qBAAe,gBAAgB;CAC9B,MAAM;CACN,OAAO;;EAEN,MAAM;GACL,MAAM,eAAyE;IAAC;IAAQ;IAAQ;GAAM,CAAC;GACvG,gBAAwD;IAAE,IAAI;IAAG,IAAI;IAAG,IAAI;IAAG,IAAI;IAAG,IAAI;GAAE;EAC7F;;EAEA,WAAW;;EAEX,eAAe;GACd,MAAM,CAAC,QAAQ,MAAM;GACrB,SAAS;EACV;;EAEA,KAAK;GACJ,MAAM,eAA0C,CAAC,QAAQ,KAAK,CA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AChE;IAEA,IAAI,eAAe;IACnB,YAAY,QAAQ;IACpB,KAAK,MAAM,CAAC,OAAO,YAAY,OAAO,QAAQ,GAAG;KAEhD,MAAM,eAAe,QAAa;KAClC,IAAI,iBAAiB,MAAM;KAC3B,MAAM,kBAAkB,aAAa,WAAW;KAChD,iBACE,iBAAiB,QAAQ,OAAO,aAAa,WAAW,CAAC,MACzD,iBAAiB,UAAU,OAAO,aAAa,aAAa,CAAC;KAC/D,IAAI,eAAe,gBAAgB,OAAO,KAAK,KAAK,IAAI,YAAY;MACnE,YAAY,QAAQ;MACpB;KACD;IACD;GACD,OACC,YAAY,QAAQ;GAGrB,OAAA,YAAA,OAAA;IAAA,OACW;IAAQ,SAAS,MAAM;GAAK,GAAA,CACpC,WAAW,CAAA;EAGf,CAAC;EAED,OAAO,UAAU,QAAQ;;AAExB,WACD,CAAC;CACF;AACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"layoutGridItem.mjs","names":[],"sources":["../../../../src/components/layoutGrid/src/layoutGridItem.tsx"],"sourcesContent":["import { computed, defineComponent, inject, reactive, ref, watch } from \"vue\";\nimport { isNumber } from \"lodash-unified\";\nimport { definePropType, makeSlots, useExpose, useRender } from \"../../../utils\";\nimport type { FaLayoutGridBreakPoint, FaLayoutGridItemResponsive } from \"./layoutGrid.type\";\nimport type { Ref } from \"vue\";\n\n/** FaLayoutGridItem 的插槽参数。 */\nexport interface FaLayoutGridItemSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n}\n\nexport default defineComponent({\n\tname: \"FaLayoutGridItem\",\n\tprops: {\n\t\t/** @description 偏移 */\n\t\toffset: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: 0,\n\t\t},\n\t\t/** @description 占位 */\n\t\tspan: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: 1,\n\t\t},\n\t\t/** @description 后缀 */\n\t\tsuffix: { type: Boolean, default: false },\n\t\t/** @description 响应式,小于480px屏幕配置 */\n\t\txs: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/** @description 响应式,平板竖屏配置 */\n\t\tsm: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/** @description 响应式,平板横屏配置 */\n\t\tmd: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/** @description 响应式,小型桌面配置 */\n\t\tlg: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/** @description 响应式,大型桌面配置 */\n\t\txl: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\tslots: makeSlots<FaLayoutGridItemSlots>(),\n\tsetup(props, { attrs, slots, expose }) {\n\t\tconst state = reactive({\n\t\t\tshow: true,\n\t\t});\n\n\t\tconst attrsObj = attrs as Record<string, unknown>;\n\n\t\t// 注入断点\n\t\tconst breakPoint = inject<Ref<FaLayoutGridBreakPoint>>(\"breakPoint\", ref(\"xl\"));\n\t\tconst shouldHiddenIndex = inject<Ref<number>>(\"shouldHiddenIndex\", ref(-1));\n\n\t\twatch(\n\t\t\t() => [shouldHiddenIndex.value, breakPoint.value],\n\t\t\t(n) => {\n\t\t\t\tconst index = Number(attrsObj[\"data-index\"] ?? attrsObj[\"index\"]);\n\t\t\t\tif (Number.isInteger(index)) {\n\t\t\t\t\tstate.show = !(n[0] !== -1 && index >= Number(n[0]));\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\tconst gap = inject(\"gap\", 0);\n\t\tconst cols = inject<Ref<number>>(\"cols\", ref(5));\n\n\t\tconst style = computed(() => {\n\t\t\tconst breakPointObk = props[breakPoint.value];\n\t\t\tconst span = breakPointObk?.span ?? (isNumber(props.span) ? props.span : Number(props.span));\n\t\t\tconst offset = breakPointObk?.offset ?? (isNumber(props.offset) ? props.offset : Number(props.offset));\n\t\t\tif (props.suffix) {\n\t\t\t\treturn {\n\t\t\t\t\tgridColumnStart: cols.value - span - offset + 1,\n\t\t\t\t\tgridColumnEnd: `span ${span + offset}`,\n\t\t\t\t\tmarginLeft: offset !== 0 ? `calc(((100% + ${gap}px) / ${span + offset}) * ${offset})` : \"unset\",\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\tgridColumn: `span ${span + offset > cols.value ? cols.value : span + offset}/span ${\n\t\t\t\t\t\tspan + offset > cols.value ? cols.value : span + offset\n\t\t\t\t\t}`,\n\t\t\t\t\tmarginLeft: offset !== 0 ? `calc(((100% + ${gap}px) / ${span + offset}) * ${offset})` : \"unset\",\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\n\t\tuseRender(() => (\n\t\t\t<div style={style.value} vShow={state.show}>\n\t\t\t\t{slots.default?.()}\n\t\t\t</div>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\tshow: state.show,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;AAYA,IAAA,yBAAe,gBAAgB;CAC9B,MAAM;CACN,OAAO;;EAEN,QAAQ;GACP,MAAM,CAAC,QAAQ,MAAM;GACrB,SAAS;EACV;;EAEA,MAAM;GACL,MAAM,CAAC,QAAQ,MAAM;GACrB,SAAS;EACV;;EAEA,QAAQ;GAAE,MAAM;GAAS,SAAS;EAAM;;EAExC,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;;EAEA,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;;EAEA,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;;EAEA,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;;EAEA,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;C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ACG,MAAM,MAAK,GAAA,CACrB,MAAM,UAAU,CAAC,CAAA,GAAA,CAAA,CAAA,OADa,MAAM,IAAI,CAAA,CAAA,CAG1C;EAED,OAAO,UAAU,QAAQ,EACxB,MAAM,MAAM,KACb,CAAC;CACF;AACD,CAAC"}
1
+ {"version":3,"file":"layoutGridItem.mjs","names":[],"sources":["../../../../src/components/layoutGrid/src/layoutGridItem.tsx"],"sourcesContent":["import { computed, defineComponent, inject, reactive, ref, watch } from \"vue\";\nimport { isNumber } from \"lodash-unified\";\nimport { definePropType, makeSlots, useExpose, useRender } from \"../../../utils\";\nimport type { Ref } from \"vue\";\nimport type { FaLayoutGridBreakPoint, FaLayoutGridItemResponsive } from \"./layoutGrid.type\";\n\n/** FaLayoutGridItem 的插槽参数。 */\nexport interface FaLayoutGridItemSlots extends Record<string, unknown> {\n\t/** @description 默认内容插槽 */\n\tdefault: never;\n}\n\nexport default defineComponent({\n\tname: \"FaLayoutGridItem\",\n\tprops: {\n\t\t/** @description 偏移 */\n\t\toffset: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: 0,\n\t\t},\n\t\t/** @description 占位 */\n\t\tspan: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: 1,\n\t\t},\n\t\t/** @description 后缀 */\n\t\tsuffix: { type: Boolean, default: false },\n\t\t/** @description 响应式,小于480px屏幕配置 */\n\t\txs: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/** @description 响应式,平板竖屏配置 */\n\t\tsm: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/** @description 响应式,平板横屏配置 */\n\t\tmd: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/** @description 响应式,小型桌面配置 */\n\t\tlg: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/** @description 响应式,大型桌面配置 */\n\t\txl: {\n\t\t\ttype: definePropType<FaLayoutGridItemResponsive>(Object),\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\tslots: makeSlots<FaLayoutGridItemSlots>(),\n\tsetup(props, { attrs, slots, expose }) {\n\t\tconst state = reactive({\n\t\t\tshow: true,\n\t\t});\n\n\t\tconst attrsObj = attrs as Record<string, unknown>;\n\n\t\t// 注入断点\n\t\tconst breakPoint = inject<Ref<FaLayoutGridBreakPoint>>(\"breakPoint\", ref(\"xl\"));\n\t\tconst shouldHiddenIndex = inject<Ref<number>>(\"shouldHiddenIndex\", ref(-1));\n\n\t\twatch(\n\t\t\t() => [shouldHiddenIndex.value, breakPoint.value],\n\t\t\t(n) => {\n\t\t\t\tconst index = Number(attrsObj[\"data-index\"] ?? attrsObj[\"index\"]);\n\t\t\t\tif (Number.isInteger(index)) {\n\t\t\t\t\tstate.show = !(n[0] !== -1 && index >= Number(n[0]));\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ immediate: true }\n\t\t);\n\n\t\tconst gap = inject(\"gap\", 0);\n\t\tconst cols = inject<Ref<number>>(\"cols\", ref(5));\n\n\t\tconst style = computed(() => {\n\t\t\tconst breakPointObk = props[breakPoint.value];\n\t\t\tconst span = breakPointObk?.span ?? (isNumber(props.span) ? props.span : Number(props.span));\n\t\t\tconst offset = breakPointObk?.offset ?? (isNumber(props.offset) ? props.offset : Number(props.offset));\n\t\t\tif (props.suffix) {\n\t\t\t\treturn {\n\t\t\t\t\tgridColumnStart: cols.value - span - offset + 1,\n\t\t\t\t\tgridColumnEnd: `span ${span + offset}`,\n\t\t\t\t\tmarginLeft: offset !== 0 ? `calc(((100% + ${gap}px) / ${span + offset}) * ${offset})` : \"unset\",\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\tgridColumn: `span ${span + offset > cols.value ? cols.value : span + offset}/span ${\n\t\t\t\t\t\tspan + offset > cols.value ? cols.value : span + offset\n\t\t\t\t\t}`,\n\t\t\t\t\tmarginLeft: offset !== 0 ? `calc(((100% + ${gap}px) / ${span + offset}) * ${offset})` : \"unset\",\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\n\t\tuseRender(() => (\n\t\t\t<div style={style.value} vShow={state.show}>\n\t\t\t\t{slots.default?.()}\n\t\t\t</div>\n\t\t));\n\n\t\treturn useExpose(expose, {\n\t\t\tshow: state.show,\n\t\t});\n\t},\n});\n"],"mappings":";;;;;;;AAYA,IAAA,yBAAe,gBAAgB;CAC9B,MAAM;CACN,OAAO;;EAEN,QAAQ;GACP,MAAM,CAAC,QAAQ,MAAM;GACrB,SAAS;EACV;;EAEA,MAAM;GACL,MAAM,CAAC,QAAQ,MAAM;GACrB,SAAS;EACV;;EAEA,QAAQ;GAAE,MAAM;GAAS,SAAS;EAAM;;EAExC,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;;EAEA,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;;EAEA,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;;EAEA,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;;EAEA,IAAI;GACH,MAAM,eAA2C,MAAM;GACvD,SAAS,KAAA;EACV;CACD;CACA,OAAO,UAAiC;CACxC,MAAM,OAAO,EAAE,OAAO,OAAO,UAAU;EACtC,MAAM,QAAQ,SAAS,EACtB,MAAM,KACP,CAAC;EAED,MAAM,WAAW;EAGjB,MAAM,aAAa,OAAoC,cAAc,IAAI,IAAI,CAAC;EAC9E,MAAM,oBAAoB,OAAoB,qBAAqB,IAAI,EAAE,CAAC;EAE1E,YACO,CAAC,kBAAkB,OAAO,WAAW,KAAK,IAC/C,MAAM;GACN,MAAM,QAAQ,OAAO,SAAS,iBAAiB,SAAS,QAAQ;GAChE,IAAI,OAAO,UAAU,KAAK,GACzB,MAAM,OAAO,EAAE,EAAE,OAAO,MAAM,SAAS,OAAO,EAAE,EAAE;EAEpD,GACA,EAAE,WAAW,KAAK,CACnB;EAEA,MAAM,MAAM,OAAO,OAAO,CAAC;EAC3B,MAAM,OAAO,OAAoB,QAAQ,IAAI,CAAC,CAAC;EAE/C,MAAM,QAAQ,eAAe;GAC5B,MAAM,gBAAgB,MAAM,WAAW;GACvC,MAAM,OAAO,eAAe,SAAS,SAAS,MAAM,IAAI,IAAI,MAAM,OAAO,OAAO,MAAM,IAAI;GAC1F,MAAM,SAAS,eAAe,WAAW,SAAS,MAAM,MAAM,IAAI,MAAM,SAAS,OAAO,MAAM,MAAM;GACpG,IAAI,MAAM,QACT,OAAO;IACN,iBAAiB,KAAK,QAAQ,OAAO,SAAS;IAC9C,eAAe,QAAQ,OAAO;IAC9B,YAAY,WAAW,IAAI,iBAAiB,IAAG,QAAS,OAAO,OAAM,MAAO,OAAM,KAAM;GACzF;QAEA,OAAO;IACN,YAAY,QAAQ,OAAO,SAAS,KAAK,QAAQ,KAAK,QAAQ,OAAO,OAAM,QAC1E,OAAO,SAAS,KAAK,QAAQ,KAAK,QAAQ,OAAO;IAElD,YAAY,WAAW,IAAI,iBAAiB,IAAG,QAAS,OAAO,OAAM,MAAO,OAAM,KAAM;GACzF;EAEF,CAAC;EAED,gBAAU,eAAA,YAAA,OAAA,EAAA,SACG,MAAM,MAAK,GAAA,CACrB,MAAM,UAAU,CAAC,CAAA,GAAA,CAAA,CAAA,OADa,MAAM,IAAI,CAAA,CAAA,CAG1C;EAED,OAAO,UAAU,QAAQ,EACxB,MAAM,MAAM,KACb,CAAC;CACF;AACD,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import Select, { faSelectProps } from "./src/select";
2
2
  import SelectOption from "./src/selectOption";
3
- import type { faSelectEmits } from "./src/select";
4
- import type { TSXWithInstall } from "../../utils";
5
3
  import type { ExtractPropTypes } from "vue";
4
+ import type { TSXWithInstall } from "../../utils";
5
+ import type { faSelectEmits } from "./src/select";
6
6
  /** 支持远程数据、分页和自定义选项的选择器组件。 */
7
7
  export declare const FaSelect: TSXWithInstall<typeof Select> & {
8
8
  SelectOption: typeof SelectOption;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Select","SelectOption"],"sources":["../../../src/components/select/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Select, { faSelectProps } from \"./src/select\";\nimport SelectOption from \"./src/selectOption\";\nimport type { faSelectEmits } from \"./src/select\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { ExtractPropTypes } from \"vue\";\n\n/** 支持远程数据、分页和自定义选项的选择器组件。 */\nexport const FaSelect: TSXWithInstall<typeof Select> & { SelectOption: typeof SelectOption } = withInstall(Select, {\n\tSelectOption,\n});\nexport default FaSelect;\n\n/** 可独立注册的 FaSelect 选项组件。 */\nexport const FaSelectOption: TSXWithInstall<typeof SelectOption> = withNoopInstall(SelectOption);\n\nexport { faSelectProps };\nexport type { FaSelectSlots } from \"./src/select\";\nexport * from \"./src/select.type\";\n\n/** FaSelect 暴露的组件实例类型。 */\nexport type FaSelectInstance = InstanceType<typeof Select>;\n\n/** FaSelect 的完整 Props 类型。 */\nexport type FaSelectProps = ExtractPropTypes<typeof faSelectProps>;\n\n/** FaSelect 的 Emits 类型。 */\nexport type FaSelectEmits = typeof faSelectEmits;\n\n/** FaSelectOption 暴露的组件实例类型。 */\nexport type FaSelectOptionInstance = InstanceType<typeof SelectOption>;\n"],"mappings":";;;;;AAQA,MAAa,WAAkF,YAAYA,gBAAQ,EAClH,cAAA,qBACD,CAAC;;AAID,MAAa,iBAAsD,gBAAgBC,oBAAY"}
1
+ {"version":3,"file":"index.mjs","names":["Select","SelectOption"],"sources":["../../../src/components/select/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from \"../../utils\";\nimport Select, { faSelectProps } from \"./src/select\";\nimport SelectOption from \"./src/selectOption\";\nimport type { ExtractPropTypes } from \"vue\";\nimport type { TSXWithInstall } from \"../../utils\";\nimport type { faSelectEmits } from \"./src/select\";\n\n/** 支持远程数据、分页和自定义选项的选择器组件。 */\nexport const FaSelect: TSXWithInstall<typeof Select> & { SelectOption: typeof SelectOption } = withInstall(Select, {\n\tSelectOption,\n});\nexport default FaSelect;\n\n/** 可独立注册的 FaSelect 选项组件。 */\nexport const FaSelectOption: TSXWithInstall<typeof SelectOption> = withNoopInstall(SelectOption);\n\nexport { faSelectProps };\nexport type { FaSelectSlots } from \"./src/select\";\nexport * from \"./src/select.type\";\n\n/** FaSelect 暴露的组件实例类型。 */\nexport type FaSelectInstance = InstanceType<typeof Select>;\n\n/** FaSelect 的完整 Props 类型。 */\nexport type FaSelectProps = ExtractPropTypes<typeof faSelectProps>;\n\n/** FaSelect 的 Emits 类型。 */\nexport type FaSelectEmits = typeof faSelectEmits;\n\n/** FaSelectOption 暴露的组件实例类型。 */\nexport type FaSelectOptionInstance = InstanceType<typeof SelectOption>;\n"],"mappings":";;;;;AAQA,MAAa,WAAkF,YAAYA,gBAAQ,EAClH,cAAA,qBACD,CAAC;;AAID,MAAa,iBAAsD,gBAAgBC,oBAAY"}