@fangzhongya/fang-ui 0.1.55 → 0.1.57

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 (238) hide show
  1. package/dist/components/audios/src/index2.cjs +16 -10
  2. package/dist/components/audios/src/index2.js +16 -10
  3. package/dist/components/box-adjust/src/index2.cjs +6 -4
  4. package/dist/components/box-adjust/src/index2.js +6 -4
  5. package/dist/components/box-title/src/index2.cjs +3 -2
  6. package/dist/components/box-title/src/index2.js +3 -2
  7. package/dist/components/buttons/src/data.d.ts +5 -5
  8. package/dist/components/buttons/src/index2.cjs +2 -2
  9. package/dist/components/buttons/src/index2.js +2 -2
  10. package/dist/components/cascaders/src/data.d.ts +5 -5
  11. package/dist/components/checks/src/data.d.ts +5 -5
  12. package/dist/components/common/list.d.ts +1 -1
  13. package/dist/components/common/use.cjs +1 -1
  14. package/dist/components/common/use.js +1 -1
  15. package/dist/components/dates/src/data.d.ts +5 -5
  16. package/dist/components/dates2/src/data.d.ts +5 -5
  17. package/dist/components/double/src/index2.cjs +3 -2
  18. package/dist/components/double/src/index2.js +3 -2
  19. package/dist/components/edit/index.css +5 -5
  20. package/dist/components/edit/index.scss +5 -5
  21. package/dist/components/edit/src/data.cjs +3 -2
  22. package/dist/components/edit/src/data.d.ts +5 -1
  23. package/dist/components/edit/src/data.js +3 -2
  24. package/dist/components/edit/src/index2.cjs +32 -23
  25. package/dist/components/edit/src/index2.js +32 -23
  26. package/dist/components/edit-data/src/area/array-json2.cjs +8 -4
  27. package/dist/components/edit-data/src/area/array-json2.js +8 -4
  28. package/dist/components/edit-data/src/area/array2.cjs +46 -8
  29. package/dist/components/edit-data/src/area/array2.js +47 -9
  30. package/dist/components/edit-data/src/area/editor2.cjs +22 -4
  31. package/dist/components/edit-data/src/area/editor2.js +22 -4
  32. package/dist/components/edit-data/src/area/general2.cjs +8 -1
  33. package/dist/components/edit-data/src/area/general2.js +8 -1
  34. package/dist/components/edit-data/src/area/object-json2.cjs +5 -1
  35. package/dist/components/edit-data/src/area/object-json2.js +5 -1
  36. package/dist/components/edit-data/src/area/object2.cjs +48 -11
  37. package/dist/components/edit-data/src/area/object2.js +49 -12
  38. package/dist/components/edit-data/src/data/array2.cjs +9 -5
  39. package/dist/components/edit-data/src/data/array2.js +9 -5
  40. package/dist/components/edit-data/src/data/bigint2.cjs +7 -3
  41. package/dist/components/edit-data/src/data/bigint2.js +7 -3
  42. package/dist/components/edit-data/src/data/boolean2.cjs +7 -3
  43. package/dist/components/edit-data/src/data/boolean2.js +7 -3
  44. package/dist/components/edit-data/src/data/date.cjs +4 -0
  45. package/dist/components/edit-data/src/data/date.js +4 -0
  46. package/dist/components/edit-data/src/data/date2.cjs +48 -0
  47. package/dist/components/edit-data/src/data/date2.js +48 -0
  48. package/dist/components/edit-data/src/data/function2.cjs +16 -7
  49. package/dist/components/edit-data/src/data/function2.js +17 -8
  50. package/dist/components/edit-data/src/data/null2.cjs +3 -1
  51. package/dist/components/edit-data/src/data/null2.js +4 -2
  52. package/dist/components/edit-data/src/data/number2.cjs +7 -3
  53. package/dist/components/edit-data/src/data/number2.js +7 -3
  54. package/dist/components/edit-data/src/data/object2.cjs +9 -5
  55. package/dist/components/edit-data/src/data/object2.js +9 -5
  56. package/dist/components/edit-data/src/data/other2.cjs +13 -5
  57. package/dist/components/edit-data/src/data/other2.js +14 -6
  58. package/dist/components/edit-data/src/data/string2.cjs +7 -3
  59. package/dist/components/edit-data/src/data/string2.js +7 -3
  60. package/dist/components/edit-data/src/data/symbol2.cjs +7 -3
  61. package/dist/components/edit-data/src/data/symbol2.js +7 -3
  62. package/dist/components/edit-data/src/data/undefined2.cjs +3 -1
  63. package/dist/components/edit-data/src/data/undefined2.js +4 -2
  64. package/dist/components/edit-data/src/data.cjs +10 -0
  65. package/dist/components/edit-data/src/data.d.ts +20 -0
  66. package/dist/components/edit-data/src/data.js +10 -0
  67. package/dist/components/edit-data/src/index2.cjs +31 -2
  68. package/dist/components/edit-data/src/index2.js +45 -16
  69. package/dist/components/edit-data-add/src/index2.cjs +2 -0
  70. package/dist/components/edit-data-add/src/index2.js +2 -0
  71. package/dist/components/edit-float/src/index2.cjs +3 -2
  72. package/dist/components/edit-float/src/index2.js +3 -2
  73. package/dist/components/history/src/index2.cjs +6 -4
  74. package/dist/components/history/src/index2.js +6 -4
  75. package/dist/components/input-array/src/index2.cjs +3 -2
  76. package/dist/components/input-array/src/index2.js +3 -2
  77. package/dist/components/input-history/src/index2.cjs +3 -2
  78. package/dist/components/input-history/src/index2.js +3 -2
  79. package/dist/components/input-select/src/index2.cjs +6 -4
  80. package/dist/components/input-select/src/index2.js +6 -4
  81. package/dist/components/labels/src/data.d.ts +5 -5
  82. package/dist/components/message/index.d.ts +11 -4
  83. package/dist/components/message/src/function.d.ts +11 -4
  84. package/dist/components/message-box/index.d.ts +2 -3
  85. package/dist/components/message-box/src/function.d.ts +2 -3
  86. package/dist/components/retract/index.css +23 -20
  87. package/dist/components/retract/index.scss +39 -20
  88. package/dist/components/retract/src/data.cjs +4 -1
  89. package/dist/components/retract/src/data.d.ts +4 -1
  90. package/dist/components/retract/src/data.js +4 -1
  91. package/dist/components/retract/src/index2.cjs +12 -10
  92. package/dist/components/retract/src/index2.js +9 -7
  93. package/dist/components/right-key/index.css +2 -1
  94. package/dist/components/right-key/index.scss +2 -1
  95. package/dist/components/right-key/src/data.cjs +7 -2
  96. package/dist/components/right-key/src/data.d.ts +5 -0
  97. package/dist/components/right-key/src/data.js +7 -2
  98. package/dist/components/right-key/src/index2.cjs +134 -60
  99. package/dist/components/right-key/src/index2.js +135 -61
  100. package/dist/components/selects/src/data.d.ts +5 -5
  101. package/dist/components/stick-window/src/index2.cjs +3 -2
  102. package/dist/components/stick-window/src/index2.js +3 -2
  103. package/dist/components/switchs/src/data.d.ts +5 -4
  104. package/dist/components/uploads/src/data.d.ts +5 -5
  105. package/dist/components/uploads/src/index2.cjs +26 -21
  106. package/dist/components/uploads/src/index2.js +15 -10
  107. package/dist/components/videos/src/index2.cjs +30 -19
  108. package/dist/components/videos/src/index2.js +30 -19
  109. package/dist/components/window/src/index2.cjs +9 -6
  110. package/dist/components/window/src/index2.js +9 -6
  111. package/dist/css/edit.css +5 -5
  112. package/dist/css/index.css +30 -26
  113. package/dist/css/retract.css +23 -20
  114. package/dist/css/right-key.css +2 -1
  115. package/dist/hooks/model/index.cjs +25 -0
  116. package/dist/hooks/model/index.d.ts +2 -0
  117. package/dist/hooks/model/index.js +25 -0
  118. package/dist/icons/index.json +1 -1
  119. package/dist/icons/vue/bar.cjs +2 -18
  120. package/dist/icons/vue/bar.js +1 -17
  121. package/dist/icons/vue/bar2.cjs +21 -2
  122. package/dist/icons/vue/bar2.js +21 -2
  123. package/dist/icons/vue/below.cjs +2 -18
  124. package/dist/icons/vue/below.js +1 -17
  125. package/dist/icons/vue/below2.cjs +21 -2
  126. package/dist/icons/vue/below2.js +21 -2
  127. package/dist/icons/vue/bicycle.cjs +2 -15
  128. package/dist/icons/vue/bicycle.js +1 -14
  129. package/dist/icons/vue/bicycle2.cjs +18 -2
  130. package/dist/icons/vue/bicycle2.js +18 -2
  131. package/dist/icons/vue/bottom-left.cjs +2 -22
  132. package/dist/icons/vue/bottom-left.js +1 -21
  133. package/dist/icons/vue/bottom-left2.cjs +25 -2
  134. package/dist/icons/vue/bottom-left2.js +25 -2
  135. package/dist/icons/vue/bottom-right.cjs +2 -22
  136. package/dist/icons/vue/bottom-right.js +1 -21
  137. package/dist/icons/vue/bottom-right2.cjs +25 -2
  138. package/dist/icons/vue/bottom-right2.js +25 -2
  139. package/dist/icons/vue/bottom.cjs +2 -18
  140. package/dist/icons/vue/bottom.js +1 -17
  141. package/dist/icons/vue/bottom2.cjs +21 -2
  142. package/dist/icons/vue/bottom2.js +21 -2
  143. package/dist/icons/vue/catalogue.cjs +2 -23
  144. package/dist/icons/vue/catalogue.js +1 -22
  145. package/dist/icons/vue/catalogue2.cjs +26 -2
  146. package/dist/icons/vue/catalogue2.js +26 -2
  147. package/dist/icons/vue/clear.cjs +2 -23
  148. package/dist/icons/vue/clear.js +1 -22
  149. package/dist/icons/vue/clear2.cjs +26 -2
  150. package/dist/icons/vue/clear2.js +26 -2
  151. package/dist/icons/vue/close.cjs +2 -18
  152. package/dist/icons/vue/close.js +1 -17
  153. package/dist/icons/vue/close2.cjs +21 -2
  154. package/dist/icons/vue/close2.js +21 -2
  155. package/dist/icons/vue/delete.cjs +2 -18
  156. package/dist/icons/vue/delete.js +1 -17
  157. package/dist/icons/vue/delete2.cjs +21 -2
  158. package/dist/icons/vue/delete2.js +21 -2
  159. package/dist/icons/vue/document.cjs +2 -23
  160. package/dist/icons/vue/document.js +1 -22
  161. package/dist/icons/vue/document2.cjs +26 -2
  162. package/dist/icons/vue/document2.js +26 -2
  163. package/dist/icons/vue/down.cjs +2 -18
  164. package/dist/icons/vue/down.js +1 -17
  165. package/dist/icons/vue/down2.cjs +21 -2
  166. package/dist/icons/vue/down2.js +21 -2
  167. package/dist/icons/vue/download.cjs +2 -18
  168. package/dist/icons/vue/download.js +1 -17
  169. package/dist/icons/vue/download2.cjs +21 -2
  170. package/dist/icons/vue/download2.js +21 -2
  171. package/dist/icons/vue/edit.cjs +2 -23
  172. package/dist/icons/vue/edit.js +1 -22
  173. package/dist/icons/vue/edit2.cjs +26 -2
  174. package/dist/icons/vue/edit2.js +26 -2
  175. package/dist/icons/vue/enter.cjs +2 -19
  176. package/dist/icons/vue/enter.js +1 -18
  177. package/dist/icons/vue/enter2.cjs +22 -2
  178. package/dist/icons/vue/enter2.js +22 -2
  179. package/dist/icons/vue/frame.cjs +2 -15
  180. package/dist/icons/vue/frame.js +1 -14
  181. package/dist/icons/vue/frame2.cjs +18 -2
  182. package/dist/icons/vue/frame2.js +18 -2
  183. package/dist/icons/vue/index.cjs +81 -54
  184. package/dist/icons/vue/index.js +54 -27
  185. package/dist/icons/vue/left.cjs +2 -18
  186. package/dist/icons/vue/left.js +1 -17
  187. package/dist/icons/vue/left2.cjs +21 -2
  188. package/dist/icons/vue/left2.js +21 -2
  189. package/dist/icons/vue/mute.cjs +2 -18
  190. package/dist/icons/vue/mute.js +1 -17
  191. package/dist/icons/vue/mute2.cjs +21 -2
  192. package/dist/icons/vue/mute2.js +21 -2
  193. package/dist/icons/vue/pause.cjs +2 -24
  194. package/dist/icons/vue/pause.js +1 -23
  195. package/dist/icons/vue/pause2.cjs +27 -2
  196. package/dist/icons/vue/pause2.js +27 -2
  197. package/dist/icons/vue/play.cjs +2 -19
  198. package/dist/icons/vue/play.js +1 -18
  199. package/dist/icons/vue/play2.cjs +22 -2
  200. package/dist/icons/vue/play2.js +22 -2
  201. package/dist/icons/vue/plus.cjs +2 -18
  202. package/dist/icons/vue/plus.js +1 -17
  203. package/dist/icons/vue/plus2.cjs +21 -2
  204. package/dist/icons/vue/plus2.js +21 -2
  205. package/dist/icons/vue/retreat.cjs +2 -19
  206. package/dist/icons/vue/retreat.js +1 -18
  207. package/dist/icons/vue/retreat2.cjs +22 -2
  208. package/dist/icons/vue/retreat2.js +22 -2
  209. package/dist/icons/vue/right.cjs +2 -18
  210. package/dist/icons/vue/right.js +1 -17
  211. package/dist/icons/vue/right2.cjs +21 -2
  212. package/dist/icons/vue/right2.js +21 -2
  213. package/dist/icons/vue/sound.cjs +2 -22
  214. package/dist/icons/vue/sound.js +1 -21
  215. package/dist/icons/vue/sound2.cjs +25 -2
  216. package/dist/icons/vue/sound2.js +25 -2
  217. package/dist/icons/vue/star.cjs +2 -22
  218. package/dist/icons/vue/star.js +1 -21
  219. package/dist/icons/vue/star2.cjs +25 -2
  220. package/dist/icons/vue/star2.js +25 -2
  221. package/dist/icons/vue/up.cjs +2 -18
  222. package/dist/icons/vue/up.js +1 -17
  223. package/dist/icons/vue/up2.cjs +21 -2
  224. package/dist/icons/vue/up2.js +21 -2
  225. package/dist/icons/vue/views.cjs +2 -18
  226. package/dist/icons/vue/views.js +1 -17
  227. package/dist/icons/vue/views2.cjs +21 -2
  228. package/dist/icons/vue/views2.js +21 -2
  229. package/dist/index.css +30 -26
  230. package/dist/utils/vues/index.d.ts +1 -0
  231. package/dist/utils/vues/shared.cjs +19 -0
  232. package/dist/utils/vues/shared.d.ts +5 -0
  233. package/dist/utils/vues/shared.js +19 -0
  234. package/package.json +10 -11
  235. package/dist/_virtual/_plugin-vue_export-helper.cjs +0 -10
  236. package/dist/_virtual/_plugin-vue_export-helper.js +0 -10
  237. /package/dist/components/{keep-com → global-config}/index.css +0 -0
  238. /package/dist/css/{keep-com.css → global-config.css} +0 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, onMounted, onUnmounted, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createVNode, withCtx, withDirectives, createElementVNode, normalizeStyle, Fragment, renderList, withModifiers, createBlock, createCommentVNode, resolveDynamicComponent, toDisplayString, vShow } from "vue";
