@silver-formily/element-plus 2.0.0 → 2.1.0

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 (165) hide show
  1. package/README.en-US.md +32 -0
  2. package/README.md +18 -21
  3. package/esm/__builtins__/index.mjs +15 -16
  4. package/esm/__builtins__/shared/index.mjs +11 -12
  5. package/esm/__builtins__/shared/transform-component.d.ts +2 -7
  6. package/esm/__builtins__/shared/transform-component.mjs +16 -33
  7. package/esm/__builtins__/shared/transform-component.mjs.map +1 -1
  8. package/esm/__builtins__/shared/utils.mjs +11 -11
  9. package/esm/__builtins__/shared/utils.mjs.map +1 -1
  10. package/esm/array-base/index.mjs +62 -62
  11. package/esm/array-base/index.mjs.map +1 -1
  12. package/esm/array-base/utils.mjs +2 -2
  13. package/esm/array-cards/array-cards.d.ts +1 -1
  14. package/esm/array-cards/index.d.ts +3 -3
  15. package/esm/array-cards/index.mjs +49 -49
  16. package/esm/array-cards/index.mjs.map +1 -1
  17. package/esm/array-collapse/array-collapse.d.ts +2 -2
  18. package/esm/array-collapse/index.d.ts +3 -3
  19. package/esm/array-collapse/index.mjs +85 -84
  20. package/esm/array-collapse/index.mjs.map +1 -1
  21. package/esm/array-collapse/utils.mjs +2 -2
  22. package/esm/array-items/index.mjs +43 -40
  23. package/esm/array-items/index.mjs.map +1 -1
  24. package/esm/array-list-tabs/array-list-tabs.d.ts +3 -3
  25. package/esm/array-list-tabs/index.d.ts +6 -6
  26. package/esm/array-list-tabs/index.mjs +93 -89
  27. package/esm/array-list-tabs/index.mjs.map +1 -1
  28. package/esm/array-list-tabs/utils.mjs +2 -2
  29. package/esm/array-table/array-table.d.ts +29 -1
  30. package/esm/array-table/index.d.ts +31 -3
  31. package/esm/array-table/index.mjs +126 -125
  32. package/esm/array-table/index.mjs.map +1 -1
  33. package/esm/array-table/types.d.ts +2 -1
  34. package/esm/array-table/utils.mjs +2 -2
  35. package/esm/array-tabs/index.mjs +17 -17
  36. package/esm/array-tabs/index.mjs.map +1 -1
  37. package/esm/cascader/cascader.d.ts +1 -6
  38. package/esm/cascader/index.d.ts +3 -16
  39. package/esm/cascader/index.mjs +29 -33
  40. package/esm/cascader/index.mjs.map +1 -1
  41. package/esm/checkbox/checkbox-group.d.ts +3 -19
  42. package/esm/checkbox/index.d.ts +445 -407
  43. package/esm/checkbox/index.mjs +27 -36
  44. package/esm/checkbox/index.mjs.map +1 -1
  45. package/esm/date-picker/index.d.ts +442 -1
  46. package/esm/date-picker/index.mjs +12 -19
  47. package/esm/date-picker/index.mjs.map +1 -1
  48. package/esm/editable/editable.d.ts +16 -12
  49. package/esm/editable/index.d.ts +8 -6
  50. package/esm/editable/index.mjs +108 -110
  51. package/esm/editable/index.mjs.map +1 -1
  52. package/esm/form/form.mjs +1 -1
  53. package/esm/form/form.mjs.map +1 -1
  54. package/esm/form-button-group/index.mjs +31 -30
  55. package/esm/form-button-group/index.mjs.map +1 -1
  56. package/esm/form-button-group/utils.mjs +2 -2
  57. package/esm/form-collapse/index.mjs +40 -40
  58. package/esm/form-collapse/index.mjs.map +1 -1
  59. package/esm/form-dialog/index.d.ts +1 -1
  60. package/esm/form-dialog/index.mjs +5 -5
  61. package/esm/form-dialog/index.mjs.map +1 -1
  62. package/esm/form-dialog/types.d.ts +6 -6
  63. package/esm/form-drawer/index.d.ts +1 -1
  64. package/esm/form-drawer/index.mjs +5 -5
  65. package/esm/form-drawer/index.mjs.map +1 -1
  66. package/esm/form-drawer/types.d.ts +6 -6
  67. package/esm/form-grid/index.d.ts +1 -183
  68. package/esm/form-grid/index.mjs +2 -2
  69. package/esm/form-grid/index.mjs.map +1 -1
  70. package/esm/form-item/form-item.d.ts +2 -1
  71. package/esm/form-item/index.d.ts +12 -6
  72. package/esm/form-item/index.mjs +156 -152
  73. package/esm/form-item/index.mjs.map +1 -1
  74. package/esm/form-item/types.d.ts +0 -1
  75. package/esm/form-layout/form-layout.d.ts +0 -1
  76. package/esm/form-layout/form-layout.mjs +55 -53
  77. package/esm/form-layout/form-layout.mjs.map +1 -1
  78. package/esm/form-layout/types.d.ts +0 -2
  79. package/esm/form-layout/utils.d.ts +3 -3
  80. package/esm/form-layout/utils.mjs +47 -42
  81. package/esm/form-layout/utils.mjs.map +1 -1
  82. package/esm/form-step/index.mjs +26 -24
  83. package/esm/form-step/index.mjs.map +1 -1
  84. package/esm/form-tab/form-tab.d.ts +2 -2
  85. package/esm/form-tab/hooks.mjs +1 -1
  86. package/esm/form-tab/hooks.mjs.map +1 -1
  87. package/esm/form-tab/index.d.ts +1 -26
  88. package/esm/form-tab/index.mjs +31 -31
  89. package/esm/form-tab/index.mjs.map +1 -1
  90. package/esm/form-tab/types.d.ts +1 -1
  91. package/esm/input/index.d.ts +6 -38
  92. package/esm/input/index.mjs +38 -47
  93. package/esm/input/index.mjs.map +1 -1
  94. package/esm/input/input.d.ts +1 -8
  95. package/esm/input-number/index.d.ts +326 -1
  96. package/esm/input-number/index.mjs +10 -17
  97. package/esm/input-number/index.mjs.map +1 -1
  98. package/esm/pagination/pagination.mjs +110 -111
  99. package/esm/pagination/pagination.mjs.map +1 -1
  100. package/esm/password/index.d.ts +6 -38
  101. package/esm/password/index.mjs +1 -1
  102. package/esm/password/index.mjs.map +1 -1
  103. package/esm/preview-text/cascader.d.ts +1 -1
  104. package/esm/preview-text/date-picker.d.ts +1 -1
  105. package/esm/preview-text/index.d.ts +13 -13
  106. package/esm/preview-text/index.mjs +121 -121
  107. package/esm/preview-text/index.mjs.map +1 -1
  108. package/esm/preview-text/input.d.ts +1 -1
  109. package/esm/preview-text/select.d.ts +1 -1
  110. package/esm/preview-text/time-picker.d.ts +1 -1
  111. package/esm/preview-text/tree.d.ts +1 -1
  112. package/esm/radio/index.d.ts +347 -219
  113. package/esm/radio/index.mjs +37 -44
  114. package/esm/radio/index.mjs.map +1 -1
  115. package/esm/radio/radio-group.d.ts +2 -13
  116. package/esm/reset/index.d.ts +1 -62
  117. package/esm/reset/index.mjs +2 -2
  118. package/esm/reset/index.mjs.map +1 -1
  119. package/esm/select/index.d.ts +3 -16
  120. package/esm/select/index.mjs +65 -70
  121. package/esm/select/index.mjs.map +1 -1
  122. package/esm/select/select.d.ts +1 -6
  123. package/esm/select-table/index.d.ts +33 -5
  124. package/esm/select-table/index.mjs +90 -89
  125. package/esm/select-table/index.mjs.map +1 -1
  126. package/esm/select-table/select-table.d.ts +58 -2
  127. package/esm/select-table/types.d.ts +1 -1
  128. package/esm/submit/index.d.ts +1 -47
  129. package/esm/submit/index.mjs +2 -2
  130. package/esm/submit/index.mjs.map +1 -1
  131. package/esm/switch/index.d.ts +296 -1
  132. package/esm/switch/index.mjs +5 -11
  133. package/esm/switch/index.mjs.map +1 -1
  134. package/esm/time-picker/index.d.ts +442 -1
  135. package/esm/time-picker/index.mjs +9 -14
  136. package/esm/time-picker/index.mjs.map +1 -1
  137. package/esm/time-select/index.d.ts +184 -1
  138. package/esm/time-select/index.mjs +8 -13
  139. package/esm/time-select/index.mjs.map +1 -1
  140. package/esm/transfer/index.d.ts +196 -115
  141. package/esm/transfer/index.mjs +5 -5
  142. package/esm/transfer/index.mjs.map +1 -1
  143. package/esm/tree/index.d.ts +5 -5
  144. package/esm/tree/index.mjs +34 -34
  145. package/esm/tree/index.mjs.map +1 -1
  146. package/esm/tree/tree.d.ts +2 -2
  147. package/esm/tree/types.d.ts +1 -1
  148. package/esm/tree-select/index.d.ts +3 -19
  149. package/esm/tree-select/index.mjs +23 -30
  150. package/esm/tree-select/index.mjs.map +1 -1
  151. package/esm/tree-select/tree-select.d.ts +1 -8
  152. package/esm/upload/index.d.ts +409 -404
  153. package/esm/upload/index.mjs +9 -9
  154. package/esm/upload/index.mjs.map +1 -1
  155. package/esm/upload/upload.d.ts +802 -792
  156. package/esm/vendor/icon.mjs.map +1 -1
  157. package/esm/vendor/lodash.mjs +12 -20
  158. package/esm/vendor/lodash.mjs.map +1 -1
  159. package/esm/vendor/runtime.mjs +29 -24
  160. package/esm/vendor/runtime.mjs.map +1 -1
  161. package/esm/vendor/shared.esm-bundler.mjs +2 -2
  162. package/esm/vendor/sizes.mjs.map +1 -1
  163. package/esm/vendor/types.mjs +5 -5
  164. package/esm/vendor/types.mjs.map +1 -1
  165. package/package.json +8 -11
