@fangzhongya/fang-ui 0.1.25 → 0.1.27

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 (229) hide show
  1. package/dist/components/array/index.css +5 -0
  2. package/dist/components/array/src/index2.cjs +0 -1
  3. package/dist/components/array/src/index2.js +0 -1
  4. package/dist/components/audios/index.css +5 -0
  5. package/dist/components/box/index.css +29 -0
  6. package/dist/components/box-adjust/index.css +29 -1
  7. package/dist/components/box-adjust/index.scss +0 -6
  8. package/dist/components/box-adjust/src/index2.cjs +6 -6
  9. package/dist/components/box-adjust/src/index2.js +3 -3
  10. package/dist/components/box-fun/index.cjs +7 -0
  11. package/dist/components/box-fun/index.d.ts +7 -0
  12. package/dist/components/box-fun/index.js +7 -0
  13. package/dist/components/box-fun/src/data.cjs +34 -0
  14. package/dist/components/box-fun/src/data.d.ts +35 -0
  15. package/dist/components/box-fun/src/data.js +34 -0
  16. package/dist/components/box-fun/src/function.cjs +97 -0
  17. package/dist/components/box-fun/src/function.d.ts +8 -0
  18. package/dist/components/box-fun/src/function.js +97 -0
  19. package/dist/components/box-fun/src/index.cjs +5 -0
  20. package/dist/components/box-fun/src/index.d.ts +2 -0
  21. package/dist/components/box-fun/src/index.js +5 -0
  22. package/dist/components/box-local/index.css +29 -0
  23. package/dist/components/box-mask/index.css +5 -0
  24. package/dist/components/box-teleport/src/index2.cjs +2 -11
  25. package/dist/components/box-teleport/src/index2.js +2 -11
  26. package/dist/components/box-title/index.css +29 -0
  27. package/dist/components/box-title/index.scss +1 -1
  28. package/dist/components/buttons/index.css +5 -0
  29. package/dist/components/cascaders/index.css +5 -0
  30. package/dist/components/checks/index.css +5 -0
  31. package/dist/components/dates/index.css +5 -0
  32. package/dist/components/dates-divide/index.css +5 -0
  33. package/dist/components/dates-picker/index.css +5 -0
  34. package/dist/components/dates2/index.css +5 -0
  35. package/dist/components/dialogs/index.css +5 -0
  36. package/dist/components/draggable/index.cjs +9 -0
  37. package/dist/components/draggable/index.d.ts +4 -0
  38. package/dist/components/draggable/index.js +9 -0
  39. package/dist/components/draggable/index.scss +5 -0
  40. package/dist/components/draggable/src/data.cjs +37 -0
  41. package/dist/components/draggable/src/data.d.ts +60 -0
  42. package/dist/components/draggable/src/data.js +37 -0
  43. package/dist/components/draggable/src/index.cjs +4 -0
  44. package/dist/components/draggable/src/index.js +4 -0
  45. package/dist/components/draggable/src/index2.cjs +101 -0
  46. package/dist/components/draggable/src/index2.js +101 -0
  47. package/dist/components/edit/index.css +5 -0
  48. package/dist/components/edit-float/index.css +5 -0
  49. package/dist/components/forms/common/config.cjs +7 -0
  50. package/dist/components/forms/common/config.d.ts +4 -0
  51. package/dist/components/forms/common/config.js +7 -0
  52. package/dist/components/forms/index.css +5 -0
  53. package/dist/components/forms/src/data.cjs +0 -5
  54. package/dist/components/forms/src/data.d.ts +0 -4
  55. package/dist/components/forms/src/data.js +1 -6
  56. package/dist/components/forms/src/setup.cjs +3 -2
  57. package/dist/components/forms/src/setup.js +2 -1
  58. package/dist/components/forms-div/index.css +5 -0
  59. package/dist/components/forms-div/src/index2.cjs +2 -2
  60. package/dist/components/forms-div/src/index2.js +1 -1
  61. package/dist/components/forms-drag/src/index2.cjs +12 -12
  62. package/dist/components/forms-drag/src/index2.js +1 -1
  63. package/dist/components/forms-item/index.css +5 -0
  64. package/dist/components/forms-item/src/index2.cjs +2 -2
  65. package/dist/components/forms-item/src/index2.js +1 -1
  66. package/dist/components/forms-item/src/label.cjs +7 -7
  67. package/dist/components/forms-item/src/label.js +1 -1
  68. package/dist/components/forms-items/src/index2.cjs +9 -9
  69. package/dist/components/forms-items/src/index2.js +1 -1
  70. package/dist/components/full-screen/index.css +5 -0
  71. package/dist/components/global-config/index.css +5 -0
  72. package/dist/components/global-config/index.d.ts +1 -1
  73. package/dist/components/global-config/src/index.d.ts +1 -1
  74. package/dist/components/history/index.css +5 -0
  75. package/dist/components/icon/index.css +5 -0
  76. package/dist/components/icon-picker/index.css +5 -0
  77. package/dist/components/iframe/index.css +5 -0
  78. package/dist/components/images/index.css +5 -0
  79. package/dist/components/index.cjs +411 -407
  80. package/dist/components/index.d.ts +2 -0
  81. package/dist/components/index.js +4 -0
  82. package/dist/components/index.scss +1 -0
  83. package/dist/components/index2.scss +1 -0
  84. package/dist/components/input-array/index.css +5 -0
  85. package/dist/components/input-history/index.css +5 -0
  86. package/dist/components/input-num/index.css +5 -0
  87. package/dist/components/input-select/index.css +5 -0
  88. package/dist/components/inputs/index.css +5 -0
  89. package/dist/components/labels/index.css +5 -0
  90. package/dist/components/list/index.css +5 -0
  91. package/dist/components/lists/index.css +5 -0
  92. package/dist/components/lists/src/index2.cjs +9 -9
  93. package/dist/components/lists/src/index2.js +9 -9
  94. package/dist/components/listsp/index.css +5 -0
  95. package/dist/components/listspd/index.css +5 -0
  96. package/dist/components/loading/src/data.cjs +13 -0
  97. package/dist/components/loading/src/data.d.ts +17 -0
  98. package/dist/components/loading/src/data.js +13 -0
  99. package/dist/components/loading/src/index.cjs +1 -0
  100. package/dist/components/loading/src/index.d.ts +0 -4
  101. package/dist/components/loading/src/index.js +1 -0
  102. package/dist/components/menus/index.css +5 -0
  103. package/dist/components/message/src/data.cjs +13 -0
  104. package/dist/components/message/src/data.d.ts +17 -0
  105. package/dist/components/message/src/data.js +13 -0
  106. package/dist/components/message/src/index.cjs +1 -0
  107. package/dist/components/message/src/index.d.ts +0 -4
  108. package/dist/components/message/src/index.js +1 -0
  109. package/dist/components/message-box/src/data.cjs +13 -0
  110. package/dist/components/message-box/src/data.d.ts +17 -0
  111. package/dist/components/message-box/src/data.js +13 -0
  112. package/dist/components/message-box/src/index.cjs +1 -0
  113. package/dist/components/message-box/src/index.d.ts +0 -4
  114. package/dist/components/message-box/src/index.js +1 -0
  115. package/dist/components/no-data/index.css +5 -0
  116. package/dist/components/page/index.css +5 -0
  117. package/dist/components/page/src/set-column2.cjs +2 -2
  118. package/dist/components/page/src/set-column2.js +1 -1
  119. package/dist/components/paging/index.css +5 -0
  120. package/dist/components/popup/index.css +29 -0
  121. package/dist/components/retract/index.css +5 -0
  122. package/dist/components/right-key/index.css +5 -0
  123. package/dist/components/scss/common.scss +5 -0
  124. package/dist/components/seamless-scroll/index.css +5 -0
  125. package/dist/components/select-scroll/index.css +5 -0
  126. package/dist/components/selector/index.css +5 -0
  127. package/dist/components/selects/index.css +5 -0
  128. package/dist/components/sliders/index.css +5 -0
  129. package/dist/components/switchs/index.css +5 -0
  130. package/dist/components/tables/common/pagin.cjs +49 -20
  131. package/dist/components/tables/common/pagin.d.ts +32 -8
  132. package/dist/components/tables/common/pagin.js +49 -20
  133. package/dist/components/tables/index.css +5 -0
  134. package/dist/components/tables/src/column.cjs +1 -2
  135. package/dist/components/tables/src/column.js +1 -2
  136. package/dist/components/tables/src/data.d.ts +1 -1
  137. package/dist/components/tables/src/index2.cjs +12 -1
  138. package/dist/components/tables/src/index2.js +12 -1
  139. package/dist/components/tablesp/index.css +5 -0
  140. package/dist/components/tablesp/src/index2.cjs +9 -5
  141. package/dist/components/tablesp/src/index2.js +9 -5
  142. package/dist/components/tablespd/index.css +5 -0
  143. package/dist/components/tabless/index.css +5 -0
  144. package/dist/components/tablesv/index.css +5 -0
  145. package/dist/components/tablesvp/index.css +5 -0
  146. package/dist/components/uploads/index.css +5 -0
  147. package/dist/components/videos/index.css +5 -0
  148. package/dist/components/window/index.css +29 -0
  149. package/dist/css/array.css +5 -0
  150. package/dist/css/audios.css +5 -0
  151. package/dist/css/box-adjust.css +29 -1
  152. package/dist/css/box-local.css +29 -0
  153. package/dist/css/box-mask.css +5 -0
  154. package/dist/css/box-title.css +29 -0
  155. package/dist/css/box.css +29 -0
  156. package/dist/css/buttons.css +5 -0
  157. package/dist/css/cascaders.css +5 -0
  158. package/dist/css/checks.css +5 -0
  159. package/dist/css/dates-divide.css +5 -0
  160. package/dist/css/dates-picker.css +5 -0
  161. package/dist/css/dates.css +5 -0
  162. package/dist/css/dates2.css +5 -0
  163. package/dist/css/dialogs.css +5 -0
  164. package/dist/css/edit-float.css +5 -0
  165. package/dist/css/edit.css +5 -0
  166. package/dist/css/forms-div.css +5 -0
  167. package/dist/css/forms-item.css +5 -0
  168. package/dist/css/forms.css +5 -0
  169. package/dist/css/full-screen.css +5 -0
  170. package/dist/css/global-config.css +5 -0
  171. package/dist/css/history.css +5 -0
  172. package/dist/css/icon-picker.css +5 -0
  173. package/dist/css/icon.css +5 -0
  174. package/dist/css/iframe.css +5 -0
  175. package/dist/css/images.css +5 -0
  176. package/dist/css/index.css +29 -25
  177. package/dist/css/input-array.css +5 -0
  178. package/dist/css/input-history.css +5 -0
  179. package/dist/css/input-num.css +5 -0
  180. package/dist/css/input-select.css +5 -0
  181. package/dist/css/inputs.css +5 -0
  182. package/dist/css/labels.css +5 -0
  183. package/dist/css/list.css +5 -0
  184. package/dist/css/lists.css +5 -0
  185. package/dist/css/listsp.css +5 -0
  186. package/dist/css/listspd.css +5 -0
  187. package/dist/css/menus.css +5 -0
  188. package/dist/css/no-data.css +5 -0
  189. package/dist/css/page.css +5 -0
  190. package/dist/css/paging.css +5 -0
  191. package/dist/css/popup.css +29 -0
  192. package/dist/css/retract.css +5 -0
  193. package/dist/css/right-key.css +5 -0
  194. package/dist/css/seamless-scroll.css +5 -0
  195. package/dist/css/select-scroll.css +5 -0
  196. package/dist/css/selector.css +5 -0
  197. package/dist/css/selects.css +5 -0
  198. package/dist/css/sliders.css +5 -0
  199. package/dist/css/switchs.css +5 -0
  200. package/dist/css/tables.css +5 -0
  201. package/dist/css/tablesp.css +5 -0
  202. package/dist/css/tablespd.css +5 -0
  203. package/dist/css/tabless.css +5 -0
  204. package/dist/css/tablesv.css +5 -0
  205. package/dist/css/tablesvp.css +5 -0
  206. package/dist/css/uploads.css +5 -0
  207. package/dist/css/videos.css +5 -0
  208. package/dist/css/window.css +29 -0
  209. package/dist/expand/{chunk-RBGCE6BS.js → chunk-CV4O5V2F.js} +3 -0
  210. package/dist/expand/{chunk-2L4PC7LZ.cjs → chunk-MC76Q3TQ.cjs} +3 -0
  211. package/dist/expand/components.cjs +5 -5
  212. package/dist/expand/components.js +1 -1
  213. package/dist/expand/config.cjs +2 -2
  214. package/dist/expand/config.js +1 -1
  215. package/dist/hooks/props-default/index.cjs +0 -12
  216. package/dist/hooks/props-default/index.d.ts +1 -1
  217. package/dist/hooks/props-default/index.js +0 -12
  218. package/dist/icons/index.json +1 -1
  219. package/dist/index.cjs +435 -431
  220. package/dist/index.css +29 -25
  221. package/dist/index.js +4 -0
  222. package/dist/type.d.ts +10 -5
  223. package/dist/utils/vues/getBoxDom.cjs +22 -0
  224. package/dist/utils/vues/getBoxDom.d.ts +1 -0
  225. package/dist/utils/vues/getBoxDom.js +22 -0
  226. package/dist/utils/vues/index.cjs +2 -0
  227. package/dist/utils/vues/index.d.ts +1 -0
  228. package/dist/utils/vues/index.js +2 -0
  229. package/package.json +11 -12