1
+ import { defineComponent, ref, computed, nextTick, watch, onMounted, onUnmounted, createElementBlock, openBlock, normalizeClass, unref, renderSlot, createVNode, withCtx, withDirectives, createElementVNode, normalizeStyle, Fragment, renderList, withModifiers, createBlock, createCommentVNode, resolveDynamicComponent, toDisplayString, vShow } from "vue";
2
2
  import { getPrentClass } from "@fangzhongya/utils/css/getPrentClass";
3
3
  import { useVueValue } from "../../common/use.js";
4
4
  import { Icon } from "../../icon/index.js";
@@ -6,6 +6,7 @@ import { BoxTeleport } from "../../box-teleport/index.js";
6
6
  import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
7
7
  import { useCssName } from "../../../hooks/cssname/index.js";
8
8
  import { useLocale } from "../../../hooks/locale/index.js";
9
+ import { getBoxDom } from "../../../utils/vues/getBoxDom.js";
9
10
  import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
10
11
  const _hoisted_1 = ["onClick"];
11
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -21,73 +22,145 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
22
  const flag = ref(false);
22
23
  const refRightKey = ref();
23
24
  const refRightKeyBox = ref();
24
- const topx = ref("");
25
- const lefty = ref("");
25
+ const position = ref({ x: 0, y: 0 });
26
26
  const dom = ref();