@@ -0,0 +1,32 @@
1
+ # Silver Formily Element Plus
2
+
3
+ [![codecov](https://codecov.io/gh/hezhengxu2018/silver-formily-element-plus/graph/badge.svg?token=LZF15NPLJU)](https://codecov.io/gh/hezhengxu2018/silver-formily-element-plus)
4
+
5
+ English | [简体中文](README.md)
6
+
7
+ Formily bindings for Element Plus, focused on consistent UI behavior, flexible configuration, and richer form scenarios.
8
+
9
+ ## Documentation
10
+
11
+ https://element-plus.silver-formily.org/
12
+
13
+ ## Features
14
+
15
+ - 💡 Unified component style
16
+ - 🔌 Flexible dependencies (Formily + Element Plus as peerDependencies)
17
+ - 🔑 Complete form components plus scenario components
18
+ - ♿️ Better accessibility with enhanced FormItem
19
+ - ✅ Comprehensive testing for new components
20
+ - 📝 Vue template syntax based for readability and performance
21
+
22
+ ## Installation
23
+
24
+ ~~~bash
25
+ pnpm add @silver-formily/element-plus
26
+ ~~~
27
+
28
+ This package relies on peer dependencies such as Formily, Element Plus, Vue, and @silver-formily/vue. Refer to the documentation or package.json for compatible versions and setup details.
29
+
30
+ ## License
31
+
32
+ MIT
package/README.md CHANGED
@@ -2,34 +2,31 @@
2
2
 
3
3
  [![codecov](https://codecov.io/gh/hezhengxu2018/silver-formily-element-plus/graph/badge.svg?token=LZF15NPLJU)](https://codecov.io/gh/hezhengxu2018/silver-formily-element-plus)
4
4
 
5
- Another @formily/element-plus component library.
5
+ 简体中文 | [English](README.en-US.md)
6
6
 
7
- ## Features
7
+ 基于 Element Plus 的 Formily 组件库封装,提供一致的组件风格、灵活的配置能力以及更丰富的表单场景。
8
8
 
9
- ### 💡 Unified Component Style
9
+ ## 文档
10
10
 
11
- The component style leans more towards Element Plus, while the component configuration options lean towards Formily. For conflicting configuration items between the two, we take a balanced approach to ensure flexibility and style consistency.
11
+ https://element-plus.silver-formily.org/
12
12
 
13
- ### 🔌 Flexible Dependencies
13
+ ## 特性
14
14
 
15
- Both Formily and Element Plus versions are treated as peerDependencies, allowing you to choose the Element Plus version that best suits your project needs.
15
+ - 💡 统一的组件风格
16
+ - 🔌 灵活的依赖策略(Formily 与 Element Plus 作为 peerDependencies)
17
+ - 🔑 完整的表单组件与扩展场景组件
18
+ - ♿️ 更好的无障碍支持与 FormItem 体验
19
+ - ✅ 新组件具备完善测试保障
20
+ - 📝 基于 Vue 模板语法,易读且性能友好
16
21
 
17
- ### 🔑 Complete Form Components
22
+ ## 安装
18
23
 
19
- Complements Element Plus form components while adding additional scenario components to meet various business needs.
24
+ ~~~bash
25
+ pnpm add @silver-formily/element-plus
26
+ ~~~
20
27
 
21
- ### ♿️ Better Accessibility
28
+ 本包依赖 Formily、Element Plus、Vue、@silver-formily/vue 等 peerDependencies。请查看文档或 package.json 获取兼容版本与配置说明。
22
29
 
23
- Enhanced component accessibility. Special focus on FormItem component reconstruction to provide more friendly component access support and visual feedback.
30
+ ## 开源协议
24
31
 
25
- ### ✅ Comprehensive Testing
26
-
27
- All new components come with comprehensive component testing, ensuring component quality and confidence in refactoring.
28
-
29
- ### 📝 Vue Template Syntax Based
30
-
31
- New components are developed using Vue template syntax whenever possible, providing better readability and runtime optimization, making the code more maintainable and performant.
32
-
33
- ## Contributor Guide
34
-
35
- Please review [`AGENTS.md`](AGENTS.md) for repository structure, workflows, and PR expectations before submitting changes.
32
+ MIT
@@ -1,24 +1,23 @@
1
1
  import { stylePrefix as r } from "./configs/index.mjs";
2
2
  import { useDebounceFn as n, useResizeObserver as s, useThrottleFn as i } from "./shared/hooks.mjs";
3
- import { loadElConfigProvider as p } from "./shared/load-config-provider.mjs";
4
- import { getTransitionDuration as f, loading as u, useDebonceSubmitting as x } from "./shared/loading.mjs";
5
- import { lt as d, quickVersionCompare as C } from "./shared/simple-version-compare.mjs";
6
- import { mapReadPretty as c, transformComponent as g } from "./shared/transform-component.mjs";
7
- import { composeExport as D, hasSlotContent as E, isVnodeEmpty as P, isVueOptions as V, useCleanAttrs as h } from "./shared/utils.mjs";
3
+ import { loadElConfigProvider as m } from "./shared/load-config-provider.mjs";
4
+ import { getTransitionDuration as a, loading as f, useDebonceSubmitting as x } from "./shared/loading.mjs";
5
+ import { lt as d, quickVersionCompare as b } from "./shared/simple-version-compare.mjs";
6
+ import { mapReadPretty as g } from "./shared/transform-component.mjs";
7
+ import { composeExport as y, hasSlotContent as D, isVnodeEmpty as E, isVueOptions as P, useCleanAttrs as V } from "./shared/utils.mjs";
8
8
  export {
9
- D as composeExport,
10
- f as getTransitionDuration,
11
- E as hasSlotContent,
12
- P as isVnodeEmpty,
13
- V as isVueOptions,
14
- p as loadElConfigProvider,
15
- u as loading,
9
+ y as composeExport,
10
+ a as getTransitionDuration,
11
+ D as hasSlotContent,
12
+ E as isVnodeEmpty,
13
+ P as isVueOptions,
14
+ m as loadElConfigProvider,
15
+ f as loading,
16
16
  d as lt,
17
- c as mapReadPretty,
18
- C as quickVersionCompare,
17
+ g as mapReadPretty,
18
+ b as quickVersionCompare,
19
19
  r as stylePrefix,
20
- g as transformComponent,
21
- h as useCleanAttrs,
20
+ V as useCleanAttrs,
22
21
  x as useDebonceSubmitting,
23
22
  n as useDebounceFn,
24
23
  s as useResizeObserver,
@@ -1,23 +1,22 @@
1
1
  import { useDebounceFn as r, useResizeObserver as t, useThrottleFn as n } from "./hooks.mjs";
2
2
  import { loadElConfigProvider as i } from "./load-config-provider.mjs";
3
- import { getTransitionDuration as p, loading as a, useDebonceSubmitting as u } from "./loading.mjs";
3
+ import { getTransitionDuration as m, loading as u, useDebonceSubmitting as a } from "./loading.mjs";
4
4
  import { lt as l, quickVersionCompare as x } from "./simple-version-compare.mjs";
5
- import { mapReadPretty as C, transformComponent as b } from "./transform-component.mjs";
6
- import { composeExport as g, hasSlotContent as D, isVnodeEmpty as E, isVueOptions as V, useCleanAttrs as h } from "./utils.mjs";
5
+ import { mapReadPretty as b } from "./transform-component.mjs";
6
+ import { composeExport as g, hasSlotContent as C, isVnodeEmpty as D, isVueOptions as E, useCleanAttrs as V } from "./utils.mjs";
7
7
  export {
8
8
  g as composeExport,
9
- p as getTransitionDuration,
10
- D as hasSlotContent,
11
- E as isVnodeEmpty,
12
- V as isVueOptions,
9
+ m as getTransitionDuration,
10
+ C as hasSlotContent,
11
+ D as isVnodeEmpty,
12
+ E as isVueOptions,
13
13
  i as loadElConfigProvider,
14
- a as loading,
14
+ u as loading,
15
15
  l as lt,
16
- C as mapReadPretty,
16
+ b as mapReadPretty,
17
17
  x as quickVersionCompare,
18
- b as transformComponent,
19
- h as useCleanAttrs,
20
- u as useDebonceSubmitting,
18
+ V as useCleanAttrs,
19
+ a as useDebonceSubmitting,
21
20
  r as useDebounceFn,
22
21
  t as useResizeObserver,
23
22
  n as useThrottleFn
@@ -1,8 +1,3 @@
1
- import { VueComponent } from '@formily/vue';
1
+ import { IComponentMapper } from '@silver-formily/vue';
2
2
  import { Component } from 'vue';
3
- type ListenersTransformRules = Record<string, string>;
4
- export declare function transformComponent<T extends Record<string, any>>(tag: any, transformRules?: ListenersTransformRules): Component<T> | any;
5
- export declare function mapReadPretty<T extends VueComponent, C extends VueComponent>(component: C, readPrettyProps?: Record<string, any>): (target: T) => import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
6
- [key: string]: any;
7
- }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
- export {};
3
+ export declare function mapReadPretty(component: Component, readPrettyProps?: Record<string, any>): IComponentMapper;
@@ -1,41 +1,25 @@
1
- import { isVoidField as f } from "@formily/core";
2
- import { observer as l } from "@formily/reactive-vue";
3
- import { each as c } from "@formily/shared";
4
- import { useField as C } from "@formily/vue";
5
- import { defineComponent as i, h as s } from "vue";
6
- import { useCleanAttrs as $ } from "./utils.mjs";
7
- function h(t, o) {
8
- const r = t.name.split("El")[1];
9
- return i({
10
- name: `F${r}`,
11
- setup(d, { attrs: a, slots: m }) {
12
- return () => {
13
- const { props: n } = $();
14
- return o && c(o, (p, e) => {
15
- n.value[`on${p[0].toUpperCase()}${p.slice(1)}`] = a[`on${e[0].toUpperCase()}${e.slice(1)}`];
16
- }), s(t, n.value, m);
17
- };
18
- }
19
- });
20
- }
21
- function E(t, o) {
22
- return (r) => l(
23
- i({
1
+ import { isVoidField as i } from "@formily/core";
2
+ import { observer as s } from "@silver-formily/reactive-vue";
3
+ import { useField as f } from "@silver-formily/vue";
4
+ import { defineComponent as u, h as l } from "vue";
5
+ function C(t, o) {
6
+ return (r) => s(
7
+ u({
24
8
  name: r.name ? `Read${r.name}` : "ReadComponent",
25
- setup(d, { attrs: a, slots: m, listeners: n }) {
26
- const p = C();
9
+ setup(R, { attrs: n, slots: a, listeners: m }) {
10
+ const p = f();
27
11
  return () => {
28
- const e = p.value, u = !!e?.data?.readPretty;
29
- return s(
30
- e && !f(e) && (e.pattern === "readPretty" || u) ? t : r,
12
+ const e = p.value, d = !!e?.data?.readPretty;
13
+ return l(
14
+ e && !i(e) && (e.pattern === "readPretty" || d) ? t : r,
31
15
  {
32
16
  attrs: {
33
17
  ...o,
34
- ...a
18
+ ...n
35
19
  },
36
- on: n
20
+ on: m
37
21
  },
38
- m
22
+ a
39
23
  );
40
24
  };
41
25
  }
@@ -43,7 +27,6 @@ function E(t, o) {
43
27
  );
44
28
  }
45
29
  export {
46
- E as mapReadPretty,
47
- h as transformComponent
30
+ C as mapReadPretty
48
31
  };
49
32
  //# sourceMappingURL=transform-component.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform-component.mjs","sources":["../../../src/__builtins__/shared/transform-component.ts"],"sourcesContent":["import type { VueComponent } from '@formily/vue'\nimport type { Component } from 'vue'\nimport { isVoidField } from '@formily/core'\nimport { observer } from '@formily/reactive-vue'\nimport { each } from '@formily/shared'\nimport { useField } from '@formily/vue'\nimport { defineComponent, h } from 'vue'\nimport { useCleanAttrs } from './utils'\n\ntype ListenersTransformRules = Record<string, string>\n\nexport function transformComponent<T extends Record<string, any>>(tag: any, transformRules?: ListenersTransformRules): Component<T> | any {\n const componentName = tag.name.split('El')[1]\n return defineComponent({\n name: `F${componentName}`,\n setup(props, { attrs, slots }) {\n return () => {\n const { props: data } = useCleanAttrs()\n if (transformRules) {\n each(transformRules, (event, extract) => {\n data.value[`on${event[0].toUpperCase()}${event.slice(1)}`]\n = attrs[`on${extract[0].toUpperCase()}${extract.slice(1)}`]\n })\n }\n return h(tag, data.value, slots)\n }\n },\n })\n}\n\n// fork from https://github.com/alibaba/formily/blob/7c64c671252adf85471ac5aabfddbaf4fc537354/packages/vue/src/shared/connect.ts#L65\nexport function mapReadPretty<T extends VueComponent, C extends VueComponent>(\n component: C,\n readPrettyProps?: Record<string, any>,\n) {\n return (target: T) => {\n return observer(\n defineComponent({\n name: target.name ? `Read${target.name}` : `ReadComponent`,\n setup(props, { attrs, slots, listeners }: Record<string, any>) {\n const fieldRef = useField()\n return () => {\n const field = fieldRef.value\n const isEditableReadPretty = !!field?.data?.readPretty\n return h(\n field && !isVoidField(field) && (field.pattern === 'readPretty' || isEditableReadPretty)\n ? component\n : target,\n {\n attrs: {\n ...readPrettyProps,\n ...attrs,\n },\n on: listeners,\n },\n slots,\n )\n }\n },\n }),\n )\n }\n}\n"],"names":["transformComponent","tag","transformRules","componentName","defineComponent","props","attrs","slots","data","useCleanAttrs","each","event","extract","h","mapReadPretty","component","readPrettyProps","target","observer","listeners","fieldRef","useField","field","isEditableReadPretty","isVoidField"],"mappings":";;;;;;AAWO,SAASA,EAAkDC,GAAUC,GAA8D;AACxI,QAAMC,IAAgBF,EAAI,KAAK,MAAM,IAAI,EAAE,CAAC;AAC5C,SAAOG,EAAgB;AAAA,IACrB,MAAM,IAAID,CAAa;AAAA,IACvB,MAAME,GAAO,EAAE,OAAAC,GAAO,OAAAC,KAAS;AAC7B,aAAO,MAAM;AACX,cAAM,EAAE,OAAOC,EAAA,IAASC,EAAA;AACxB,eAAIP,KACFQ,EAAKR,GAAgB,CAACS,GAAOC,MAAY;AACvC,UAAAJ,EAAK,MAAM,KAAKG,EAAM,CAAC,EAAE,YAAA,CAAa,GAAGA,EAAM,MAAM,CAAC,CAAC,EAAE,IACrDL,EAAM,KAAKM,EAAQ,CAAC,EAAE,aAAa,GAAGA,EAAQ,MAAM,CAAC,CAAC,EAAE;AAAA,QAC9D,CAAC,GAEIC,EAAEZ,GAAKO,EAAK,OAAOD,CAAK;AAAA,MACjC;AAAA,IACF;AAAA,EAAA,CACD;AACH;AAGO,SAASO,EACdC,GACAC,GACA;AACA,SAAO,CAACC,MACCC;AAAA,IACLd,EAAgB;AAAA,MACd,MAAMa,EAAO,OAAO,OAAOA,EAAO,IAAI,KAAK;AAAA,MAC3C,MAAMZ,GAAO,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAY,KAAkC;AAC7D,cAAMC,IAAWC,EAAA;AACjB,eAAO,MAAM;AACX,gBAAMC,IAAQF,EAAS,OACjBG,IAAuB,CAAC,CAACD,GAAO,MAAM;AAC5C,iBAAOT;AAAA,YACLS,KAAS,CAACE,EAAYF,CAAK,MAAMA,EAAM,YAAY,gBAAgBC,KAC/DR,IACAE;AAAA,YACJ;AAAA,cACE,OAAO;AAAA,gBACL,GAAGD;AAAA,gBACH,GAAGV;AAAA,cAAA;AAAA,cAEL,IAAIa;AAAA,YAAA;AAAA,YAENZ;AAAA,UAAA;AAAA,QAEJ;AAAA,MACF;AAAA,IAAA,CACD;AAAA,EAAA;AAGP;"}
1
+ {"version":3,"file":"transform-component.mjs","sources":["../../../src/__builtins__/shared/transform-component.ts"],"sourcesContent":["import type { IComponentMapper } from '@silver-formily/vue'\nimport type { Component } from 'vue'\nimport { isVoidField } from '@formily/core'\nimport { observer } from '@silver-formily/reactive-vue'\nimport { useField } from '@silver-formily/vue'\nimport { defineComponent, h } from 'vue'\n\n// fork from https://github.com/alibaba/formily/blob/7c64c671252adf85471ac5aabfddbaf4fc537354/packages/vue/src/shared/connect.ts#L65\nexport function mapReadPretty(\n component: Component,\n readPrettyProps?: Record<string, any>,\n): IComponentMapper {\n const mapper = (target: Component) => {\n return observer(\n defineComponent({\n name: target.name ? `Read${target.name}` : `ReadComponent`,\n setup(props, { attrs, slots, listeners }: Record<string, any>) {\n const fieldRef = useField()\n return () => {\n const field = fieldRef.value\n const isEditableReadPretty = !!field?.data?.readPretty\n return h(\n field && !isVoidField(field) && (field.pattern === 'readPretty' || isEditableReadPretty)\n ? component\n : target,\n {\n attrs: {\n ...readPrettyProps,\n ...attrs,\n },\n on: listeners,\n },\n slots,\n )\n }\n },\n }),\n )\n }\n\n return mapper as unknown as IComponentMapper\n}\n"],"names":["mapReadPretty","component","readPrettyProps","target","observer","defineComponent","props","attrs","slots","listeners","fieldRef","useField","field","isEditableReadPretty","h","isVoidField"],"mappings":";;;;AAQO,SAASA,EACdC,GACAC,GACkB;AA6BlB,SA5Be,CAACC,MACPC;AAAA,IACLC,EAAgB;AAAA,MACd,MAAMF,EAAO,OAAO,OAAOA,EAAO,IAAI,KAAK;AAAA,MAC3C,MAAMG,GAAO,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAC,KAAkC;AAC7D,cAAMC,IAAWC,EAAA;AACjB,eAAO,MAAM;AACX,gBAAMC,IAAQF,EAAS,OACjBG,IAAuB,CAAC,CAACD,GAAO,MAAM;AAC5C,iBAAOE;AAAA,YACLF,KAAS,CAACG,EAAYH,CAAK,MAAMA,EAAM,YAAY,gBAAgBC,KAC/DZ,IACAE;AAAA,YACJ;AAAA,cACE,OAAO;AAAA,gBACL,GAAGD;AAAA,gBACH,GAAGK;AAAA,cAAA;AAAA,cAEL,IAAIE;AAAA,YAAA;AAAA,YAEND;AAAA,UAAA;AAAA,QAEJ;AAAA,MACF;AAAA,IAAA,CACD;AAAA,EAAA;AAKP;"}
@@ -1,34 +1,34 @@
1
1
  import { isPlainObj as o } from "@formily/shared";
2
2
  import { useAttrs as i } from "element-plus";
3
- import { computed as a, Fragment as s } from "vue";
3
+ import { computed as a, Comment as s, Text as f, Fragment as c } from "vue";
4
4
  import { o as n } from "../../vendor/lodash.mjs";
5
- function y(t = []) {
5
+ function h(t = []) {
6
6
  const r = i();
7
7
  return {
8
8
  props: a(() => {
9
- const e = ["modelValue", "value", "onChange", "attrs", "on", "readOnly"];
9
+ const e = ["value", "onChange", "attrs", "on", "readOnly"];
10
10
  return o(r.value.attrs) ? n({ ...r.value, ...r.value.attrs }, e.concat(t)) : n(r.value, e.concat(t));
11
11
  })
12
12
  };
13
13
  }
14
- function g(t) {
14
+ function v(t) {
15
15
  return t && (typeof t.template == "string" || typeof t.render == "function");
16
16
  }
17
- function h(t, r) {
17
+ function E(t, r) {
18
18
  return Object.assign(t, r);
19
19
  }
20
20
  /* istanbul ignore next -- @preserve */
21
21
  function u(t) {
22
- return t.every((r) => !!(r.type === Comment || r.type === Text && typeof r.children == "string" && !r.children.trim() || r.type === s && u(r.children)));
22
+ return t.every((r) => !!(r.type === s || r.type === f && typeof r.children == "string" && !r.children.trim() || r.type === c && u(r.children)));
23
23
  }
24
- function v(t) {
24
+ function O(t) {
25
25
  return t ? !u(t()) : !1;
26
26
  }
27
27
  export {
28
- h as composeExport,
29
- v as hasSlotContent,
28
+ E as composeExport,
29
+ O as hasSlotContent,
30
30
  u as isVnodeEmpty,
31
- g as isVueOptions,
32
- y as useCleanAttrs
31
+ v as isVueOptions,
32
+ h as useCleanAttrs
33
33
  };
34
34
  //# sourceMappingURL=utils.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs","sources":["../../../src/__builtins__/shared/utils.ts"],"sourcesContent":["import type { Component, ComputedRef, Slot, VNode } from 'vue'\nimport { isPlainObj } from '@formily/shared'\nimport { useAttrs } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, Fragment } from 'vue'\n\nexport function useCleanAttrs(removeAttrsList: string[] = []): {\n props: ComputedRef<Record<string, any>>\n} {\n const attrs = useAttrs()\n const props = computed(() => {\n const DEFAULT_REMOVE_ATTRS = ['modelValue', 'value', 'onChange', 'attrs', 'on', 'readOnly']\n if (isPlainObj(attrs.value.attrs)) {\n return omit({ ...attrs.value, ...attrs.value.attrs }, DEFAULT_REMOVE_ATTRS.concat(removeAttrsList))\n }\n return omit(attrs.value, DEFAULT_REMOVE_ATTRS.concat(removeAttrsList))\n })\n return {\n props,\n }\n}\n\nexport function isVueOptions(options: any): options is Component {\n return (\n options\n && (typeof options.template === 'string'\n || typeof options.render === 'function')\n )\n}\n\nexport function composeExport<T0 extends object, T1 extends object>(\n s0: T0,\n s1: T1,\n): T0 & T1 {\n return Object.assign(s0, s1)\n}\n\n// Adapted from https://github.com/vuejs/vue-next/blob/ca17162e377e0a0bf3fae9d92d0fdcb32084a9fe/packages/runtime-core/src/helpers/renderSlot.ts#L77\n/* istanbul ignore next -- @preserve */\nexport function isVnodeEmpty(vnodes: Array<VNode>) {\n return vnodes.every((node: VNode) => {\n if (node.type === Comment) {\n return true\n }\n\n if (node.type === Text && typeof node.children === 'string' && !node.children.trim()) {\n return true\n }\n\n if (\n node.type === Fragment\n && isVnodeEmpty(node.children as Array<VNode>)\n ) {\n return true\n }\n\n return false\n })\n}\n\nexport function hasSlotContent(slot: Slot<any> | undefined) {\n if (!slot) {\n return false\n }\n return !isVnodeEmpty(slot())\n}\n"],"names":["useCleanAttrs","removeAttrsList","attrs","useAttrs","computed","DEFAULT_REMOVE_ATTRS","isPlainObj","omit","isVueOptions","options","composeExport","s0","s1","isVnodeEmpty","vnodes","node","Fragment","hasSlotContent","slot"],"mappings":";;;;AAMO,SAASA,EAAcC,IAA4B,IAExD;AACA,QAAMC,IAAQC,EAAA;AAQd,SAAO;AAAA,IACL,OARYC,EAAS,MAAM;AAC3B,YAAMC,IAAuB,CAAC,cAAc,SAAS,YAAY,SAAS,MAAM,UAAU;AAC1F,aAAIC,EAAWJ,EAAM,MAAM,KAAK,IACvBK,EAAK,EAAE,GAAGL,EAAM,OAAO,GAAGA,EAAM,MAAM,MAAA,GAASG,EAAqB,OAAOJ,CAAe,CAAC,IAE7FM,EAAKL,EAAM,OAAOG,EAAqB,OAAOJ,CAAe,CAAC;AAAA,IACvE,CAAC;AAAA,EAEC;AAEJ;AAEO,SAASO,EAAaC,GAAoC;AAC/D,SACEA,MACI,OAAOA,EAAQ,YAAa,YAC3B,OAAOA,EAAQ,UAAW;AAEnC;AAEO,SAASC,EACdC,GACAC,GACS;AACT,SAAO,OAAO,OAAOD,GAAIC,CAAE;AAC7B;AAGA;AACO,SAASC,EAAaC,GAAsB;AACjD,SAAOA,EAAO,MAAM,CAACC,MACf,GAAAA,EAAK,SAAS,WAIdA,EAAK,SAAS,QAAQ,OAAOA,EAAK,YAAa,YAAY,CAACA,EAAK,SAAS,KAAA,KAK5EA,EAAK,SAASC,KACXH,EAAaE,EAAK,QAAwB,EAMhD;AACH;AAEO,SAASE,EAAeC,GAA6B;AAC1D,SAAKA,IAGE,CAACL,EAAaK,GAAM,IAFlB;AAGX;"}
1
+ {"version":3,"file":"utils.mjs","sources":["../../../src/__builtins__/shared/utils.ts"],"sourcesContent":["import type { Component, ComputedRef, Slot, VNode } from 'vue'\nimport { isPlainObj } from '@formily/shared'\nimport { useAttrs } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { Comment, computed, Fragment, Text } from 'vue'\n\nexport function useCleanAttrs(removeAttrsList: string[] = []): {\n props: ComputedRef<Record<string, any>>\n} {\n const attrs = useAttrs()\n const props = computed(() => {\n const DEFAULT_REMOVE_ATTRS = ['value', 'onChange', 'attrs', 'on', 'readOnly']\n if (isPlainObj(attrs.value.attrs)) {\n return omit({ ...attrs.value, ...attrs.value.attrs }, DEFAULT_REMOVE_ATTRS.concat(removeAttrsList))\n }\n return omit(attrs.value, DEFAULT_REMOVE_ATTRS.concat(removeAttrsList))\n })\n return {\n props,\n }\n}\n\nexport function isVueOptions(options: any): options is Component {\n return (\n options\n && (typeof options.template === 'string'\n || typeof options.render === 'function')\n )\n}\n\nexport function composeExport<T0 extends object, T1 extends object>(\n s0: T0,\n s1: T1,\n): T0 & T1 {\n return Object.assign(s0, s1)\n}\n\n// Adapted from https://github.com/vuejs/vue-next/blob/ca17162e377e0a0bf3fae9d92d0fdcb32084a9fe/packages/runtime-core/src/helpers/renderSlot.ts#L77\n/* istanbul ignore next -- @preserve */\nexport function isVnodeEmpty(vnodes: Array<VNode>) {\n return vnodes.every((node: VNode) => {\n if (node.type === Comment) {\n return true\n }\n\n if (node.type === Text && typeof node.children === 'string' && !node.children.trim()) {\n return true\n }\n\n if (\n node.type === Fragment\n && isVnodeEmpty(node.children as Array<VNode>)\n ) {\n return true\n }\n\n return false\n })\n}\n\nexport function hasSlotContent(slot: Slot<any> | undefined) {\n if (!slot) {\n return false\n }\n return !isVnodeEmpty(slot())\n}\n"],"names":["useCleanAttrs","removeAttrsList","attrs","useAttrs","computed","DEFAULT_REMOVE_ATTRS","isPlainObj","omit","isVueOptions","options","composeExport","s0","s1","isVnodeEmpty","vnodes","node","Comment","Text","Fragment","hasSlotContent","slot"],"mappings":";;;;AAMO,SAASA,EAAcC,IAA4B,IAExD;AACA,QAAMC,IAAQC,EAAA;AAQd,SAAO;AAAA,IACL,OARYC,EAAS,MAAM;AAC3B,YAAMC,IAAuB,CAAC,SAAS,YAAY,SAAS,MAAM,UAAU;AAC5E,aAAIC,EAAWJ,EAAM,MAAM,KAAK,IACvBK,EAAK,EAAE,GAAGL,EAAM,OAAO,GAAGA,EAAM,MAAM,MAAA,GAASG,EAAqB,OAAOJ,CAAe,CAAC,IAE7FM,EAAKL,EAAM,OAAOG,EAAqB,OAAOJ,CAAe,CAAC;AAAA,IACvE,CAAC;AAAA,EAEC;AAEJ;AAEO,SAASO,EAAaC,GAAoC;AAC/D,SACEA,MACI,OAAOA,EAAQ,YAAa,YAC3B,OAAOA,EAAQ,UAAW;AAEnC;AAEO,SAASC,EACdC,GACAC,GACS;AACT,SAAO,OAAO,OAAOD,GAAIC,CAAE;AAC7B;AAGA;AACO,SAASC,EAAaC,GAAsB;AACjD,SAAOA,EAAO,MAAM,CAACC,MACf,GAAAA,EAAK,SAASC,KAIdD,EAAK,SAASE,KAAQ,OAAOF,EAAK,YAAa,YAAY,CAACA,EAAK,SAAS,KAAA,KAK5EA,EAAK,SAASG,KACXL,EAAaE,EAAK,QAAwB,EAMhD;AACH;AAEO,SAASI,EAAeC,GAA6B;AAC1D,SAAKA,IAGE,CAACP,EAAaO,GAAM,IAFlB;AAGX;"}
@@ -1,9 +1,9 @@
1
- import { defineComponent as o, createBlock as m, createCommentVNode as f, unref as a, openBlock as i, normalizeClass as u, withCtx as h, createTextVNode as _, toDisplayString as v, createElementBlock as C, renderSlot as c, provide as M, useAttrs as w, withModifiers as $ } from "vue";
1
+ import { defineComponent as o, createBlock as m, createCommentVNode as f, unref as a, openBlock as i, normalizeClass as c, withCtx as h, createTextVNode as _, toDisplayString as v, createElementBlock as C, renderSlot as u, provide as M, useAttrs as w, withModifiers as $ } from "vue";
2
2
  import { ElLink as y } from "element-plus";
3
3
  import "@formily/reactive";
4
4
  import "@formily/core";
5
- import "@formily/reactive-vue";
6
- import { useField as B, useFieldSchema as D } from "@formily/vue";
5
+ import "@silver-formily/reactive-vue";
6
+ import { useField as B, useFieldSchema as D } from "@silver-formily/vue";
7
7
  import { composeExport as I } from "../__builtins__/shared/utils.mjs";
8
8
  import { Plus as R, ArrowDown as S, ArrowUp as U, Delete as V, Rank as z } from "@element-plus/icons-vue";
9
9
  import { useArray as p, compatibleUnderlineProp as b, prefixCls as d, getDefaultValue as g, useIndex as k, useRecord as E, useKey as F } from "./utils.mjs";
@@ -14,26 +14,26 @@ import '../styles/array-base/index.css';const P = /* @__PURE__ */ o({
14
14
  __name: "array-base-addition",
15
15
  props: {
16
16
  method: { default: "push" },
17
- defaultValue: null,
18
- title: null
17
+ defaultValue: {},
18
+ title: {}
19
19
  },
20
- setup(r) {
21
- const n = r, t = B(), e = p();
22
- function s() {
23
- const l = g(n.defaultValue, e?.schema.value);
24
- n.method === "unshift" ? (e?.field?.value.unshift(l), e.attrs?.add?.(0)) : (e?.field?.value.push(l), e.attrs?.add?.(e?.field?.value?.value?.length - 1));
20
+ setup(n) {
21
+ const r = n, t = B(), e = p();
22
+ function l() {
23
+ const s = g(r.defaultValue, e?.schema.value);
24
+ r.method === "unshift" ? (e?.field?.value.unshift(s), e.attrs?.add?.(0)) : (e?.field?.value.push(s), e.attrs?.add?.(e?.field?.value?.value?.length - 1));
25
25
  }
26
- return (l, A) => a(e).field.value.pattern === "editable" ? (i(), m(a(y), {
26
+ return (s, A) => a(e).field.value.pattern === "editable" ? (i(), m(a(y), {
27
27
  key: 0,
28
- class: u(`${a(d)}-addition`),
28
+ class: c(`${a(d)}-addition`),
29
29
  icon: a(R),
30
30
  underline: a(b)(),
31
31
  role: "button",
32
32
  "aria-label": "添加条目",
33
- onClick: s
33
+ onClick: l
34
34
  }, {
35
35
  default: h(() => [
36
- _(v(a(t).title || n.title), 1)
36
+ _(v(a(t).title || r.title), 1)
37
37
  ]),
38
38
  _: 1
39
39
  }, 8, ["class", "icon", "underline"])) : f("", !0);
@@ -41,13 +41,13 @@ import '../styles/array-base/index.css';const P = /* @__PURE__ */ o({
41
41
  }), K = /* @__PURE__ */ o({
42
42
  name: "ArrayBaseIndex",
43
43
  __name: "array-base-index",
44
- setup(r) {
45
- const n = k();
44
+ setup(n) {
45
+ const r = k();
46
46
  return (t, e) => (i(), C("span", {
47
- class: u(`${a(d)}-index`)
47
+ class: c(`${a(d)}-index`)
48
48
  }, [
49
- c(t.$slots, "default", { index: a(n) }, () => [
50
- _(" #" + v(a(n) + 1) + ". ", 1)
49
+ u(t.$slots, "default", { index: a(r) }, () => [
50
+ _(" #" + v(a(r) + 1) + ". ", 1)
51
51
  ])
52
52
  ], 2));
53
53
  }
@@ -57,56 +57,56 @@ import '../styles/array-base/index.css';const P = /* @__PURE__ */ o({
57
57
  __name: "array-base-inner",
58
58
  props: {
59
59
  disabled: { type: Boolean },
60
- keyMap: null
60
+ keyMap: {}
61
61
  },
62
- setup(r) {
63
- const n = r, t = B(), e = D();
62
+ setup(n) {
63
+ const r = n, t = B(), e = D();
64
64
  return M(H, {
65
65
  field: t,
66
66
  schema: e,
67
- props: n,
67
+ props: r,
68
68
  attrs: w(),
69
- keyMap: n.keyMap
70
- }), (s, l) => c(s.$slots, "default");
69
+ keyMap: r.keyMap
70
+ }), (l, s) => u(l.$slots, "default");
71
71
  }
72
72
  }), T = /* @__PURE__ */ o({
73
73
  name: "ArrayBaseItem",
74
74
  __name: "array-base-item",
75
75
  props: {
76
- index: null,
77
- record: null
76
+ index: {},
77
+ record: {}
78
78
  },
79
- setup(r) {
80
- return M(N, r), (t, e) => c(t.$slots, "default");
79
+ setup(n) {
80
+ return M(N, n), (t, e) => u(t.$slots, "default");
81
81
  }
82
82
  }), j = /* @__PURE__ */ o({
83
83
  name: "ArrayBaseMoveDown",
84
84
  __name: "array-base-move-down",
85
85
  props: {
86
- title: null
86
+ title: {}
87
87
  },
88
- setup(r) {
89
- const n = r, t = k(), e = p();
90
- function s() {
88
+ setup(n) {
89
+ const r = n, t = k(), e = p();
90
+ function l() {
91
91
  x(e?.keyMap) && e.keyMap.splice(
92
92
  t.value + 1,
93
93
  0,
94
94
  e.keyMap.splice(t.value, 1)[0]
95
95
  ), e?.field.value.moveDown(t.value), e?.attrs?.moveDown?.(t.value);
96
96
  }
97
- return (l, A) => a(e)?.field.value.pattern === "editable" ? (i(), m(a(y), {
97
+ return (s, A) => a(e)?.field.value.pattern === "editable" ? (i(), m(a(y), {
98
98
  key: 0,
99
- class: u(`${a(d)}-move-down`),
99
+ class: c(`${a(d)}-move-down`),
100
100
  size: "small",
101
101
  icon: a(S),
102
102
  underline: a(b)(),
103
103
  role: "button",
104
104
  "aria-label": "下移条目",
105
- onClick: $(s, ["stop"])
105
+ onClick: $(l, ["stop"])
106
106
  }, {
107
107
  default: h(() => [
108
- c(l.$slots, "default", {}, () => [
109
- _(v(n.title), 1)
108
+ u(s.$slots, "default", {}, () => [
109
+ _(v(r.title), 1)
110
110
  ])
111
111
  ]),
112
112
  _: 3
@@ -116,30 +116,30 @@ import '../styles/array-base/index.css';const P = /* @__PURE__ */ o({
116
116
  name: "ArrayBaseMoveUp",
117
117
  __name: "array-base-move-up",
118
118
  props: {
119
- title: null
119
+ title: {}
120
120
  },
121
- setup(r) {
122
- const n = r, t = k(), e = p();
123
- function s() {
121
+ setup(n) {
122
+ const r = n, t = k(), e = p();
123
+ function l() {
124
124
  x(e?.keyMap) && e.keyMap.splice(
125
125
  t.value - 1,
126
126
  0,
127
127
  e.keyMap.splice(t.value, 1)[0]
128
128
  ), e?.field.value.moveUp(t.value), e?.attrs?.moveUp?.(t.value);
129
129
  }
130
- return (l, A) => a(e)?.field.value.pattern === "editable" ? (i(), m(a(y), {
130
+ return (s, A) => a(e)?.field.value.pattern === "editable" ? (i(), m(a(y), {
131
131
  key: 0,
132
- class: u(`${a(d)}-move-up`),
132
+ class: c(`${a(d)}-move-up`),
133
133
  size: "small",
134
134
  icon: a(U),
135
135
  underline: a(b)(),
136
136
  role: "button",
137
137
  "aria-label": "上移条目",
138
- onClick: $(s, ["stop"])
138
+ onClick: $(l, ["stop"])
139
139
  }, {
140
140
  default: h(() => [
141
- c(l.$slots, "default", {}, () => [
142
- _(v(n.title), 1)
141
+ u(s.$slots, "default", {}, () => [
142
+ _(v(r.title), 1)
143
143
  ])
144
144
  ]),
145
145
  _: 3
@@ -149,26 +149,26 @@ import '../styles/array-base/index.css';const P = /* @__PURE__ */ o({
149
149
  name: "ArrayBaseRemove",
150
150
  __name: "array-base-remove",
151
151
  props: {
152
- title: null
152
+ title: {}
153
153
  },
154
- setup(r) {
155
- const n = r, t = k(), e = p();
156
- function s() {
154
+ setup(n) {
155
+ const r = n, t = k(), e = p();
156
+ function l() {
157
157
  x(e?.keyMap) && e?.keyMap?.splice(t.value, 1), e?.field.value.remove(t.value), e?.attrs?.remove?.(t.value);
158
158
  }
159
- return (l, A) => a(e)?.field.value.pattern === "editable" ? (i(), m(a(y), {
159
+ return (s, A) => a(e)?.field.value.pattern === "editable" ? (i(), m(a(y), {
160
160
  key: 0,
161
- class: u(`${a(d)}-remove`),
161
+ class: c(`${a(d)}-remove`),
162
162
  size: "small",
163
163
  icon: a(V),
164
164
  underline: a(b)(),
165
165
  role: "button",
166
166
  "aria-label": "移除条目",
167
- onClick: $(s, ["stop"])
167
+ onClick: $(l, ["stop"])
168
168
  }, {
169
169
  default: h(() => [
170
- c(l.$slots, "default", {}, () => [
171
- _(v(n.title), 1)
170
+ u(s.$slots, "default", {}, () => [
171
+ _(v(r.title), 1)
172
172
  ])
173
173
  ]),
174
174
  _: 3
@@ -177,11 +177,11 @@ import '../styles/array-base/index.css';const P = /* @__PURE__ */ o({
177
177
  }), J = /* @__PURE__ */ o({
178
178
  name: "ArrayBaseSortHandle",
179
179
  __name: "array-base-sort-handle",
180
- setup(r) {
181
- const n = p();
182
- return (t, e) => a(n).field.value?.pattern === "editable" ? (i(), m(a(y), {
180
+ setup(n) {
181
+ const r = p();
182
+ return (t, e) => a(r).field.value?.pattern === "editable" ? (i(), m(a(y), {
183
183
  key: 0,
184
- class: u(`${a(d)}-sort-handle`),
184
+ class: c(`${a(d)}-sort-handle`),
185
185
  size: "small",
186
186
  icon: a(z),
187
187
  underline: a(b)(),
@@ -190,7 +190,7 @@ import '../styles/array-base/index.css';const P = /* @__PURE__ */ o({
190
190
  "aria-dropeffect": "move"
191
191
  }, null, 8, ["class", "icon", "underline"])) : f("", !0);
192
192
  }
193
- }), le = I(L, {
193
+ }), se = I(L, {
194
194
  Index: K,
195
195
  Item: T,
196
196
  SortHandle: J,
@@ -204,6 +204,6 @@ import '../styles/array-base/index.css';const P = /* @__PURE__ */ o({
204
204
  useRecord: E
205
205
  });
206
206
  export {
207
- le as ArrayBase
207
+ se as ArrayBase
208
208
  };
209
209
  //# sourceMappingURL=index.mjs.map