@fangzhongya/fang-ui 0.1.26 → 0.1.28

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 (281) hide show
  1. package/dist/components/array/index.css +9 -0
  2. package/dist/components/array/src/index2.cjs +5 -6
  3. package/dist/components/array/src/index2.js +2 -3
  4. package/dist/components/audios/index.css +9 -0
  5. package/dist/components/box/index.css +9 -0
  6. package/dist/components/box-adjust/index.css +9 -0
  7. package/dist/components/box-fun/index.cjs +7 -0
  8. package/dist/components/box-fun/index.d.ts +7 -0
  9. package/dist/components/box-fun/index.js +7 -0
  10. package/dist/components/box-fun/src/data.cjs +34 -0
  11. package/dist/components/box-fun/src/data.d.ts +35 -0
  12. package/dist/components/box-fun/src/data.js +34 -0
  13. package/dist/components/box-fun/src/function.cjs +97 -0
  14. package/dist/components/box-fun/src/function.d.ts +8 -0
  15. package/dist/components/box-fun/src/function.js +97 -0
  16. package/dist/components/box-fun/src/index.cjs +5 -0
  17. package/dist/components/box-fun/src/index.d.ts +2 -0
  18. package/dist/components/box-fun/src/index.js +5 -0
  19. package/dist/components/box-local/index.css +9 -0
  20. package/dist/components/box-mask/index.css +9 -0
  21. package/dist/components/box-teleport/src/index2.cjs +2 -11
  22. package/dist/components/box-teleport/src/index2.js +2 -11
  23. package/dist/components/box-title/index.css +9 -0
  24. package/dist/components/buttons/index.css +9 -0
  25. package/dist/components/cascaders/index.css +9 -0
  26. package/dist/components/checks/index.css +9 -0
  27. package/dist/components/common/compons/components.cjs +52 -0
  28. package/dist/components/common/compons/components.d.ts +27 -0
  29. package/dist/components/common/compons/components.js +52 -0
  30. package/dist/components/common/compons/index.scss +23 -0
  31. package/dist/components/common/compons/index2.scss +23 -0
  32. package/dist/components/common/use.cjs +29 -3
  33. package/dist/components/common/use.d.ts +2 -2
  34. package/dist/components/common/use.js +29 -3
  35. package/dist/components/dates/index.css +9 -0
  36. package/dist/components/dates-divide/index.css +9 -0
  37. package/dist/components/dates-picker/index.css +9 -0
  38. package/dist/components/dates2/index.css +9 -0
  39. package/dist/components/dialogs/index.css +9 -0
  40. package/dist/components/draggable/index.cjs +9 -0
  41. package/dist/components/draggable/index.d.ts +4 -0
  42. package/dist/components/draggable/index.js +9 -0
  43. package/dist/components/draggable/index.scss +5 -0
  44. package/dist/components/draggable/src/data.cjs +37 -0
  45. package/dist/components/draggable/src/data.d.ts +60 -0
  46. package/dist/components/draggable/src/data.js +37 -0
  47. package/dist/components/draggable/src/index.cjs +4 -0
  48. package/dist/components/draggable/src/index.js +4 -0
  49. package/dist/components/draggable/src/index2.cjs +101 -0
  50. package/dist/components/draggable/src/index2.js +101 -0
  51. package/dist/components/edit/index.css +9 -0
  52. package/dist/components/edit-float/index.css +9 -0
  53. package/dist/components/forms/common/config.cjs +17 -0
  54. package/dist/components/forms/common/config.d.ts +5 -0
  55. package/dist/components/forms/common/config.js +17 -0
  56. package/dist/components/forms/index.css +15 -6
  57. package/dist/components/forms/index.scss +2 -1
  58. package/dist/components/forms/src/data.cjs +7 -5
  59. package/dist/components/forms/src/data.d.ts +7 -4
  60. package/dist/components/forms/src/data.js +8 -6
  61. package/dist/components/forms/src/setup.cjs +5 -13
  62. package/dist/components/forms/src/setup.d.ts +1 -1
  63. package/dist/components/forms/src/setup.js +5 -13
  64. package/dist/components/forms/style/index2.scss +3 -1
  65. package/dist/components/forms-div/index.css +9 -0
  66. package/dist/components/forms-div/src/index2.cjs +5 -5
  67. package/dist/components/forms-div/src/index2.js +3 -3
  68. package/dist/components/forms-drag/src/index2.cjs +12 -12
  69. package/dist/components/forms-drag/src/index2.js +1 -1
  70. package/dist/components/{forms-items → forms-item}/index.css +9 -0
  71. package/dist/components/forms-item/src/index2.cjs +2 -2
  72. package/dist/components/forms-item/src/index2.js +1 -1
  73. package/dist/components/forms-item/src/indexts.d.ts +1 -1
  74. package/dist/components/forms-item/src/label.cjs +17 -30
  75. package/dist/components/forms-item/src/label.js +17 -30
  76. package/dist/components/forms-items/src/index2.cjs +9 -9
  77. package/dist/components/forms-items/src/index2.js +1 -1
  78. package/dist/components/full-screen/index.css +9 -0
  79. package/dist/components/global-config/index.d.ts +1 -1
  80. package/dist/components/global-config/src/index.d.ts +1 -1
  81. package/dist/components/history/index.css +9 -0
  82. package/dist/components/icon/index.css +9 -0
  83. package/dist/components/icon-picker/index.css +9 -0
  84. package/dist/components/iframe/index.css +9 -0
  85. package/dist/components/images/index.css +9 -0
  86. package/dist/components/index.cjs +413 -407
  87. package/dist/components/index.d.ts +3 -0
  88. package/dist/components/index.js +6 -0
  89. package/dist/components/index.scss +4 -1
  90. package/dist/components/index2.scss +4 -1
  91. package/dist/components/input-array/index.css +9 -0
  92. package/dist/components/input-history/index.css +9 -0
  93. package/dist/components/input-num/index.css +9 -0
  94. package/dist/components/input-select/index.css +9 -0
  95. package/dist/components/inputs/index.css +9 -0
  96. package/dist/components/keep-com/index.css +9 -0
  97. package/dist/components/labels/index.css +9 -0
  98. package/dist/components/list/index.css +9 -0
  99. package/dist/components/list/src/data.cjs +6 -0
  100. package/dist/components/list/src/data.d.ts +6 -0
  101. package/dist/components/list/src/data.js +6 -0
  102. package/dist/components/list/src/index2.cjs +6 -6
  103. package/dist/components/list/src/index2.js +2 -2
  104. package/dist/components/lists/index.css +9 -0
  105. package/dist/components/lists/src/index2.cjs +9 -9
  106. package/dist/components/lists/src/index2.js +9 -9
  107. package/dist/components/listsp/index.css +9 -0
  108. package/dist/components/listspd/index.css +9 -0
  109. package/dist/components/loading/src/data.cjs +13 -0
  110. package/dist/components/loading/src/data.d.ts +17 -0
  111. package/dist/components/loading/src/data.js +13 -0
  112. package/dist/components/loading/src/index.cjs +1 -0
  113. package/dist/components/loading/src/index.d.ts +0 -4
  114. package/dist/components/loading/src/index.js +1 -0
  115. package/dist/components/menus/index.css +9 -0
  116. package/dist/components/message/src/data.cjs +13 -0
  117. package/dist/components/message/src/data.d.ts +17 -0
  118. package/dist/components/message/src/data.js +13 -0
  119. package/dist/components/message/src/index.cjs +1 -0
  120. package/dist/components/message/src/index.d.ts +0 -4
  121. package/dist/components/message/src/index.js +1 -0
  122. package/dist/components/message-box/src/data.cjs +13 -0
  123. package/dist/components/message-box/src/data.d.ts +17 -0
  124. package/dist/components/message-box/src/data.js +13 -0
  125. package/dist/components/message-box/src/index.cjs +1 -0
  126. package/dist/components/message-box/src/index.d.ts +0 -4
  127. package/dist/components/message-box/src/index.js +1 -0
  128. package/dist/components/no-data/index.css +9 -0
  129. package/dist/components/page/index.css +15 -6
  130. package/dist/components/page/src/set-column2.cjs +2 -2
  131. package/dist/components/page/src/set-column2.js +1 -1
  132. package/dist/components/paging/index.css +9 -0
  133. package/dist/components/popup/index.css +9 -0
  134. package/dist/components/retract/index.css +9 -0
  135. package/dist/components/right-key/index.css +9 -0
  136. package/dist/components/scss/common.scss +9 -0
  137. package/dist/components/seamless-scroll/index.css +9 -0
  138. package/dist/components/select-scroll/index.css +9 -0
  139. package/dist/components/selector/index.css +9 -0
  140. package/dist/components/selects/index.css +9 -0
  141. package/dist/components/sliders/index.css +9 -0
  142. package/dist/components/switchs/index.css +9 -0
  143. package/dist/components/tables/common/config.cjs +1 -1
  144. package/dist/components/tables/common/config.js +1 -1
  145. package/dist/components/tables/common/pagin.cjs +123 -52
  146. package/dist/components/tables/common/pagin.d.ts +40 -9
  147. package/dist/components/tables/common/pagin.js +123 -52
  148. package/dist/components/tables/index.css +9 -0
  149. package/dist/components/tables/src/column.cjs +23 -22
  150. package/dist/components/tables/src/column.d.ts +3 -0
  151. package/dist/components/tables/src/column.js +15 -14
  152. package/dist/components/tables/src/data.cjs +15 -0
  153. package/dist/components/tables/src/data.d.ts +14 -1
  154. package/dist/components/tables/src/data.js +15 -0
  155. package/dist/components/tables/src/index2.cjs +29 -10
  156. package/dist/components/tables/src/index2.js +23 -4
  157. package/dist/components/tablesp/index.css +9 -0
  158. package/dist/components/tablesp/src/index2.cjs +9 -5
  159. package/dist/components/tablesp/src/index2.js +9 -5
  160. package/dist/components/tablespd/index.css +9 -0
  161. package/dist/components/tabless/index.css +9 -0
  162. package/dist/components/tablesv/index.css +9 -0
  163. package/dist/components/tablesv/src/column.cjs +116 -112
  164. package/dist/components/tablesv/src/column.d.ts +3 -1
  165. package/dist/components/tablesv/src/column.js +110 -106
  166. package/dist/components/tablesv/src/data.cjs +44 -0
  167. package/dist/components/tablesv/src/data.d.ts +43 -1
  168. package/dist/components/tablesv/src/data.js +44 -0
  169. package/dist/components/tablesv/src/index2.cjs +37 -14
  170. package/dist/components/tablesv/src/index2.js +36 -13
  171. package/dist/components/tablesv/style/index2.scss +3 -1
  172. package/dist/components/tablesvp/index.css +15 -0
  173. package/dist/components/tablesvp/index.scss +8 -0
  174. package/dist/components/tablesvp/src/index2.cjs +15 -5
  175. package/dist/components/tablesvp/src/index2.js +15 -5
  176. package/dist/components/tablesvpd/index.cjs +9 -0
  177. package/dist/components/tablesvpd/index.css +157 -0
  178. package/dist/components/tablesvpd/index.d.ts +4 -0
  179. package/dist/components/tablesvpd/index.js +9 -0
  180. package/dist/components/tablesvpd/index.scss +41 -0
  181. package/dist/components/tablesvpd/src/data.cjs +13 -0
  182. package/dist/components/tablesvpd/src/data.d.ts +18 -0
  183. package/dist/components/tablesvpd/src/data.js +13 -0
  184. package/dist/components/tablesvpd/src/index.cjs +4 -0
  185. package/dist/components/tablesvpd/src/index.js +4 -0
  186. package/dist/components/tablesvpd/src/index2.cjs +107 -0
  187. package/dist/components/tablesvpd/src/index2.js +107 -0
  188. package/dist/components/tablesvpd/style/index2.scss +4 -0
  189. package/dist/components/uploads/index.css +9 -0
  190. package/dist/components/videos/index.css +9 -0
  191. package/dist/components/window/index.css +9 -0
  192. package/dist/css/array.css +9 -0
  193. package/dist/css/audios.css +9 -0
  194. package/dist/css/box-adjust.css +9 -0
  195. package/dist/css/box-local.css +9 -0
  196. package/dist/css/box-mask.css +9 -0
  197. package/dist/css/box-title.css +9 -0
  198. package/dist/css/box.css +9 -0
  199. package/dist/css/buttons.css +9 -0
  200. package/dist/css/cascaders.css +9 -0
  201. package/dist/css/checks.css +9 -0
  202. package/dist/css/dates-divide.css +9 -0
  203. package/dist/css/dates-picker.css +9 -0
  204. package/dist/css/dates.css +9 -0
  205. package/dist/css/dates2.css +9 -0
  206. package/dist/css/dialogs.css +9 -0
  207. package/dist/css/edit-float.css +9 -0
  208. package/dist/css/edit.css +9 -0
  209. package/dist/css/forms-div.css +9 -0
  210. package/dist/css/{forms-items.css → forms-item.css} +9 -0
  211. package/dist/css/forms.css +15 -6
  212. package/dist/css/full-screen.css +9 -0
  213. package/dist/css/history.css +9 -0
  214. package/dist/css/icon-picker.css +9 -0
  215. package/dist/css/icon.css +9 -0
  216. package/dist/css/iframe.css +9 -0
  217. package/dist/css/images.css +9 -0
  218. package/dist/css/index.css +71 -6
  219. package/dist/css/input-array.css +9 -0
  220. package/dist/css/input-history.css +9 -0
  221. package/dist/css/input-num.css +9 -0
  222. package/dist/css/input-select.css +9 -0
  223. package/dist/css/inputs.css +9 -0
  224. package/dist/css/keep-com.css +9 -0
  225. package/dist/css/labels.css +9 -0
  226. package/dist/css/list.css +9 -0
  227. package/dist/css/lists.css +9 -0
  228. package/dist/css/listsp.css +9 -0
  229. package/dist/css/listspd.css +9 -0
  230. package/dist/css/menus.css +9 -0
  231. package/dist/css/no-data.css +9 -0
  232. package/dist/css/page.css +15 -6
  233. package/dist/css/paging.css +9 -0
  234. package/dist/css/popup.css +9 -0
  235. package/dist/css/retract.css +9 -0
  236. package/dist/css/right-key.css +9 -0
  237. package/dist/css/seamless-scroll.css +9 -0
  238. package/dist/css/select-scroll.css +9 -0
  239. package/dist/css/selector.css +9 -0
  240. package/dist/css/selects.css +9 -0
  241. package/dist/css/sliders.css +9 -0
  242. package/dist/css/switchs.css +9 -0
  243. package/dist/css/tables.css +9 -0
  244. package/dist/css/tablesp.css +9 -0
  245. package/dist/css/tablespd.css +9 -0
  246. package/dist/css/tabless.css +9 -0
  247. package/dist/css/tablesv.css +9 -0
  248. package/dist/css/tablesvp.css +15 -0
  249. package/dist/css/tablesvpd.css +157 -0
  250. package/dist/css/uploads.css +9 -0
  251. package/dist/css/videos.css +9 -0
  252. package/dist/css/window.css +9 -0
  253. package/dist/expand/{chunk-2L4PC7LZ.cjs → chunk-3HP2ZDNG.cjs} +6 -1
  254. package/dist/expand/{chunk-RBGCE6BS.js → chunk-7C25SBCF.js} +6 -1
  255. package/dist/expand/components.cjs +5 -5
  256. package/dist/expand/components.js +1 -1
  257. package/dist/expand/config.cjs +2 -2
  258. package/dist/expand/config.js +1 -1
  259. package/dist/hooks/compons/index.cjs +44 -0
  260. package/dist/hooks/compons/index.d.ts +7 -0
  261. package/dist/hooks/compons/index.js +44 -0
  262. package/dist/hooks/props-default/index.cjs +0 -12
  263. package/dist/hooks/props-default/index.d.ts +1 -1
  264. package/dist/hooks/props-default/index.js +0 -12
  265. package/dist/icons/index.json +1 -1
  266. package/dist/index.cjs +437 -431
  267. package/dist/index.css +71 -6
  268. package/dist/index.js +6 -0
  269. package/dist/type.d.ts +10 -5
  270. package/dist/utils/vues/getBoxDom.cjs +22 -0
  271. package/dist/utils/vues/getBoxDom.d.ts +1 -0
  272. package/dist/utils/vues/getBoxDom.js +22 -0
  273. package/dist/utils/vues/index.cjs +2 -0
  274. package/dist/utils/vues/index.d.ts +1 -0
  275. package/dist/utils/vues/index.js +2 -0
  276. package/package.json +14 -15
  277. package/dist/components/common/compons.cjs +0 -76
  278. package/dist/components/common/compons.d.ts +0 -9
  279. package/dist/components/common/compons.js +0 -76
  280. package/dist/components/common/compons.scss +0 -26
  281. package/dist/components/common/compons2.scss +0 -26