27
- onMounted(() => {
28
- globalThis.addEventListener("mousedown", watchContextmenu);
29
- });
30
- onUnmounted(() => {
31
- globalThis.removeEventListener("mousedown", watchContextmenu);
27
+ const boxStyle = computed(() => {
28
+ if (!refRightKeyBox.value) return {};
29
+ const rect = refRightKeyBox.value.getBoundingClientRect();
30
+ const { innerWidth, innerHeight } = window;
31
+ let x = position.value.x;
32
+ let y = position.value.y;
33
+ if (x + rect.width > innerWidth) {
34
+ x = x - rect.width;
35
+ }
36
+ if (y + rect.height > innerHeight) {
37
+ y = y - rect.height;
38
+ }
39
+ return {
40
+ top: `${y}px`,
41
+ left: `${x}px`
42
+ };
32
43
  });
33
- function watchContextmenu(event) {
34
- if (refRightKeyBox.value.contains(event.target)) {
44
+ function handleGlobalMousedown(event) {
45
+ var _a;
46
+ if ((_a = refRightKeyBox.value) == null ? void 0 : _a.contains(event.target)) {
35
47
  return;
36
48
  }
37
- if (!refRightKey.value.contains(event.target) || event.button !== 2) {
49
+ flag.value = false;
50
+ }
51
+ function handleGlobalClick(event) {
52
+ var _a;
53
+ if (event.button === 2) return;
54
+ if (!((_a = refRightKeyBox.value) == null ? void 0 : _a.contains(event.target))) {
55
+ flag.value = false;
56
+ }
57
+ }
58
+ function handleKeydown(event) {
59
+ if (event.key === "Escape" && flag.value) {
38
60
  flag.value = false;
39
61
  }
40
62
  }
41
63
  function isDomClass(dom2) {
42
- if (dom2) {
43
- if (props.domClass) {
44
- const v = getPrentClass(
45
- dom2,
46
- props.domClass,
47
- props.level
48
- );
49
- if (v && refRightKey.value.contains(v)) {
50
- return v;
51
- }
52
- } else {
53
- return dom2;
64
+ var _a, _b;
65
+ if (!dom2) return null;
66
+ if (props.domClass) {
67
+ const element = getPrentClass(
68
+ dom2,
69
+ props.domClass,
70
+ props.level
71
+ );
72
+ if (element && ((_a = refRightKey.value) == null ? void 0 : _a.contains(element))) {
73
+ return element;
54
74
  }
75
+ } else if ((_b = refRightKey.value) == null ? void 0 : _b.contains(dom2)) {
76
+ return dom2;
55
77
  }
78
+ return null;
56
79
  }
57
80
  function handleContextmenu(event) {
58
- let target = event.target;
59
- target = isDomClass(target);
60
- if (target) {
61
- dom.value = target;
62
- let x = 0, y = 0;
63
- if (event.x || event.y) {
64
- x = event.x;
65
- y = event.y;
66
- } else if (event.pageX || event.pageY) {
67
- x = event.pageX - 1;
68
- y = event.pageY - 1;
69
- }
70
- let ww = globalThis ? globalThis.innerWidth : 0;
71
- let kw = 0;
72
- if (ww != 0 && x + 120 > ww) {
73
- kw = 0 - (x + 120 - ww);
74
- }
75
- topx.value = x + kw + "px";
76
- lefty.value = y + "px";
77
- flag.value = true;
78
- event.preventDefault();
79
- event.stopPropagation();
80
- emit("click-right", target);
81
- } else {
81
+ const target = isDomClass(event.target);
82
+ if (!target) {
82
83
  flag.value = false;
84
+ return;
83
85
  }
86
+ dom.value = target;
87
+ let x = event.clientX;
88
+ let y = event.clientY;
89
+ flag.value = true;
90
+ event.preventDefault();
91
+ event.stopPropagation();
92
+ emit("click-right", target);
93
+ nextTick(() => {
94
+ position.value = { x, y };
95
+ });
84
96
  }
85
97
  function onClick(v) {
86
98
  flag.value = false;
87
99
  emit("click-key", v, dom.value);
88
100
  }
101
+ const toDom = ref();
102
+ watch(
103
+ () => flag.value,
104
+ () => {
105
+ if (props.isSingle) {
106
+ if (flag.value) {
107
+ if (toDom.value) {
108
+ toDom.value.querySelectorAll("." + cs.z("box")).forEach((v) => {
109
+ v.style.display = "none";
110
+ });
111
+ }
112
+ nextTick(() => {
113
+ refRightKeyBox.value.style.display = "block";
114
+ });
115
+ } else {
116
+ refRightKeyBox.value.style.display = "none";
117
+ }
118
+ } else {
119
+ refRightKeyBox.value.style.display = flag.value ? "block" : "none";
120
+ }
121
+ }
122
+ );
123
+ onMounted(() => {
124
+ toDom.value = getBoxDom();
125
+ document.addEventListener("mousedown", handleGlobalMousedown, true);
126
+ document.addEventListener("click", handleGlobalClick, true);
127
+ document.addEventListener("keydown", handleKeydown);
128
+ window.addEventListener("resize", () => {
129
+ if (flag.value) {
130
+ flag.value = false;
131
+ }
132
+ });
133
+ window.addEventListener(
134
+ "scroll",
135
+ () => {
136
+ if (flag.value) {
137
+ flag.value = false;
138
+ }
139
+ },
140
+ true
141
+ );
142
+ });
143
+ onUnmounted(() => {
144
+ document.removeEventListener("mousedown", handleGlobalMousedown, true);
145
+ document.removeEventListener("click", handleGlobalClick, true);
146
+ document.removeEventListener("keydown", handleKeydown);
147
+ window.removeEventListener("resize", () => {
148
+ });
149
+ window.removeEventListener("scroll", () => {
150
+ }, true);
151
+ });
89
152
  __expose({
90
- ...dataExpose
153
+ ...dataExpose,
154
+ // 提供关闭菜单的方法
155
+ close: () => {
156
+ flag.value = false;
157
+ },
158
+ // 提供打开菜单的方法
159
+ open: (x, y, target) => {
160
+ position.value = { x, y };
161
+ dom.value = target;
162
+ flag.value = true;
163
+ }
91
164
  });
92
165
  return (_ctx, _cache) => {
93
166
  return openBlock(), createElementBlock("div", {
@@ -106,11 +179,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
106
179
  class: normalizeClass([unref(cs).z("box"), unref(props).boxClass]),
107
180
  ref_key: "refRightKeyBox",
108
181
  ref: refRightKeyBox,
109
- style: normalizeStyle({
110
- position: "fixed",
111
- top: lefty.value,
112
- left: topx.value
113
- })
182
+ style: normalizeStyle(boxStyle.value)
114
183
  }, [
115
184
  createElementVNode("div", {
116
185
  class: normalizeClass(unref(cs).z("box-list"))
@@ -121,13 +190,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
121
190
  onClick: withModifiers(($event) => onClick(v), ["stop"]),
122
191
  class: normalizeClass(unref(cs).z("box-list-li"))
123
192
  }, [
124
- v.icon ? (openBlock(), createBlock(unref(Icon), { key: 0 }, {
125
- default: withCtx(() => [
126
- (openBlock(), createBlock(resolveDynamicComponent(v.icon)))
127
- ]),
128
- _: 2
129
- }, 1024)) : createCommentVNode("", true),
130
- createElementVNode("span", null, toDisplayString(unref(useVueValue)(v, unref(props).label)), 1)
193
+ renderSlot(_ctx.$slots, unref(dataSlot).list, {
194
+ value: v,
195
+ index: k
196
+ }, () => [
197
+ v.icon ? (openBlock(), createBlock(unref(Icon), { key: 0 }, {
198
+ default: withCtx(() => [
199
+ (openBlock(), createBlock(resolveDynamicComponent(v.icon)))
200
+ ]),
201
+ _: 2
202
+ }, 1024)) : createCommentVNode("", true),
203
+ createElementVNode("span", null, toDisplayString(unref(useVueValue)(v, unref(props).label)), 1)
204
+ ])
131
205
  ], 10, _hoisted_1);
132
206
  }), 128))
133
207
  ], 2)
@@ -135,7 +209,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
135
209
  [vShow, flag.value]
136
210
  ])
137
211
  ]),
138
- _: 1
212
+ _: 3
139
213
  }, 8, ["disabled", "to"])