@@ -2,7 +2,7 @@ import { defineComponent, createBlock, openBlock, Teleport, unref, normalizeClas
2
2
  import { name, dataProps, dataExpose, dataEmits } from "./data.js";
3
3
  import { useCssName } from "../../../hooks/cssname/index.js";
4
4
  import { useLocale } from "../../../hooks/locale/index.js";
5
- import { FunctConfig } from "../../../utils/enums.js";
5
+ import { getBoxDom } from "../../../utils/vues/getBoxDom.js";
6
6
  import { usePropsDefault, viewProps, getProps } from "../../../hooks/props-default/index.js";
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "index",
@@ -15,16 +15,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
15
  const props = usePropsDefault(name, prs, dataProps);
16
16
  viewProps(props, name);
17
17
  const emit = __emit;
18
- const id = FunctConfig.BOXIDNAME.trim();
19
- if (document && !(document == null ? void 0 : document.querySelector(id))) {
20
- const d = document.createElement("div");
21
- if (id.startsWith("#")) {
22
- d.id = id.replace(/^#/, "");
23
- } else if (id.startsWith(".")) {
24
- d.className = id.replace(/./g, " ");
25
- }
26
- document.body.appendChild(d);
27
- }
18
+ getBoxDom();
28
19
  __expose({
29
20
  ...dataExpose
30
21
  });
@@ -12,6 +12,35 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
20
+ .icon {
21
+ --color: inherit;
22
+ height: 1em;
23
+ width: 1em;
24
+ line-height: 1em;
25
+ display: inline-flex;
26
+ justify-content: center;
27
+ align-items: center;
28
+ position: relative;
29
+ fill: currentColor;
30
+ color: var(--color);
31
+ font-size: inherit;
32
+ }
33
+ .icon-cont {
34
+ border: 0;
35
+ display: inline-flex;
36
+ align-items: center;
37
+ object-fit: contain;
38
+ justify-content: center;
39
+ font-size: inherit !important;
40
+ width: inherit !important;
41
+ height: inherit !important;
42
+ }
43
+
15
44
  .box-title {
16
45
  padding: 10px;
17
46
  position: relative;
@@ -1,6 +1,6 @@
1
1
  // @use '../common.scss' as *;
2
2
  @use '../scss/common.scss' as *;
3
-
3
+ @use '../icon/index.scss' as *;
4
4
  $box-title: 'box-title';
5
5
  @include b($box-title) {
6
6
  padding: 10px;
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .buttons-li {
16
21
  height: inherit;
17
22
  }
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .cascaders-cascader {
16
21
  height: 100%;
17
22
  width: 100%;
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .checks-check {
16
21
  height: 100%;
17
22
  display: flex;
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .dates .dates-date {
16
21
  height: 100%;
17
22
  width: 100%;
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .dates-divide {
16
21
  display: inline-flex;
17
22
  align-items: center;
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .dates2 .dates2-date {
16
21
  height: 100%;
17
22
  width: 100%;
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .dates-divide {
16
21
  display: inline-flex;
17
22
  align-items: center;
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .dialogs.el-dialog {
16
21
  padding: 0;
17
22
  }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ ;/* empty css */
4
+ require("./src/index.cjs");
5
+ const withInstall = require("../../utils/vues/withInstall.cjs");
6
+ const index_vue_vue_type_script_setup_true_lang = require("./src/index2.cjs");
7
+ const Draggable = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "Draggable");
8
+ exports.Draggable = Draggable;
9
+ exports.default = Draggable;
@@ -0,0 +1,4 @@
1
+ import { SFCWithInstall } from '../../utils/vues';
2
+ import { DefineComponent } from 'vue';
3
+ declare const Draggable: SFCWithInstall<DefineComponent<{}, {}, any>>;
4
+ export { Draggable, Draggable as default };
@@ -0,0 +1,9 @@
1
+ /* empty css */
2
+ import "./src/index.js";
3
+ import { withInstall } from "../../utils/vues/withInstall.js";
4
+ import _sfc_main from "./src/index2.js";
5
+ const Draggable = withInstall(_sfc_main, "Draggable");
6
+ export {
7
+ Draggable,
8
+ Draggable as default
9
+ };
@@ -0,0 +1,5 @@
1
+ @use '../scss/common.scss' as *;
2
+
3
+ $draggable: 'draggable';
4
+ @include b($draggable) {
5
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const buildProps = require("../../../utils/vues/buildProps.cjs");
4
+ const name = "draggable";
5
+ const dataProps = buildProps.buildProps({
6
+ modelValue: {
7
+ type: Array,
8
+ default() {
9
+ return [];
10
+ }
11
+ },
12
+ /**
13
+ * @props { String } handle= ( )
14
+ * 拖拽的地方
15
+ */
16
+ handle: {
17
+ type: String
18
+ },
19
+ itemKey: {
20
+ type: [String, Function]
21
+ }
22
+ });
23
+ const dataEmits = ["update:modelValue", "start", "end"];
24
+ const dataSlot = {
25
+ default: "default",
26
+ item: "item",
27
+ footer: "footer",
28
+ header: "header"
29
+ };
30
+ const dataExpose = {
31
+ name
32
+ };
33
+ exports.dataEmits = dataEmits;
34
+ exports.dataExpose = dataExpose;
35
+ exports.dataProps = dataProps;
36
+ exports.dataSlot = dataSlot;
37
+ exports.name = name;
@@ -0,0 +1,60 @@
1
+ import { ExtractPublicPropTypes } from 'vue';
2
+ /**
3
+ * @title {h3} Draggable
4
+ * @text draggable
5
+ */
6
+ export declare const name = "draggable";
7
+ export declare const dataProps: {
8
+ modelValue: {
9
+ type: {
10
+ (arrayLength: number): ObjAny[];
11
+ (...items: ObjAny[]): ObjAny[];
12
+ new (arrayLength: number): ObjAny[];
13
+ new (...items: ObjAny[]): ObjAny[];
14
+ isArray(arg: any): arg is any[];
15
+ readonly prototype: any[];
16
+ from<T>(arrayLike: ArrayLike<T>): T[];
17
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
18
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
19
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
20
+ of<T>(...items: T[]): T[];
21
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
22
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
23
+ readonly [Symbol.species]: ArrayConstructor;
24
+ };
25
+ default(): never[];
26
+ };
27
+ /**
28
+ * @props { String } handle= ( )
29
+ * 拖拽的地方
30
+ */
31
+ handle: {
32
+ type: StringConstructor;
33
+ };
34
+ itemKey: {
35
+ type: (StringConstructor | FunctionConstructor)[];
36
+ };
37
+ };
38
+ export type DataProps = ExtractPublicPropTypes<typeof dataProps>;
39
+ /**
40
+ * @emits change (val:[String, Array])
41
+ * 选择的时间
42
+ */
43
+ export declare const dataEmits: string[];
44
+ export type DataEmits = typeof dataEmits;
45
+ /**
46
+ * @slot default 默认插槽
47
+ */
48
+ export declare const dataSlot: {
49
+ default: string;
50
+ item: string;
51
+ footer: string;
52
+ header: string;
53
+ };
54
+ /**
55
+ * @expose setValue (val:<string>设置的数据 )
56
+ * 设置值
57
+ */
58
+ export declare const dataExpose: {
59
+ name: string;
60
+ };
@@ -0,0 +1,37 @@
1
+ import { buildProps } from "../../../utils/vues/buildProps.js";
2
+ const name = "draggable";
3
+ const dataProps = buildProps({
4
+ modelValue: {
5
+ type: Array,
6
+ default() {
7
+ return [];
8
+ }
9
+ },
10
+ /**
11
+ * @props { String } handle= ( )
12
+ * 拖拽的地方
13
+ */
14
+ handle: {
15
+ type: String
16
+ },
17
+ itemKey: {
18
+ type: [String, Function]
19
+ }
20
+ });
21
+ const dataEmits = ["update:modelValue", "start", "end"];
22
+ const dataSlot = {
23
+ default: "default",
24
+ item: "item",
25
+ footer: "footer",
26
+ header: "header"
27
+ };
28
+ const dataExpose = {
29
+ name
30
+ };
31
+ export {
32
+ dataEmits,
33
+ dataExpose,
34
+ dataProps,
35
+ dataSlot,
36
+ name
37
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const index_vue_vue_type_script_setup_true_lang = require("./index2.cjs");
4
+ exports.default = index_vue_vue_type_script_setup_true_lang.default;
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./index2.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const data = require("./data.cjs");
5
+ const index = require("../../../hooks/cssname/index.cjs");
6
+ const index$1 = require("../../../hooks/locale/index.cjs");
7
+ const index$3 = require("../../../directives/sortable/index.cjs");
8
+ const index$2 = require("../../../hooks/props-default/index.cjs");
9
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
+ __name: "index",
11
+ props: index$2.getProps(data.dataProps),
12
+ emits: data.dataEmits,
13
+ setup(__props, { expose: __expose, emit: __emit }) {
14
+ const cs = index.useCssName(data.name);
15
+ const { getLocale } = index$1.useLocale();
16
+ const prs = __props;
17
+ const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
18
+ index$2.viewProps(props, data.name);
19
+ const emit = __emit;
20
+ function safeStringify(obj, space = 2) {
21
+ const seen = /* @__PURE__ */ new WeakSet();
22
+ return JSON.stringify(
23
+ obj,
24
+ (key, value2) => {
25
+ if (typeof value2 === "object" && value2 !== null) {
26
+ if (seen.has(value2)) {
27
+ return "[Circular]";
28
+ }
29
+ seen.add(value2);
30
+ }
31
+ return value2;
32
+ },
33
+ space
34
+ );
35
+ }
36
+ const getKey = (item, index2) => {
37
+ if (props.itemKey) {
38
+ if (typeof props.itemKey == "string") {
39
+ return item[props.itemKey] ?? index2;
40
+ } else {
41
+ const v = props.itemKey(item, index2) ?? index2;
42
+ if (typeof v === "object") {
43
+ return safeStringify(v);
44
+ } else {
45
+ return v;
46
+ }
47
+ }
48
+ }
49
+ return index2;
50
+ };
51
+ const onEnd = (obj) => {
52
+ const { oldIndex, newIndex } = obj;
53
+ if (oldIndex === newIndex) return;
54
+ const movedItem = value.value.splice(oldIndex, 1)[0];
55
+ value.value.splice(newIndex, 0, movedItem);
56
+ emit("update:modelValue", value.value);
57
+ emit("end", obj);
58
+ };
59
+ const onStart = (obj) => {
60
+ emit("start", obj);
61
+ };
62
+ const sortable = vue.computed(() => {
63
+ return {
64
+ handle: props.handle,
65
+ onStart,
66
+ onEnd
67
+ };
68
+ });
69
+ const value = vue.computed({
70
+ get() {
71
+ return props.modelValue;
72
+ },
73
+ set(value2) {
74
+ emit("update:modelValue", value2);
75
+ }
76
+ });
77
+ __expose({
78
+ ...data.dataExpose
79
+ });
80
+ return (_ctx, _cache) => {
81
+ return vue.openBlock(), vue.createElementBlock("div", {
82
+ class: vue.normalizeClass(vue.unref(cs).z())
83
+ }, [
84
+ vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).header),
85
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", null, [
86
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(value.value, (item, index2) => {
87
+ return vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).item, {
88
+ key: getKey(item, index2),
89
+ element: item,
90
+ index: index2
91
+ });
92
+ }), 128))
93
+ ])), [
94
+ [vue.unref(index$3.default), sortable.value]
95
+ ]),
96
+ vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).footer)
97
+ ], 2);
98
+ };
99
+ }
100
+ });
101
+ exports.default = _sfc_main;
@@ -0,0 +1,101 @@
1
+ import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, renderSlot, withDirectives, Fragment, renderList } from "vue";
2
+ import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
3
+ import { useCssName } from "../../../hooks/cssname/index.js";
4
+ import { useLocale } from "../../../hooks/locale/index.js";
5
+ import vSortable from "../../../directives/sortable/index.js";
6
+ import { usePropsDefault, viewProps, getProps } from "../../../hooks/props-default/index.js";
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "index",
9
+ props: getProps(dataProps),
10
+ emits: dataEmits,
11
+ setup(__props, { expose: __expose, emit: __emit }) {
12
+ const cs = useCssName(name);
13
+ const { getLocale } = useLocale();
14
+ const prs = __props;
15
+ const props = usePropsDefault(name, prs, dataProps);
16
+ viewProps(props, name);
17
+ const emit = __emit;
18
+ function safeStringify(obj, space = 2) {
19
+ const seen = /* @__PURE__ */ new WeakSet();
20
+ return JSON.stringify(
21
+ obj,
22
+ (key, value2) => {
23
+ if (typeof value2 === "object" && value2 !== null) {
24
+ if (seen.has(value2)) {
25
+ return "[Circular]";
26
+ }
27
+ seen.add(value2);
28
+ }
29
+ return value2;
30
+ },
31
+ space
32
+ );
33
+ }
34
+ const getKey = (item, index) => {
35
+ if (props.itemKey) {
36
+ if (typeof props.itemKey == "string") {
37
+ return item[props.itemKey] ?? index;
38
+ } else {
39
+ const v = props.itemKey(item, index) ?? index;
40
+ if (typeof v === "object") {
41
+ return safeStringify(v);
42
+ } else {
43
+ return v;
44
+ }
45
+ }
46
+ }
47
+ return index;
48
+ };
49
+ const onEnd = (obj) => {
50
+ const { oldIndex, newIndex } = obj;
51
+ if (oldIndex === newIndex) return;
52
+ const movedItem = value.value.splice(oldIndex, 1)[0];
53
+ value.value.splice(newIndex, 0, movedItem);
54
+ emit("update:modelValue", value.value);
55
+ emit("end", obj);
56
+ };
57
+ const onStart = (obj) => {
58
+ emit("start", obj);
59
+ };
60
+ const sortable = computed(() => {
61
+ return {
62
+ handle: props.handle,
63
+ onStart,
64
+ onEnd
65
+ };
66
+ });
67
+ const value = computed({
68
+ get() {
69
+ return props.modelValue;
70
+ },
71
+ set(value2) {
72
+ emit("update:modelValue", value2);
73
+ }
74
+ });
75
+ __expose({
76
+ ...dataExpose
77
+ });
78
+ return (_ctx, _cache) => {
79
+ return openBlock(), createElementBlock("div", {
80
+ class: normalizeClass(unref(cs).z())
81
+ }, [
82
+ renderSlot(_ctx.$slots, unref(dataSlot).header),
83
+ withDirectives((openBlock(), createElementBlock("div", null, [
84
+ (openBlock(true), createElementBlock(Fragment, null, renderList(value.value, (item, index) => {
85
+ return renderSlot(_ctx.$slots, unref(dataSlot).item, {
86
+ key: getKey(item, index),
87
+ element: item,
88
+ index
89
+ });
90
+ }), 128))
91
+ ])), [
92
+ [unref(vSortable), sortable.value]
93
+ ]),
94
+ renderSlot(_ctx.$slots, unref(dataSlot).footer)
95
+ ], 2);
96
+ };
97
+ }
98
+ });
99
+ export {
100
+ _sfc_main as default
101
+ };
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .edit {
16
21
  display: inline-flex;
17
22
  align-items: center;
@@ -12,6 +12,11 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
15
20
  .edit-float-body {
16
21
  display: inline-flex;
17
22
  align-items: center;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const provides = {
4
+ compons: "form-compons",
5
+ form: "form-form"
6
+ };
7
+ exports.provides = provides;
@@ -0,0 +1,4 @@
1
+ export declare const provides: {
2
+ compons: string;
3
+ form: string;
4
+ };
@@ -0,0 +1,7 @@
1
+ const provides = {
2
+ compons: "form-compons",
3
+ form: "form-form"
4
+ };
5
+ export {
6
+ provides
7
+ };
@@ -13,6 +13,11 @@
13
13
  --g-main-bg: var(--bg-color-page);
14
14
  }
15
15
 
16
+ .com-footer {
17
+ border-top: 1px solid var(--border);
18
+ padding: 20px 20px;
19
+ }
20
+
16
21
  .forms-div {
17
22
  width: 100%;
18
23
  height: 100%;
@@ -2,10 +2,6 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const urls = require("../../common/urls.cjs");
4
4
  const name = "forms";
5
- const provides = {
6
- compons: "form-compons",
7
- form: "form-form"
8
- };
9
5
  const dataProps = {
10
6
  ...urls.props,
11
7
  /**
@@ -231,4 +227,3 @@ exports.dataHandle = dataHandle;
231
227
  exports.dataProps = dataProps;
232
228
  exports.dataSlot = dataSlot;
233
229
  exports.name = name;
234
- exports.provides = provides;
@@ -4,10 +4,6 @@ import { comHandle } from '../../common/urls';
4
4
  * @title {h3} forms
5
5
  */
6
6
  export declare const name = "forms";
7
- export declare const provides: {
8
- compons: string;
9
- form: string;
10
- };
11
7
  /**
12
8
  * 组件属性
13
9
  */
@@ -1,9 +1,5 @@
1
1
  import { props, comHandle } from "../../common/urls.js";
2
2
  const name = "forms";
3
- const provides = {
4
- compons: "form-compons",
5
- form: "form-form"
6
- };
7
3
  const dataProps = {
8
4
  ...props,
9
5
  /**
@@ -229,6 +225,5 @@ export {
229
225
  dataHandle,
230
226
  dataProps,
231
227
  dataSlot,
232
- name,
233
- provides
228
+ name
234
229
  };