@@ -12,6 +12,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .array {
16
25
  width: 100%;
17
26
  display: inline-flex;
@@ -3,10 +3,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const data = require("./data.cjs");
5
5
  const index$1 = require("../../../hooks/cssname/index.cjs");
6
- const index$3 = require("../../icon/index.cjs");
6
+ const index$4 = require("../../icon/index.cjs");
7
7
  const clear = require("../../../icons/vue/clear.cjs");
8
- require("../../forms/src/data.cjs");
9
- const compons = require("../../common/compons.cjs");
8
+ const index$3 = require("../../../hooks/compons/index.cjs");
10
9
  const index$2 = require("../../../hooks/props-default/index.cjs");
11
10
  const lineToLargeHump = require("@fangzhongya/utils/name/lineToLargeHump");
12
11
  const index = require("../../../hooks/locale/index.cjs");
@@ -30,11 +29,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
30
29
  }
31
30
  });
32
31
  index$2.viewProps(props, data.name);
33
- const compons$1 = compons.useGetCompons(props.compons + "-compons");
32
+ const compons = index$3.useComponsGet(props.compons);
34
33
  const pcompon = vue.computed(() => {
35
34
  if (typeof props.compon == "string") {
36
35
  const tcom = lineToLargeHump.lineToLargeHump(props.compon);
37
- return compons$1[tcom] || props.compon;
36
+ return compons[tcom] || props.compon;
38
37
  } else {
39
38
  return props.compon;
40
39
  }
@@ -259,7 +258,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
259
258
  class: vue.normalizeClass([vue.unref(cs).z("icon"), vue.unref(cs).z("clear")]),
260
259
  onClick: vue.withModifiers(onClear, ["stop"])
261
260
  }, [
262
- vue.createVNode(vue.unref(index$3.Icon), null, {
261
+ vue.createVNode(vue.unref(index$4.Icon), null, {
263
262
  default: vue.withCtx(() => [
264
263
  vue.createVNode(clear.default)
265
264
  ]),
@@ -3,8 +3,7 @@ import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
3
3
  import { useCssName } from "../../../hooks/cssname/index.js";
4
4
  import { Icon } from "../../icon/index.js";
5
5
  import Clear from "../../../icons/vue/clear.js";
6
- import "../../forms/src/data.js";
7
- import { useGetCompons } from "../../common/compons.js";
6
+ import { useComponsGet } from "../../../hooks/compons/index.js";
8
7
  import { usePropsDefault, viewProps, getProps } from "../../../hooks/props-default/index.js";
9
8
  import { lineToLargeHump } from "@fangzhongya/utils/name/lineToLargeHump";
10
9
  import { useLocale } from "../../../hooks/locale/index.js";
@@ -28,7 +27,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
27
  }
29
28
  });
30
29
  viewProps(props, name);
31
- const compons = useGetCompons(props.compons + "-compons");
30
+ const compons = useComponsGet(props.compons);
32
31
  const pcompon = computed(() => {
33
32
  if (typeof props.compon == "string") {
34
33
  const tcom = lineToLargeHump(props.compon);
@@ -12,6 +12,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .audios.is-playing .audios-name {
16
25
  background-color: antiquewhite;
17
26
  }
@@ -12,6 +12,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .box-mask {
16
25
  display: block;
17
26
  opacity: 0.5;
@@ -12,6 +12,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .box-mask {
16
25
  display: block;
17
26
  opacity: 0.5;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const index = require("./src/index.cjs");
4
+ const _function = require("./src/function.cjs");
5
+ const BoxFun = _function.withInstall(index.default, "BoxFun");
6
+ exports.BoxFun = BoxFun;
7
+ exports.default = BoxFun;
@@ -0,0 +1,7 @@
1
+ import { DataProps } from '../box/src/data';
2
+ declare const BoxFun: (content?: string | Function, props?: DataProps & {
3
+ isCancel?: boolean;
4
+ cancelName?: string;
5
+ confirmName?: string;
6
+ }, verify?: () => boolean) => Promise<unknown>;
7
+ export { BoxFun, BoxFun as default };
@@ -0,0 +1,7 @@
1
+ import SrcVue from "./src/index.js";
2
+ import { withInstall } from "./src/function.js";
3
+ const BoxFun = withInstall(SrcVue, "BoxFun");
4
+ export {
5
+ BoxFun,
6
+ BoxFun as default
7
+ };
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const buildProps = require("../../../utils/vues/buildProps.cjs");
4
+ const name = "box-fun";
5
+ const dataProps = buildProps.buildProps({
6
+ /**
7
+ * @props {String, Function} content='' 内容
8
+ */
9
+ content: {
10
+ type: [String, Function]
11
+ },
12
+ /**
13
+ * @props { Object } props={} 配置
14
+ */
15
+ props: {
16
+ type: Object
17
+ },
18
+ /**
19
+ * @props { Function } verify=()=>true 校验
20
+ */
21
+ verify: {
22
+ type: Function
23
+ }
24
+ });
25
+ const dataEmits = {};
26
+ const dataSlot = {
27
+ default: "default"
28
+ };
29
+ const dataExpose = { name };
30
+ exports.dataEmits = dataEmits;
31
+ exports.dataExpose = dataExpose;
32
+ exports.dataProps = dataProps;
33
+ exports.dataSlot = dataSlot;
34
+ exports.name = name;
@@ -0,0 +1,35 @@
1
+ import { ExtractPublicPropTypes } from 'vue';
2
+ /**
3
+ * @title {h3} BoxFun
4
+ * @text box-fun
5
+ */
6
+ export declare const name = "box-fun";
7
+ export declare const dataProps: {
8
+ /**
9
+ * @props {String, Function} content='' 内容
10
+ */
11
+ content: {
12
+ type: (StringConstructor | FunctionConstructor)[];
13
+ };
14
+ /**
15
+ * @props { Object } props={} 配置
16
+ */
17
+ props: {
18
+ type: ObjectConstructor;
19
+ };
20
+ /**
21
+ * @props { Function } verify=()=>true 校验
22
+ */
23
+ verify: {
24
+ type: FunctionConstructor;
25
+ };
26
+ };
27
+ export type DataProps = ExtractPublicPropTypes<typeof dataProps>;
28
+ export declare const dataEmits: {};
29
+ export type DataEmits = typeof dataEmits;
30
+ export declare const dataSlot: {
31
+ default: string;
32
+ };
33
+ export declare const dataExpose: {
34
+ name: string;
35
+ };
@@ -0,0 +1,34 @@
1
+ import { buildProps } from "../../../utils/vues/buildProps.js";
2
+ const name = "box-fun";
3
+ const dataProps = buildProps({
4
+ /**
5
+ * @props {String, Function} content='' 内容
6
+ */
7
+ content: {
8
+ type: [String, Function]
9
+ },
10
+ /**
11
+ * @props { Object } props={} 配置
12
+ */
13
+ props: {
14
+ type: Object
15
+ },
16
+ /**
17
+ * @props { Function } verify=()=>true 校验
18
+ */
19
+ verify: {
20
+ type: Function
21
+ }
22
+ });
23
+ const dataEmits = {};
24
+ const dataSlot = {
25
+ default: "default"
26
+ };
27
+ const dataExpose = { name };
28
+ export {
29
+ dataEmits,
30
+ dataExpose,
31
+ dataProps,
32
+ dataSlot,
33
+ name
34
+ };
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const vue = require("vue");
4
+ const index$2 = require("../../box/index.cjs");
5
+ const getBoxDom = require("../../../utils/vues/getBoxDom.cjs");
6
+ const index$1 = require("../../button/index.cjs");
7
+ const index = require("../../../hooks/locale/index.cjs");
8
+ const BoxFun = (content = "", props = {}, verify = () => true) => {
9
+ return new Promise((resolve, reject) => {
10
+ const mountNode = document.createElement("div");
11
+ const dom = getBoxDom.getBoxDom();
12
+ (dom ?? document.body).appendChild(mountNode);
13
+ const visible = vue.ref(true);
14
+ const app = vue.createApp({
15
+ render() {
16
+ const { getLocale } = index.useLocale();
17
+ let defaultFun;
18
+ if (typeof content === "string") {
19
+ defaultFun = () => vue.h("div", content);
20
+ } else if (content) {
21
+ defaultFun = content;
22
+ }
23
+ const cancel = vue.h(
24
+ index$1.Button,
25
+ {
26
+ onClick() {
27
+ visible.value = false;
28
+ vue.nextTick(() => {
29
+ app.unmount();
30
+ mountNode.remove();
31
+ });
32
+ reject(false);
33
+ }
34
+ },
35
+ {
36
+ default() {
37
+ return props.cancelName ?? getLocale("form.cancel");
38
+ }
39
+ }
40
+ );
41
+ return vue.h(
42
+ index$2.Box,
43
+ {
44
+ modelValue: visible.value,
45
+ "onUpdate:modelValue": (value) => {
46
+ visible.value = value;
47
+ },
48
+ ...props
49
+ },
50
+ {
51
+ footer: () => {
52
+ return vue.h(
53
+ "div",
54
+ {
55
+ class: "com-footer",
56
+ style: {
57
+ "text-align": "right"
58
+ }
59
+ },
60
+ [
61
+ props.isCancel === false ? void 0 : cancel,
62
+ vue.h(
63
+ index$1.Button,
64
+ {
65
+ type: "primary",
66
+ onClick: async () => {
67
+ if (await verify()) {
68
+ visible.value = false;
69
+ vue.nextTick(() => {
70
+ app.unmount();
71
+ mountNode.remove();
72
+ });
73
+ resolve(true);
74
+ }
75
+ }
76
+ },
77
+ {
78
+ default() {
79
+ return props.confirmName ?? getLocale("form.confirm");
80
+ }
81
+ }
82
+ )
83
+ ]
84
+ );
85
+ },
86
+ default: defaultFun
87
+ }
88
+ );
89
+ }
90
+ });
91
+ app.mount(mountNode);
92
+ });
93
+ };
94
+ function withInstall(fun, name) {
95
+ return BoxFun;
96
+ }
97
+ exports.withInstall = withInstall;
@@ -0,0 +1,8 @@
1
+ import { DataProps } from '../box/src/data';
2
+ type Props = {
3
+ isCancel?: boolean;
4
+ cancelName?: string;
5
+ confirmName?: string;
6
+ };
7
+ export declare function withInstall<T>(fun: T, name: string): (content?: string | Function, props?: DataProps & Props, verify?: () => boolean) => Promise<unknown>;
8
+ export {};
@@ -0,0 +1,97 @@
1
+ import { ref, createApp, h, nextTick } from "vue";
2
+ import { Box } from "../../box/index.js";
3
+ import { getBoxDom } from "../../../utils/vues/getBoxDom.js";
4
+ import { Button } from "../../button/index.js";
5
+ import { useLocale } from "../../../hooks/locale/index.js";
6
+ const BoxFun = (content = "", props = {}, verify = () => true) => {
7
+ return new Promise((resolve, reject) => {
8
+ const mountNode = document.createElement("div");
9
+ const dom = getBoxDom();
10
+ (dom ?? document.body).appendChild(mountNode);
11
+ const visible = ref(true);
12
+ const app = createApp({
13
+ render() {
14
+ const { getLocale } = useLocale();
15
+ let defaultFun;
16
+ if (typeof content === "string") {
17
+ defaultFun = () => h("div", content);
18
+ } else if (content) {
19
+ defaultFun = content;
20
+ }
21
+ const cancel = h(
22
+ Button,
23
+ {
24
+ onClick() {
25
+ visible.value = false;
26
+ nextTick(() => {
27
+ app.unmount();
28
+ mountNode.remove();
29
+ });
30
+ reject(false);
31
+ }
32
+ },
33
+ {
34
+ default() {
35
+ return props.cancelName ?? getLocale("form.cancel");
36
+ }
37
+ }
38
+ );
39
+ return h(
40
+ Box,
41
+ {
42
+ modelValue: visible.value,
43
+ "onUpdate:modelValue": (value) => {
44
+ visible.value = value;
45
+ },
46
+ ...props
47
+ },
48
+ {
49
+ footer: () => {
50
+ return h(
51
+ "div",
52
+ {
53
+ class: "com-footer",
54
+ style: {
55
+ "text-align": "right"
56
+ }
57
+ },
58
+ [
59
+ props.isCancel === false ? void 0 : cancel,
60
+ h(
61
+ Button,
62
+ {
63
+ type: "primary",
64
+ onClick: async () => {
65
+ if (await verify()) {
66
+ visible.value = false;
67
+ nextTick(() => {
68
+ app.unmount();
69
+ mountNode.remove();
70
+ });
71
+ resolve(true);
72
+ }
73
+ }
74
+ },
75
+ {
76
+ default() {
77
+ return props.confirmName ?? getLocale("form.confirm");
78
+ }
79
+ }
80
+ )
81
+ ]
82
+ );
83
+ },
84
+ default: defaultFun
85
+ }
86
+ );
87
+ }
88
+ });
89
+ app.mount(mountNode);
90
+ });
91
+ };
92
+ function withInstall(fun, name) {
93
+ return BoxFun;
94
+ }
95
+ export {
96
+ withInstall
97
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ require("./data.cjs");
4
+ const SrcVue = {};
5
+ exports.default = SrcVue;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import "./data.js";
2
+ const SrcVue = {};
3
+ export {
4
+ SrcVue as default
5
+ };
@@ -12,6 +12,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .box-mask {
16
25
  display: block;
17
26
  opacity: 0.5;
@@ -12,6 +12,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .box-mask {
16
25
  display: block;
17
26
  opacity: 0.5;
@@ -4,7 +4,7 @@ const vue = require("vue");
4
4
  const data = require("./data.cjs");
5
5
  const index$1 = require("../../../hooks/cssname/index.cjs");
6
6
  const index = require("../../../hooks/locale/index.cjs");
7
- const enums = require("../../../utils/enums.cjs");
7
+ const getBoxDom = require("../../../utils/vues/getBoxDom.cjs");
8
8
  const index$2 = require("../../../hooks/props-default/index.cjs");
9
9
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
10
10
  __name: "index",
@@ -17,16 +17,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
17
  const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
18
18
  index$2.viewProps(props, data.name);
19
19
  const emit = __emit;
20
- const id = enums.FunctConfig.BOXIDNAME.trim();
21
- if (document && !(document == null ? void 0 : document.querySelector(id))) {
22
- const d = document.createElement("div");
23
- if (id.startsWith("#")) {
24
- d.id = id.replace(/^#/, "");
25
- } else if (id.startsWith(".")) {
26
- d.className = id.replace(/./g, " ");
27
- }
28
- document.body.appendChild(d);
29
- }
20
+ getBoxDom.getBoxDom();
30
21
  __expose({
31
22
  ...data.dataExpose
32
23
  });
@@ -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,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .icon {
16
25
  --color: inherit;
17
26
  height: 1em;
@@ -12,6 +12,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .buttons-li {
16
25
  height: inherit;
17
26
  }
@@ -12,6 +12,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .cascaders-cascader {
16
25
  height: 100%;
17
26
  width: 100%;
@@ -12,6 +12,15 @@
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
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .checks-check {
16
25
  height: 100%;
17
26
  display: flex;