140
214
  ], 34);
141
215
  };
@@ -1,5 +1,5 @@
1
1
  import { ExtractPropTypes } from 'vue';
2
- import { comHandle } from '../../common/list';
2
+ import { comHandle, Options } from '../../common/list';
3
3
  /**
4
4
  * @title {h3}
5
5
  */
@@ -18,10 +18,10 @@ export declare const dataProps: {
18
18
  };
19
19
  options: {
20
20
  type: {
21
- (arrayLength: number): (string | number | boolean | ObjAny)[];
22
- (...items: (string | number | boolean | ObjAny)[]): (string | number | boolean | ObjAny)[];
23
- new (arrayLength: number): (string | number | boolean | ObjAny)[];
24
- new (...items: (string | number | boolean | ObjAny)[]): (string | number | boolean | ObjAny)[];
21
+ (arrayLength: number): Options[];
22
+ (...items: Options[]): Options[];
23
+ new (arrayLength: number): Options[];
24
+ new (...items: Options[]): Options[];
25
25
  isArray(arg: any): arg is any[];
26
26
  readonly prototype: any[];
27
27
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -4,11 +4,12 @@ const vue = require("vue");
4
4
  const index$3 = require("../../box-teleport/index.cjs");
5
5
  const data = require("./data.cjs");
6
6
  const index$4 = require("../../icon/index.cjs");
7
- const close = require("../../../icons/vue/close.cjs");
7
+ require("../../../icons/vue/close.cjs");
8
8
  const index$1 = require("../../../hooks/cssname/index.cjs");
9
9
  const index = require("../../../hooks/locale/index.cjs");
10
10
  const index$5 = require("../../../directives/stick/index.cjs");
11
11
  const index$2 = require("../../../hooks/props-default/index.cjs");
12
+ const close_vue_vue_type_script_setup_true_lang = require("../../../icons/vue/close2.cjs");
12
13
  const _hoisted_1 = ["onClick"];
13
14
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
14
15
  __name: "index",
@@ -87,7 +88,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
87
88
  title: vue.unref(getLocale)("close")
88
89
  }, {
89
90
  default: vue.withCtx(() => [
90
- vue.createVNode(close.default)
91
+ vue.createVNode(close_vue_vue_type_script_setup_true_lang.default)
91
92
  ]),
92
93
  _: 1
93
94
  }, 8, ["onClick", "class", "title"])
@@ -2,11 +2,12 @@ import { defineComponent, ref, createBlock, openBlock, unref, withCtx, withDirec
2
2
  import { BoxTeleport } from "../../box-teleport/index.js";
3
3
  import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
4
4
  import { Icon } from "../../icon/index.js";
5
- import Close from "../../../icons/vue/close.js";
5
+ import "../../../icons/vue/close.js";
6
6
  import { useCssName } from "../../../hooks/cssname/index.js";
7
7
  import { useLocale } from "../../../hooks/locale/index.js";
8
8
  import vStick from "../../../directives/stick/index.js";
9
9
  import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
10
+ import _sfc_main$1 from "../../../icons/vue/close2.js";
10
11
  const _hoisted_1 = ["onClick"];
11
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
12
13
  __name: "index",
@@ -85,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
85
86
  title: unref(getLocale)("close")
86
87
  }, {
87
88
  default: withCtx(() => [
88
- createVNode(Close)
89
+ createVNode(_sfc_main$1)
89
90
  ]),
90
91
  _: 1
91
92
  }, 8, ["onClick", "class", "title"])
@@ -1,4 +1,5 @@
1
1
  import { ExtractPropTypes } from 'vue';
2
+ import { Options } from '../../common/list';
2
3
  /**
3
4
  * @title {h3} switchs 开关列表
4
5
  * @text value: '' 在@change中会返回 true
@@ -14,10 +15,10 @@ export declare const dataProps: {
14
15
  };
15
16
  options: {
16
17
  type: {
17
- (arrayLength: number): (string | number | boolean | ObjAny)[];
18
- (...items: (string | number | boolean | ObjAny)[]): (string | number | boolean | ObjAny)[];
19
- new (arrayLength: number): (string | number | boolean | ObjAny)[];
20
- new (...items: (string | number | boolean | ObjAny)[]): (string | number | boolean | ObjAny)[];
18
+ (arrayLength: number): Options[];
19
+ (...items: Options[]): Options[];
20
+ new (arrayLength: number): Options[];
21
+ new (...items: Options[]): Options[];
21
22
  isArray(arg: any): arg is any[];
22
23
  readonly prototype: any[];
23
24
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -1,5 +1,5 @@
1
1
  import { ExtractPublicPropTypes } from 'vue';
2
- import { comHandle } from '../../common/list';
2
+ import { comHandle, Options } from '../../common/list';
3
3
  /**
4
4
  * @title {h3} uploads
5
5
  */
@@ -78,10 +78,10 @@ export declare const dataProps: {
78
78
  };
79
79
  options: {
80
80
  type: {
81
- (arrayLength: number): (string | number | boolean | ObjAny)[];
82
- (...items: (string | number | boolean | ObjAny)[]): (string | number | boolean | ObjAny)[];
83
- new (arrayLength: number): (string | number | boolean | ObjAny)[];
84
- new (...items: (string | number | boolean | ObjAny)[]): (string | number | boolean | ObjAny)[];
81
+ (arrayLength: number): Options[];
82
+ (...items: Options[]): Options[];
83
+ new (arrayLength: number): Options[];
84
+ new (...items: Options[]): Options[];
85
85
  isArray(arg: any): arg is any[];
86
86
  readonly prototype: any[];
87
87
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const document = require("../../../icons/vue/document.cjs");
5
- const download$1 = require("../../../icons/vue/download.cjs");
6
- const plus = require("../../../icons/vue/plus.cjs");
7
- const views = require("../../../icons/vue/views.cjs");
8
- const _delete = require("../../../icons/vue/delete.cjs");
4
+ require("../../../icons/vue/document.cjs");
5
+ require("../../../icons/vue/download.cjs");
6
+ require("../../../icons/vue/plus.cjs");
7
+ require("../../../icons/vue/views.cjs");
8
+ require("../../../icons/vue/delete.cjs");
9
9
  const index$7 = require("../../icon/index.cjs");
10
10
  const index$b = require("../../upload/index.cjs");
11
11
  const index$5 = require("../../message/index.cjs");
@@ -24,6 +24,11 @@ const util = require("./util.cjs");
24
24
  require("../../form/index.cjs");
25
25
  const index$3 = require("../../../hooks/props-default/index.cjs");
26
26
  const index$4 = require("element-plus/es/components/form/index");
27
+ const download_vue_vue_type_script_setup_true_lang = require("../../../icons/vue/download2.cjs");
28
+ const views_vue_vue_type_script_setup_true_lang = require("../../../icons/vue/views2.cjs");
29
+ const delete_vue_vue_type_script_setup_true_lang = require("../../../icons/vue/delete2.cjs");
30
+ const document_vue_vue_type_script_setup_true_lang = require("../../../icons/vue/document2.cjs");
31
+ const plus_vue_vue_type_script_setup_true_lang = require("../../../icons/vue/plus2.cjs");
27
32
  const _hoisted_1 = ["onMouseenter"];
28
33
  const _hoisted_2 = ["title"];
29
34
  const _hoisted_3 = ["onClick", "title"];
@@ -113,7 +118,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
113
118
  }
114
119
  return !value.value;
115
120
  });
116
- const views$1 = vue.reactive({
121
+ const views = vue.reactive({
117
122
  show: false,
118
123
  value: void 0
119
124
  });
@@ -125,8 +130,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
125
130
  }
126
131
  };
127
132
  const onViews = (item, index2) => {
128
- views$1.value = item;
129
- views$1.show = true;
133
+ views.value = item;
134
+ views.show = true;
130
135
  emit("views", item, index2);
131
136
  };
132
137
  const onDelete = (item, index2) => {
@@ -264,7 +269,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
264
269
  }, [
265
270
  vue.createVNode(vue.unref(index$7.Icon), null, {
266
271
  default: vue.withCtx(() => [
267
- vue.createVNode(download$1.default)
272
+ vue.createVNode(download_vue_vue_type_script_setup_true_lang.default)
268
273
  ]),
269
274
  _: 1
270
275
  })
@@ -276,7 +281,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
276
281
  }, [
277
282
  vue.createVNode(vue.unref(index$7.Icon), null, {
278
283
  default: vue.withCtx(() => [
279
- vue.createVNode(views.default)
284
+ vue.createVNode(views_vue_vue_type_script_setup_true_lang.default)
280
285
  ]),
281
286
  _: 1
282
287
  })
@@ -289,7 +294,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
289
294
  }, [
290
295
  vue.createVNode(vue.unref(index$7.Icon), null, {
291
296
  default: vue.withCtx(() => [
292
- vue.createVNode(_delete.default)
297
+ vue.createVNode(delete_vue_vue_type_script_setup_true_lang.default)
293
298
  ]),
294
299
  _: 1
295
300
  })
@@ -324,7 +329,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
324
329
  vue.createElementVNode("span", {
325
330
  class: vue.normalizeClass(vue.unref(cs).z("list-li-value-document-bg"))
326
331
  }, [
327
- vue.createVNode(document.default)
332
+ vue.createVNode(document_vue_vue_type_script_setup_true_lang.default)
328
333
  ], 2),
329
334
  vue.createElementVNode("span", {
330
335
  class: vue.normalizeClass(vue.unref(cs).z("list-li-value-document-text"))
@@ -342,22 +347,22 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
342
347
  vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).views, {
343
348
  type: vue.unref(props).type,
344
349
  accept: accept.value,
345
- value: views$1.value,
346
- show: views$1.show,
347
- onClose: _cache[1] || (_cache[1] = ($event) => views$1.show = false)
350
+ value: views.value,
351
+ show: views.show,
352
+ onClose: _cache[1] || (_cache[1] = ($event) => views.show = false)
348
353
  }, () => [
349
354
  vue.createVNode(vue.unref(index$9.BoxAdjust), {
350
355
  isMax: "",
351
- modelValue: views$1.show,
352
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => views$1.show = $event)
356
+ modelValue: views.show,
357
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => views.show = $event)
353
358
  }, {
354
359
  default: vue.withCtx(() => {
355
360
  var _a, _b, _c;
356
361
  return [
357
362
  (vue.openBlock(), vue.createBlock(vue.unref(index$a.Iframe), {
358
- title: (_a = views$1.value) == null ? void 0 : _a.url,
359
- key: (_b = views$1.value) == null ? void 0 : _b.url,
360
- url: (_c = views$1.value) == null ? void 0 : _c.url
363
+ title: (_a = views.value) == null ? void 0 : _a.url,
364
+ key: (_b = views.value) == null ? void 0 : _b.url,
365
+ url: (_c = views.value) == null ? void 0 : _c.url
361
366
  }, null, 8, ["title", "url"]))
362
367
  ];
363
368
  }),
@@ -388,7 +393,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
388
393
  }, [
389
394
  vue.createVNode(vue.unref(index$7.Icon), null, {
390
395
  default: vue.withCtx(() => [
391
- !isloading.value ? (vue.openBlock(), vue.createBlock(plus.default, { key: 0 })) : vue.createCommentVNode("", true)
396
+ !isloading.value ? (vue.openBlock(), vue.createBlock(plus_vue_vue_type_script_setup_true_lang.default, { key: 0 })) : vue.createCommentVNode("", true)
392
397
  ]),
393
398
  _: 1
394
399
  })
@@ -1,9 +1,9 @@
1
1
  import { defineComponent, ref, useAttrs, computed, watch, reactive, createElementBlock, openBlock, mergeProps, unref, createElementVNode, createBlock, createCommentVNode, normalizeClass, Fragment, renderList, renderSlot, normalizeStyle, createVNode, withCtx, toDisplayString } from "vue";
2
- import Document from "../../../icons/vue/document.js";
3
- import Download from "../../../icons/vue/download.js";
4
- import Plus from "../../../icons/vue/plus.js";
5
- import IconViews from "../../../icons/vue/views.js";
6
- import Delete from "../../../icons/vue/delete.js";
2
+ import "../../../icons/vue/document.js";
3
+ import "../../../icons/vue/download.js";
4
+ import "../../../icons/vue/plus.js";
5
+ import "../../../icons/vue/views.js";
6
+ import "../../../icons/vue/delete.js";
7
7
  import { Icon } from "../../icon/index.js";
8
8
  import { Upload } from "../../upload/index.js";
9
9
  import { Message } from "../../message/index.js";
@@ -22,6 +22,11 @@ import { getType, getListType } from "./util.js";
22
22
  import "../../form/index.js";
23
23
  import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
24
24
  import { useDisabled } from "element-plus/es/components/form/index";
25
+ import _sfc_main$1 from "../../../icons/vue/download2.js";
26
+ import _sfc_main$2 from "../../../icons/vue/views2.js";
27
+ import _sfc_main$3 from "../../../icons/vue/delete2.js";
28
+ import _sfc_main$4 from "../../../icons/vue/document2.js";
29
+ import _sfc_main$5 from "../../../icons/vue/plus2.js";
25
30
  const _hoisted_1 = ["onMouseenter"];
26
31
  const _hoisted_2 = ["title"];
27
32
  const _hoisted_3 = ["onClick", "title"];
@@ -262,7 +267,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
262
267
  }, [
263
268
  createVNode(unref(Icon), null, {
264
269
  default: withCtx(() => [
265
- createVNode(Download)
270
+ createVNode(_sfc_main$1)
266
271
  ]),
267
272
  _: 1
268
273
  })
@@ -274,7 +279,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
274
279
  }, [
275
280
  createVNode(unref(Icon), null, {
276
281
  default: withCtx(() => [
277
- createVNode(IconViews)
282
+ createVNode(_sfc_main$2)
278
283
  ]),
279
284
  _: 1
280
285
  })
@@ -287,7 +292,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
287
292
  }, [
288
293
  createVNode(unref(Icon), null, {
289
294
  default: withCtx(() => [
290
- createVNode(Delete)
295
+ createVNode(_sfc_main$3)
291
296
  ]),
292
297
  _: 1
293
298
  })
@@ -322,7 +327,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
322
327
  createElementVNode("span", {
323
328
  class: normalizeClass(unref(cs).z("list-li-value-document-bg"))
324
329
  }, [
325
- createVNode(Document)
330
+ createVNode(_sfc_main$4)
326
331
  ], 2),
327
332
  createElementVNode("span", {
328
333
  class: normalizeClass(unref(cs).z("list-li-value-document-text"))
@@ -386,7 +391,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
386
391
  }, [
387
392
  createVNode(unref(Icon), null, {
388
393
  default: withCtx(() => [
389
- !isloading.value ? (openBlock(), createBlock(Plus, { key: 0 })) : createCommentVNode("", true)
394
+ !isloading.value ? (openBlock(), createBlock(_sfc_main$5, { key: 0 })) : createCommentVNode("", true)
390
395
  ]),
391
396
  _: 1
392
397
  })