@fangzhongya/fang-ui 0.1.54 → 0.1.56

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 (322) 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/src/index2.cjs +3 -2
  20. package/dist/components/edit/src/index2.js +3 -2
  21. package/dist/components/edit-data/src/area/array-json2.cjs +8 -4
  22. package/dist/components/edit-data/src/area/array-json2.js +8 -4
  23. package/dist/components/edit-data/src/area/array2.cjs +46 -8
  24. package/dist/components/edit-data/src/area/array2.js +47 -9
  25. package/dist/components/edit-data/src/area/editor2.cjs +22 -4
  26. package/dist/components/edit-data/src/area/editor2.js +22 -4
  27. package/dist/components/edit-data/src/area/general2.cjs +8 -1
  28. package/dist/components/edit-data/src/area/general2.js +8 -1
  29. package/dist/components/edit-data/src/area/object-json2.cjs +5 -1
  30. package/dist/components/edit-data/src/area/object-json2.js +5 -1
  31. package/dist/components/edit-data/src/area/object2.cjs +48 -11
  32. package/dist/components/edit-data/src/area/object2.js +49 -12
  33. package/dist/components/edit-data/src/data/array2.cjs +9 -5
  34. package/dist/components/edit-data/src/data/array2.js +9 -5
  35. package/dist/components/edit-data/src/data/bigint2.cjs +7 -3
  36. package/dist/components/edit-data/src/data/bigint2.js +7 -3
  37. package/dist/components/edit-data/src/data/boolean2.cjs +7 -3
  38. package/dist/components/edit-data/src/data/boolean2.js +7 -3
  39. package/dist/components/edit-data/src/data/date.cjs +4 -0
  40. package/dist/components/edit-data/src/data/date.js +4 -0
  41. package/dist/components/edit-data/src/data/date2.cjs +48 -0
  42. package/dist/components/edit-data/src/data/date2.js +48 -0
  43. package/dist/components/edit-data/src/data/function2.cjs +16 -7
  44. package/dist/components/edit-data/src/data/function2.js +17 -8
  45. package/dist/components/edit-data/src/data/null2.cjs +3 -1
  46. package/dist/components/edit-data/src/data/null2.js +4 -2
  47. package/dist/components/edit-data/src/data/number2.cjs +7 -3
  48. package/dist/components/edit-data/src/data/number2.js +7 -3
  49. package/dist/components/edit-data/src/data/object2.cjs +9 -5
  50. package/dist/components/edit-data/src/data/object2.js +9 -5
  51. package/dist/components/edit-data/src/data/other2.cjs +13 -5
  52. package/dist/components/edit-data/src/data/other2.js +14 -6
  53. package/dist/components/edit-data/src/data/string2.cjs +7 -3
  54. package/dist/components/edit-data/src/data/string2.js +7 -3
  55. package/dist/components/edit-data/src/data/symbol2.cjs +7 -3
  56. package/dist/components/edit-data/src/data/symbol2.js +7 -3
  57. package/dist/components/edit-data/src/data/undefined2.cjs +3 -1
  58. package/dist/components/edit-data/src/data/undefined2.js +4 -2
  59. package/dist/components/edit-data/src/data.cjs +10 -0
  60. package/dist/components/edit-data/src/data.d.ts +20 -0
  61. package/dist/components/edit-data/src/data.js +10 -0
  62. package/dist/components/edit-data/src/index2.cjs +31 -2
  63. package/dist/components/edit-data/src/index2.js +45 -16
  64. package/dist/components/edit-data-add/src/index2.cjs +2 -0
  65. package/dist/components/edit-data-add/src/index2.js +2 -0
  66. package/dist/components/edit-float/src/index2.cjs +3 -2
  67. package/dist/components/edit-float/src/index2.js +3 -2
  68. package/dist/components/forms/src/setup.cjs +1 -1
  69. package/dist/components/forms/src/setup.js +1 -1
  70. package/dist/components/forms/src/util.cjs +1 -1
  71. package/dist/components/forms/src/util.js +1 -1
  72. package/dist/components/forms-div/src/index2.cjs +1 -1
  73. package/dist/components/forms-div/src/index2.js +1 -1
  74. package/dist/components/forms-item/src/index2.cjs +1 -1
  75. package/dist/components/forms-item/src/index2.js +1 -1
  76. package/dist/components/forms-item/src/label.cjs +1 -1
  77. package/dist/components/forms-item/src/label.js +1 -1
  78. package/dist/components/forms-items/src/index2.cjs +1 -1
  79. package/dist/components/forms-items/src/index2.js +1 -1
  80. package/dist/components/history/src/index2.cjs +6 -4
  81. package/dist/components/history/src/index2.js +6 -4
  82. package/dist/components/input-array/src/index2.cjs +3 -2
  83. package/dist/components/input-array/src/index2.js +3 -2
  84. package/dist/components/input-history/src/index2.cjs +3 -2
  85. package/dist/components/input-history/src/index2.js +3 -2
  86. package/dist/components/input-select/src/index2.cjs +6 -4
  87. package/dist/components/input-select/src/index2.js +6 -4
  88. package/dist/components/labels/src/data.d.ts +5 -5
  89. package/dist/components/list/index.scss +1 -1
  90. package/dist/components/list/src/index2.cjs +9 -9
  91. package/dist/components/list/src/index2.js +9 -9
  92. package/dist/components/list/src/util.cjs +1 -1
  93. package/dist/components/list/src/util.js +1 -1
  94. package/dist/components/listsp/src/index2.cjs +1 -1
  95. package/dist/components/listsp/src/index2.js +1 -1
  96. package/dist/components/listspd/src/index2.cjs +1 -1
  97. package/dist/components/listspd/src/index2.js +1 -1
  98. package/dist/components/message/index.d.ts +11 -4
  99. package/dist/components/message/src/function.d.ts +11 -4
  100. package/dist/components/message-box/index.d.ts +2 -3
  101. package/dist/components/message-box/src/function.d.ts +2 -3
  102. package/dist/components/retract/index.css +23 -20
  103. package/dist/components/retract/index.scss +39 -20
  104. package/dist/components/retract/src/data.cjs +4 -1
  105. package/dist/components/retract/src/data.d.ts +4 -1
  106. package/dist/components/retract/src/data.js +4 -1
  107. package/dist/components/retract/src/index2.cjs +12 -10
  108. package/dist/components/retract/src/index2.js +9 -7
  109. package/dist/components/right-key/index.css +2 -1
  110. package/dist/components/right-key/index.scss +2 -1
  111. package/dist/components/right-key/src/data.cjs +7 -2
  112. package/dist/components/right-key/src/data.d.ts +5 -0
  113. package/dist/components/right-key/src/data.js +7 -2
  114. package/dist/components/right-key/src/index2.cjs +134 -60
  115. package/dist/components/right-key/src/index2.js +135 -61
  116. package/dist/components/selects/src/data.d.ts +5 -5
  117. package/dist/components/stick-window/src/index2.cjs +3 -2
  118. package/dist/components/stick-window/src/index2.js +3 -2
  119. package/dist/components/switchs/src/data.d.ts +5 -4
  120. package/dist/components/tables/index.scss +1 -1
  121. package/dist/components/tables/src/column.cjs +2 -2
  122. package/dist/components/tables/src/column.js +2 -2
  123. package/dist/components/tables/src/columns2.cjs +10 -10
  124. package/dist/components/tables/src/columns2.js +10 -10
  125. package/dist/components/tables/src/index2.cjs +1 -1
  126. package/dist/components/tables/src/index2.js +1 -1
  127. package/dist/components/{tables → tableset}/common/pagin.d.ts +1 -1
  128. package/dist/components/tablesp/src/index2.cjs +1 -1
  129. package/dist/components/tablesp/src/index2.js +1 -1
  130. package/dist/components/tablespd/src/index2.cjs +1 -1
  131. package/dist/components/tablespd/src/index2.js +1 -1
  132. package/dist/components/tabless/src/index2.cjs +1 -1
  133. package/dist/components/tabless/src/index2.js +1 -1
  134. package/dist/components/tablesv/src/column.cjs +2 -2
  135. package/dist/components/tablesv/src/column.js +2 -2
  136. package/dist/components/tablesv/src/columns2.cjs +8 -8
  137. package/dist/components/tablesv/src/columns2.js +8 -8
  138. package/dist/components/tablesv/src/columns3.cjs +1 -1
  139. package/dist/components/tablesv/src/columns3.js +1 -1
  140. package/dist/components/tablesv/src/index2.cjs +1 -1
  141. package/dist/components/tablesv/src/index2.js +1 -1
  142. package/dist/components/tablesvp/src/index2.cjs +1 -1
  143. package/dist/components/tablesvp/src/index2.js +1 -1
  144. package/dist/components/tablesvpd/src/index2.cjs +1 -1
  145. package/dist/components/tablesvpd/src/index2.js +1 -1
  146. package/dist/components/uploads/src/data.d.ts +5 -5
  147. package/dist/components/uploads/src/index2.cjs +26 -21
  148. package/dist/components/uploads/src/index2.js +15 -10
  149. package/dist/components/videos/src/index2.cjs +30 -19
  150. package/dist/components/videos/src/index2.js +30 -19
  151. package/dist/components/window/src/index2.cjs +9 -6
  152. package/dist/components/window/src/index2.js +9 -6
  153. package/dist/css/index.css +25 -21
  154. package/dist/css/retract.css +23 -20
  155. package/dist/css/right-key.css +2 -1
  156. package/dist/hooks/model/index.cjs +25 -0
  157. package/dist/hooks/model/index.d.ts +2 -0
  158. package/dist/hooks/model/index.js +25 -0
  159. package/dist/icons/index.json +1 -1
  160. package/dist/icons/vue/bar.cjs +2 -18
  161. package/dist/icons/vue/bar.js +1 -17
  162. package/dist/icons/vue/bar2.cjs +21 -2
  163. package/dist/icons/vue/bar2.js +21 -2
  164. package/dist/icons/vue/below.cjs +2 -18
  165. package/dist/icons/vue/below.js +1 -17
  166. package/dist/icons/vue/below2.cjs +21 -2
  167. package/dist/icons/vue/below2.js +21 -2
  168. package/dist/icons/vue/bicycle.cjs +2 -15
  169. package/dist/icons/vue/bicycle.js +1 -14
  170. package/dist/icons/vue/bicycle2.cjs +18 -2
  171. package/dist/icons/vue/bicycle2.js +18 -2
  172. package/dist/icons/vue/bottom-left.cjs +2 -22
  173. package/dist/icons/vue/bottom-left.js +1 -21
  174. package/dist/icons/vue/bottom-left2.cjs +25 -2
  175. package/dist/icons/vue/bottom-left2.js +25 -2
  176. package/dist/icons/vue/bottom-right.cjs +2 -22
  177. package/dist/icons/vue/bottom-right.js +1 -21
  178. package/dist/icons/vue/bottom-right2.cjs +25 -2
  179. package/dist/icons/vue/bottom-right2.js +25 -2
  180. package/dist/icons/vue/bottom.cjs +2 -18
  181. package/dist/icons/vue/bottom.js +1 -17
  182. package/dist/icons/vue/bottom2.cjs +21 -2
  183. package/dist/icons/vue/bottom2.js +21 -2
  184. package/dist/icons/vue/catalogue.cjs +2 -23
  185. package/dist/icons/vue/catalogue.js +1 -22
  186. package/dist/icons/vue/catalogue2.cjs +26 -2
  187. package/dist/icons/vue/catalogue2.js +26 -2
  188. package/dist/icons/vue/clear.cjs +2 -23
  189. package/dist/icons/vue/clear.js +1 -22
  190. package/dist/icons/vue/clear2.cjs +26 -2
  191. package/dist/icons/vue/clear2.js +26 -2
  192. package/dist/icons/vue/close.cjs +2 -18
  193. package/dist/icons/vue/close.js +1 -17
  194. package/dist/icons/vue/close2.cjs +21 -2
  195. package/dist/icons/vue/close2.js +21 -2
  196. package/dist/icons/vue/delete.cjs +2 -18
  197. package/dist/icons/vue/delete.js +1 -17
  198. package/dist/icons/vue/delete2.cjs +21 -2
  199. package/dist/icons/vue/delete2.js +21 -2
  200. package/dist/icons/vue/document.cjs +2 -23
  201. package/dist/icons/vue/document.js +1 -22
  202. package/dist/icons/vue/document2.cjs +26 -2
  203. package/dist/icons/vue/document2.js +26 -2
  204. package/dist/icons/vue/down.cjs +2 -18
  205. package/dist/icons/vue/down.js +1 -17
  206. package/dist/icons/vue/down2.cjs +21 -2
  207. package/dist/icons/vue/down2.js +21 -2
  208. package/dist/icons/vue/download.cjs +2 -18
  209. package/dist/icons/vue/download.js +1 -17
  210. package/dist/icons/vue/download2.cjs +21 -2
  211. package/dist/icons/vue/download2.js +21 -2
  212. package/dist/icons/vue/edit.cjs +2 -23
  213. package/dist/icons/vue/edit.js +1 -22
  214. package/dist/icons/vue/edit2.cjs +26 -2
  215. package/dist/icons/vue/edit2.js +26 -2
  216. package/dist/icons/vue/enter.cjs +2 -19
  217. package/dist/icons/vue/enter.js +1 -18
  218. package/dist/icons/vue/enter2.cjs +22 -2
  219. package/dist/icons/vue/enter2.js +22 -2
  220. package/dist/icons/vue/frame.cjs +2 -15
  221. package/dist/icons/vue/frame.js +1 -14
  222. package/dist/icons/vue/frame2.cjs +18 -2
  223. package/dist/icons/vue/frame2.js +18 -2
  224. package/dist/icons/vue/index.cjs +81 -54
  225. package/dist/icons/vue/index.js +54 -27
  226. package/dist/icons/vue/left.cjs +2 -18
  227. package/dist/icons/vue/left.js +1 -17
  228. package/dist/icons/vue/left2.cjs +21 -2
  229. package/dist/icons/vue/left2.js +21 -2
  230. package/dist/icons/vue/mute.cjs +2 -18
  231. package/dist/icons/vue/mute.js +1 -17
  232. package/dist/icons/vue/mute2.cjs +21 -2
  233. package/dist/icons/vue/mute2.js +21 -2
  234. package/dist/icons/vue/pause.cjs +2 -24
  235. package/dist/icons/vue/pause.js +1 -23
  236. package/dist/icons/vue/pause2.cjs +27 -2
  237. package/dist/icons/vue/pause2.js +27 -2
  238. package/dist/icons/vue/play.cjs +2 -19
  239. package/dist/icons/vue/play.js +1 -18
  240. package/dist/icons/vue/play2.cjs +22 -2
  241. package/dist/icons/vue/play2.js +22 -2
  242. package/dist/icons/vue/plus.cjs +2 -18
  243. package/dist/icons/vue/plus.js +1 -17
  244. package/dist/icons/vue/plus2.cjs +21 -2
  245. package/dist/icons/vue/plus2.js +21 -2
  246. package/dist/icons/vue/retreat.cjs +2 -19
  247. package/dist/icons/vue/retreat.js +1 -18
  248. package/dist/icons/vue/retreat2.cjs +22 -2
  249. package/dist/icons/vue/retreat2.js +22 -2
  250. package/dist/icons/vue/right.cjs +2 -18
  251. package/dist/icons/vue/right.js +1 -17
  252. package/dist/icons/vue/right2.cjs +21 -2
  253. package/dist/icons/vue/right2.js +21 -2
  254. package/dist/icons/vue/sound.cjs +2 -22
  255. package/dist/icons/vue/sound.js +1 -21
  256. package/dist/icons/vue/sound2.cjs +25 -2
  257. package/dist/icons/vue/sound2.js +25 -2
  258. package/dist/icons/vue/star.cjs +2 -22
  259. package/dist/icons/vue/star.js +1 -21
  260. package/dist/icons/vue/star2.cjs +25 -2
  261. package/dist/icons/vue/star2.js +25 -2
  262. package/dist/icons/vue/up.cjs +2 -18
  263. package/dist/icons/vue/up.js +1 -17
  264. package/dist/icons/vue/up2.cjs +21 -2
  265. package/dist/icons/vue/up2.js +21 -2
  266. package/dist/icons/vue/views.cjs +2 -18
  267. package/dist/icons/vue/views.js +1 -17
  268. package/dist/icons/vue/views2.cjs +21 -2
  269. package/dist/icons/vue/views2.js +21 -2
  270. package/dist/index.css +25 -21
  271. package/dist/utils/vues/index.d.ts +1 -0
  272. package/dist/utils/vues/shared.cjs +19 -0
  273. package/dist/utils/vues/shared.d.ts +5 -0
  274. package/dist/utils/vues/shared.js +19 -0
  275. package/package.json +9 -10
  276. package/dist/_virtual/_plugin-vue_export-helper.cjs +0 -10
  277. package/dist/_virtual/_plugin-vue_export-helper.js +0 -10
  278. /package/dist/components/{box-fun → box}/index.css +0 -0
  279. /package/dist/components/{edit-data → edit-data-add}/index.css +0 -0
  280. /package/dist/components/{forms → formset}/common/config.cjs +0 -0
  281. /package/dist/components/{forms → formset}/common/config.d.ts +0 -0
  282. /package/dist/components/{forms → formset}/common/config.js +0 -0
  283. /package/dist/components/{global-config → keep-com}/index.css +0 -0
  284. /package/dist/components/{tables → tableset}/common/com-but.cjs +0 -0
  285. /package/dist/components/{tables → tableset}/common/com-but.js +0 -0
  286. /package/dist/components/{tables → tableset}/common/com-but2.cjs +0 -0
  287. /package/dist/components/{tables → tableset}/common/com-but2.js +0 -0
  288. /package/dist/components/{tables → tableset}/common/com-color.cjs +0 -0
  289. /package/dist/components/{tables → tableset}/common/com-color.js +0 -0
  290. /package/dist/components/{tables → tableset}/common/com-color2.cjs +0 -0
  291. /package/dist/components/{tables → tableset}/common/com-color2.js +0 -0
  292. /package/dist/components/{tables → tableset}/common/com-fig.cjs +0 -0
  293. /package/dist/components/{tables → tableset}/common/com-fig.js +0 -0
  294. /package/dist/components/{tables → tableset}/common/com-fig2.cjs +0 -0
  295. /package/dist/components/{tables → tableset}/common/com-fig2.js +0 -0
  296. /package/dist/components/{tables → tableset}/common/com-limit.cjs +0 -0
  297. /package/dist/components/{tables → tableset}/common/com-limit.js +0 -0
  298. /package/dist/components/{tables → tableset}/common/com-limit2.cjs +0 -0
  299. /package/dist/components/{tables → tableset}/common/com-limit2.js +0 -0
  300. /package/dist/components/{tables → tableset}/common/com-lis.cjs +0 -0
  301. /package/dist/components/{tables → tableset}/common/com-lis.js +0 -0
  302. /package/dist/components/{tables → tableset}/common/com-lis2.cjs +0 -0
  303. /package/dist/components/{tables → tableset}/common/com-lis2.js +0 -0
  304. /package/dist/components/{tables → tableset}/common/com.scss +0 -0
  305. /package/dist/components/{tables → tableset}/common/config.cjs +0 -0
  306. /package/dist/components/{tables → tableset}/common/config.d.ts +0 -0
  307. /package/dist/components/{tables → tableset}/common/config.js +0 -0
  308. /package/dist/components/{tables → tableset}/common/empty.cjs +0 -0
  309. /package/dist/components/{tables → tableset}/common/empty.js +0 -0
  310. /package/dist/components/{tables → tableset}/common/empty2.cjs +0 -0
  311. /package/dist/components/{tables → tableset}/common/empty2.js +0 -0
  312. /package/dist/components/{tables → tableset}/common/pagin.cjs +0 -0
  313. /package/dist/components/{tables → tableset}/common/pagin.js +0 -0
  314. /package/dist/components/{tables → tableset}/common/tooltip.cjs +0 -0
  315. /package/dist/components/{tables → tableset}/common/tooltip.d.ts +0 -0
  316. /package/dist/components/{tables → tableset}/common/tooltip.js +0 -0
  317. /package/dist/components/{tables → tableset}/common/util.cjs +0 -0
  318. /package/dist/components/{tables → tableset}/common/util.d.ts +0 -0
  319. /package/dist/components/{tables → tableset}/common/util.js +0 -0
  320. /package/dist/css/{box-fun.css → box.css} +0 -0
  321. /package/dist/css/{edit-data.css → edit-data-add.css} +0 -0
  322. /package/dist/css/{global-config.css → keep-com.css} +0 -0
@@ -3,6 +3,9 @@
3
3
  $retract: 'retract';
4
4
  @include b($retract) {
5
5
  position: relative;
6
+ #{vdm('width', $retract)}: 12px;
7
+ #{vdm('height', $retract)}: 40px;
8
+ #{vdm('width-adjust', $retract)}: 8px;
6
9
  &-div {
7
10
  &.left,
8
11
  &.right {
@@ -34,12 +37,16 @@ $retract: 'retract';
34
37
  }
35
38
  &.is-left {
36
39
  top: 50%;
37
- width: 20px;
38
- height: 50px;
39
- margin-top: -25px;
40
- left: -20px;
40
+ height: var(#{vdm('height', $retract)});
41
+ margin-top: calc(var(#{vdm('height', $retract)}) / 2 * -1);
42
+ width: var(#{vdm('width', $retract)});
43
+ left: calc(0 - var(#{vdm('width', $retract)}));
41
44
  &.#{is('adjust')} {
42
- left: -10px;
45
+ left: calc(
46
+ var(#{vdm('width-adjust', $retract)}) - var(
47
+ #{vdm('width', $retract)}
48
+ )
49
+ );
43
50
  }
44
51
  .#{$retract}-icon {
45
52
  transform: rotate(0);
@@ -50,12 +57,16 @@ $retract: 'retract';
50
57
  }
51
58
  &.is-right {
52
59
  top: 50%;
53
- width: 20px;
54
- height: 50px;
55
- margin-top: -25px;
56
- right: -20px;
60
+ height: var(#{vdm('height', $retract)});
61
+ margin-top: calc(var(#{vdm('height', $retract)}) / 2 * -1);
62
+ width: var(#{vdm('width', $retract)});
63
+ right: calc(0 - var(#{vdm('width', $retract)}));
57
64
  &.#{is('adjust')} {
58
- right: -10px;
65
+ right: calc(
66
+ var(#{vdm('width-adjust', $retract)}) - var(
67
+ #{vdm('width', $retract)}
68
+ )
69
+ );
59
70
  }
60
71
  .#{$retract}-icon {
61
72
  transform: rotate(-180deg);
@@ -66,12 +77,16 @@ $retract: 'retract';
66
77
  }
67
78
  &.is-top {
68
79
  left: 50%;
69
- width: 50px;
70
- height: 20px;
71
- margin-left: -25px;
72
- top: -20px;
80
+ width: var(#{vdm('height', $retract)});
81
+ margin-left: calc(var(#{vdm('height', $retract)}) / 2 * -1);
82
+ height: var(#{vdm('width', $retract)});
83
+ top: calc(0 - var(#{vdm('width', $retract)}));
73
84
  &.#{is('adjust')} {
74
- top: -10px;
85
+ top: calc(
86
+ var(#{vdm('width-adjust', $retract)}) - var(
87
+ #{vdm('width', $retract)}
88
+ )
89
+ );
75
90
  }
76
91
  .#{$retract}-icon {
77
92
  transform: rotate(90deg);
@@ -82,12 +97,16 @@ $retract: 'retract';
82
97
  }
83
98
  &.is-bottom {
84
99
  left: 50%;
85
- width: 50px;
86
- height: 20px;
87
- margin-left: -25px;
88
- bottom: -20px;
100
+ width: var(#{vdm('height', $retract)});
101
+ margin-left: calc(var(#{vdm('height', $retract)}) / 2 * -1);
102
+ height: var(#{vdm('width', $retract)});
103
+ bottom: calc(0 - var(#{vdm('width', $retract)}));
89
104
  &.#{is('adjust')} {
90
- bottom: -10px;
105
+ bottom: calc(
106
+ var(#{vdm('width-adjust', $retract)}) - var(
107
+ #{vdm('width', $retract)}
108
+ )
109
+ );
91
110
  }
92
111
  .#{$retract}-icon {
93
112
  transform: rotate(-90deg);
@@ -20,9 +20,12 @@ const dataProps = buildProps.buildProps({
20
20
  },
21
21
  isAdjust: {
22
22
  type: Boolean
23
+ },
24
+ modelValue: {
25
+ type: Boolean
23
26
  }
24
27
  });
25
- const dataEmits = {};
28
+ const dataEmits = ["update:modelValue"];
26
29
  const dataSlot = {
27
30
  default: "default",
28
31
  icon: "icon"
@@ -23,11 +23,14 @@ export declare const dataProps: {
23
23
  isAdjust: {
24
24
  type: BooleanConstructor;
25
25
  };
26
+ modelValue: {
27
+ type: BooleanConstructor;
28
+ };
26
29
  };
27
30
  export type DataProps = ExtractPropTypes<typeof dataProps>;
28
31
  /**
29
32
  */
30
- export declare const dataEmits: {};
33
+ export declare const dataEmits: string[];
31
34
  export type DataEmits = typeof dataEmits;
32
35
  /**
33
36
  * @slot default 默认插槽
@@ -18,9 +18,12 @@ const dataProps = buildProps({
18
18
  },
19
19
  isAdjust: {
20
20
  type: Boolean
21
+ },
22
+ modelValue: {
23
+ type: Boolean
21
24
  }
22
25
  });
23
- const dataEmits = {};
26
+ const dataEmits = ["update:modelValue"];
24
27
  const dataSlot = {
25
28
  default: "default",
26
29
  icon: "icon"
@@ -1,13 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const index$4 = require("../../icon/index.cjs");
5
- const right = require("../../../icons/vue/right.cjs");
6
- const index$3 = require("../../../directives/adjustment/index.cjs");
4
+ const index$5 = require("../../icon/index.cjs");
5
+ require("../../../icons/vue/right.cjs");
6
+ const index$4 = require("../../../directives/adjustment/index.cjs");
7
7
  const data = require("./data.cjs");
8
8
  const index$1 = require("../../../hooks/cssname/index.cjs");
9
9
  const index = require("../../../hooks/locale/index.cjs");
10
10
  const index$2 = require("../../../hooks/props-default/index.cjs");
11
+ const index$3 = require("../../../hooks/model/index.cjs");
12
+ const right_vue_vue_type_script_setup_true_lang = require("../../../icons/vue/right2.cjs");
11
13
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
12
14
  __name: "index",
13
15
  props: index$2.getProps(data.dataProps),
@@ -18,7 +20,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
18
20
  const prs = __props;
19
21
  const props = index$2.usePropsDefault(data.name, prs, data.dataProps);
20
22
  const emit = __emit;
21
- const visible = vue.ref(false);
23
+ const visible = index$3.useModel(props, emit);
22
24
  function onClick() {
23
25
  visible.value = !visible.value;
24
26
  }
@@ -34,13 +36,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
34
36
  }, [
35
37
  vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).default)
36
38
  ], 2)), [
37
- [vue.vShow, !visible.value],
38
- [vue.unref(index$3.default), {
39
+ [vue.vShow, !vue.unref(visible)],
40
+ [vue.unref(index$4.default), {
39
41
  is: vue.unref(props).isAdjust,
40
42
  often: vue.unref(props).often,
41
43
  dom: "div",
42
44
  [vue.unref(props).direction]: {
43
- interval: 10
45
+ interval: 8
44
46
  // adjoin: 'div',
45
47
  }
46
48
  }]
@@ -53,12 +55,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
53
55
  vue.unref(cs).is(vue.unref(props).direction, true)
54
56
  ])
55
57
  }, [
56
- vue.createVNode(vue.unref(index$4.Icon), {
57
- class: vue.normalizeClass([vue.unref(cs).z("icon"), vue.unref(cs).is("reverse", visible.value)])
58
+ vue.createVNode(vue.unref(index$5.Icon), {
59
+ class: vue.normalizeClass([vue.unref(cs).z("icon"), vue.unref(cs).is("reverse", vue.unref(visible))])
58
60
  }, {
59
61
  default: vue.withCtx(() => [
60
62
  vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).icon, {}, () => [
61
- vue.createVNode(right.default)
63
+ vue.createVNode(right_vue_vue_type_script_setup_true_lang.default)
62
64
  ])
63
65
  ]),
64
66
  _: 3
@@ -1,11 +1,13 @@
1
- import { defineComponent, ref, createElementBlock, openBlock, normalizeClass, unref, withDirectives, createElementVNode, renderSlot, vShow, withModifiers, createVNode, withCtx } from "vue";
1
+ import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, withDirectives, createElementVNode, renderSlot, vShow, withModifiers, createVNode, withCtx } from "vue";
2
2
  import { Icon } from "../../icon/index.js";
3
- import Right from "../../../icons/vue/right.js";
3
+ import "../../../icons/vue/right.js";
4
4
  import vAdjustment from "../../../directives/adjustment/index.js";
5
5
  import { name, dataProps, dataExpose, dataSlot, dataEmits } from "./data.js";
6
6
  import { useCssName } from "../../../hooks/cssname/index.js";
7
7
  import { useLocale } from "../../../hooks/locale/index.js";
8
8
  import { usePropsDefault, getProps } from "../../../hooks/props-default/index.js";
9
+ import { useModel } from "../../../hooks/model/index.js";
10
+ import _sfc_main$1 from "../../../icons/vue/right2.js";
9
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
12
  __name: "index",
11
13
  props: getProps(dataProps),
@@ -16,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
18
  const prs = __props;
17
19
  const props = usePropsDefault(name, prs, dataProps);
18
20
  const emit = __emit;
19
- const visible = ref(false);
21
+ const visible = useModel(props, emit);
20
22
  function onClick() {
21
23
  visible.value = !visible.value;
22
24
  }
@@ -32,13 +34,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
34
  }, [
33
35
  renderSlot(_ctx.$slots, unref(dataSlot).default)
34
36
  ], 2)), [
35
- [vShow, !visible.value],
37
+ [vShow, !unref(visible)],
36
38
  [unref(vAdjustment), {
37
39
  is: unref(props).isAdjust,
38
40
  often: unref(props).often,
39
41
  dom: "div",
40
42
  [unref(props).direction]: {
41
- interval: 10
43
+ interval: 8
42
44
  // adjoin: 'div',
43
45
  }
44
46
  }]
@@ -52,11 +54,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
52
54
  ])
53
55
  }, [
54
56
  createVNode(unref(Icon), {
55
- class: normalizeClass([unref(cs).z("icon"), unref(cs).is("reverse", visible.value)])
57
+ class: normalizeClass([unref(cs).z("icon"), unref(cs).is("reverse", unref(visible))])
56
58
  }, {
57
59
  default: withCtx(() => [
58
60
  renderSlot(_ctx.$slots, unref(dataSlot).icon, {}, () => [
59
- createVNode(Right)
61
+ createVNode(_sfc_main$1)
60
62
  ])
61
63
  ]),
62
64
  _: 3
@@ -24,7 +24,7 @@
24
24
 
25
25
  .right-key-box {
26
26
  width: 140px;
27
- position: absolute;
27
+ position: fixed;
28
28
  padding: 10px;
29
29
  z-index: 9999;
30
30
  background: #ffffff;
@@ -40,6 +40,7 @@
40
40
  white-space: nowrap;
41
41
  display: flex;
42
42
  align-items: center;
43
+ box-sizing: border-box;
43
44
  height: 40px;
44
45
  padding: 8px 14px 8px 10px;
45
46
  border-radius: 4px;
@@ -4,7 +4,7 @@ $right-key: 'right-key';
4
4
  @include b($right-key) {
5
5
  &-box {
6
6
  width: 140px;
7
- position: absolute;
7
+ position: fixed;
8
8
  padding: 10px;
9
9
  z-index: 9999;
10
10
  background: #ffffff;
@@ -20,6 +20,7 @@ $right-key: 'right-key';
20
20
  white-space: nowrap;
21
21
  display: flex;
22
22
  align-items: center;
23
+ box-sizing: border-box;
23
24
  height: 40px;
24
25
  padding: 8px 14px 8px 10px;
25
26
  border-radius: 4px;
@@ -45,7 +45,7 @@ const dataProps = buildProps.buildProps({
45
45
  */
46
46
  boxClass: {
47
47
  type: [String]
48
- }
48
+ },
49
49
  // /**
50
50
  // * @props { String, Function } prop=value 列表中对比的内容
51
51
  // */
@@ -53,10 +53,15 @@ const dataProps = buildProps.buildProps({
53
53
  // type: [String, Function],
54
54
  // default: 'value',
55
55
  // },
56
+ isSingle: {
57
+ type: Boolean,
58
+ default: false
59
+ }
56
60
  });
57
61
  const dataEmits = ["click-key", "click-right"];
58
62
  const dataSlot = {
59
- default: "default"
63
+ default: "default",
64
+ list: "list"
60
65
  };
61
66
  const dataExpose = {};
62
67
  exports.dataEmits = dataEmits;
@@ -60,6 +60,10 @@ export declare const dataProps: {
60
60
  boxClass: {
61
61
  type: StringConstructor[];
62
62
  };
63
+ isSingle: {
64
+ type: BooleanConstructor;
65
+ default: boolean;
66
+ };
63
67
  to: {
64
68
  type: StringConstructor;
65
69
  default: FunctConfig;
@@ -84,6 +88,7 @@ export type DataEmits = typeof dataEmits;
84
88
  */
85
89
  export declare const dataSlot: {
86
90
  default: string;
91
+ list: string;
87
92
  };
88
93
  /**
89
94
  */
@@ -43,7 +43,7 @@ const dataProps = buildProps({
43
43
  */
44
44
  boxClass: {
45
45
  type: [String]
46
- }
46
+ },
47
47
  // /**
48
48
  // * @props { String, Function } prop=value 列表中对比的内容
49
49
  // */
@@ -51,10 +51,15 @@ const dataProps = buildProps({
51
51
  // type: [String, Function],
52
52
  // default: 'value',
53
53
  // },
54
+ isSingle: {
55
+ type: Boolean,
56
+ default: false
57
+ }
54
58
  });
55
59
  const dataEmits = ["click-key", "click-right"];
56
60
  const dataSlot = {
57
- default: "default"
61
+ default: "default",
62
+ list: "list"
58
63
  };
59
64
  const dataExpose = {};
60
65
  export {
@@ -8,6 +8,7 @@ const index$3 = require("../../box-teleport/index.cjs");
8
8
  const data = require("./data.cjs");
9
9
  const index$1 = require("../../../hooks/cssname/index.cjs");
10
10
  const index = require("../../../hooks/locale/index.cjs");
11
+ const getBoxDom = require("../../../utils/vues/getBoxDom.cjs");
11
12
  const index$2 = require("../../../hooks/props-default/index.cjs");
12
13
  const _hoisted_1 = ["onClick"];
13
14
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
@@ -23,73 +24,145 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
23
24
  const flag = vue.ref(false);
24
25
  const refRightKey = vue.ref();
25
26
  const refRightKeyBox = vue.ref();
26
- const topx = vue.ref("");
27
- const lefty = vue.ref("");
27
+ const position = vue.ref({ x: 0, y: 0 });
28
28
  const dom = vue.ref();
29
- vue.onMounted(() => {
30
- globalThis.addEventListener("mousedown", watchContextmenu);
31
- });
32
- vue.onUnmounted(() => {
33
- globalThis.removeEventListener("mousedown", watchContextmenu);
29
+ const boxStyle = vue.computed(() => {
30
+ if (!refRightKeyBox.value) return {};
31
+ const rect = refRightKeyBox.value.getBoundingClientRect();
32
+ const { innerWidth, innerHeight } = window;
33
+ let x = position.value.x;
34
+ let y = position.value.y;
35
+ if (x + rect.width > innerWidth) {
36
+ x = x - rect.width;
37
+ }
38
+ if (y + rect.height > innerHeight) {
39
+ y = y - rect.height;
40
+ }
41
+ return {
42
+ top: `${y}px`,
43
+ left: `${x}px`
44
+ };
34
45
  });
35
- function watchContextmenu(event) {
36
- if (refRightKeyBox.value.contains(event.target)) {
46
+ function handleGlobalMousedown(event) {
47
+ var _a;
48
+ if ((_a = refRightKeyBox.value) == null ? void 0 : _a.contains(event.target)) {
37
49
  return;
38
50
  }
39
- if (!refRightKey.value.contains(event.target) || event.button !== 2) {
51
+ flag.value = false;
52
+ }
53
+ function handleGlobalClick(event) {
54
+ var _a;
55
+ if (event.button === 2) return;
56
+ if (!((_a = refRightKeyBox.value) == null ? void 0 : _a.contains(event.target))) {
57
+ flag.value = false;
58
+ }
59
+ }
60
+ function handleKeydown(event) {
61
+ if (event.key === "Escape" && flag.value) {
40
62
  flag.value = false;
41
63
  }
42
64
  }
43
65
  function isDomClass(dom2) {
44
- if (dom2) {
45
- if (props.domClass) {
46
- const v = getPrentClass.getPrentClass(
47
- dom2,
48
- props.domClass,
49
- props.level
50
- );
51
- if (v && refRightKey.value.contains(v)) {
52
- return v;
53
- }
54
- } else {
55
- return dom2;
66
+ var _a, _b;
67
+ if (!dom2) return null;
68
+ if (props.domClass) {
69
+ const element = getPrentClass.getPrentClass(
70
+ dom2,
71
+ props.domClass,
72
+ props.level
73
+ );
74
+ if (element && ((_a = refRightKey.value) == null ? void 0 : _a.contains(element))) {
75
+ return element;
56
76
  }
77
+ } else if ((_b = refRightKey.value) == null ? void 0 : _b.contains(dom2)) {
78
+ return dom2;
57
79
  }
80
+ return null;
58
81
  }
59
82
  function handleContextmenu(event) {
60
- let target = event.target;
61
- target = isDomClass(target);
62
- if (target) {
63
- dom.value = target;
64
- let x = 0, y = 0;
65
- if (event.x || event.y) {
66
- x = event.x;
67
- y = event.y;
68
- } else if (event.pageX || event.pageY) {
69
- x = event.pageX - 1;
70
- y = event.pageY - 1;
71
- }
72
- let ww = globalThis ? globalThis.innerWidth : 0;
73
- let kw = 0;
74
- if (ww != 0 && x + 120 > ww) {
75
- kw = 0 - (x + 120 - ww);
76
- }
77
- topx.value = x + kw + "px";
78
- lefty.value = y + "px";
79
- flag.value = true;
80
- event.preventDefault();
81
- event.stopPropagation();
82
- emit("click-right", target);
83
- } else {
83
+ const target = isDomClass(event.target);
84
+ if (!target) {
84
85
  flag.value = false;
86
+ return;
85
87
  }
88
+ dom.value = target;
89
+ let x = event.clientX;
90
+ let y = event.clientY;
91
+ flag.value = true;
92
+ event.preventDefault();
93
+ event.stopPropagation();
94
+ emit("click-right", target);
95
+ vue.nextTick(() => {
96
+ position.value = { x, y };
97
+ });
86
98
  }
87
99
  function onClick(v) {
88
100
  flag.value = false;
89
101
  emit("click-key", v, dom.value);
90
102
  }
103
+ const toDom = vue.ref();
104
+ vue.watch(
105
+ () => flag.value,
106
+ () => {
107
+ if (props.isSingle) {
108
+ if (flag.value) {
109
+ if (toDom.value) {
110
+ toDom.value.querySelectorAll("." + cs.z("box")).forEach((v) => {
111
+ v.style.display = "none";
112
+ });
113
+ }
114
+ vue.nextTick(() => {
115
+ refRightKeyBox.value.style.display = "block";
116
+ });
117
+ } else {
118
+ refRightKeyBox.value.style.display = "none";
119
+ }
120
+ } else {
121
+ refRightKeyBox.value.style.display = flag.value ? "block" : "none";
122
+ }
123
+ }
124
+ );
125
+ vue.onMounted(() => {
126
+ toDom.value = getBoxDom.getBoxDom();
127
+ document.addEventListener("mousedown", handleGlobalMousedown, true);
128
+ document.addEventListener("click", handleGlobalClick, true);
129
+ document.addEventListener("keydown", handleKeydown);
130
+ window.addEventListener("resize", () => {
131
+ if (flag.value) {
132
+ flag.value = false;
133
+ }
134
+ });
135
+ window.addEventListener(
136
+ "scroll",
137
+ () => {
138
+ if (flag.value) {
139
+ flag.value = false;
140
+ }
141
+ },
142
+ true
143
+ );
144
+ });
145
+ vue.onUnmounted(() => {
146
+ document.removeEventListener("mousedown", handleGlobalMousedown, true);
147
+ document.removeEventListener("click", handleGlobalClick, true);
148
+ document.removeEventListener("keydown", handleKeydown);
149
+ window.removeEventListener("resize", () => {
150
+ });
151
+ window.removeEventListener("scroll", () => {
152
+ }, true);
153
+ });
91
154
  __expose({
92
- ...data.dataExpose
155
+ ...data.dataExpose,
156
+ // 提供关闭菜单的方法
157
+ close: () => {
158
+ flag.value = false;
159
+ },
160
+ // 提供打开菜单的方法
161
+ open: (x, y, target) => {
162
+ position.value = { x, y };
163
+ dom.value = target;
164
+ flag.value = true;
165
+ }
93
166
  });
94
167
  return (_ctx, _cache) => {
95
168
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -108,11 +181,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
108
181
  class: vue.normalizeClass([vue.unref(cs).z("box"), vue.unref(props).boxClass]),
109
182
  ref_key: "refRightKeyBox",
110
183
  ref: refRightKeyBox,
111
- style: vue.normalizeStyle({
112
- position: "fixed",
113
- top: lefty.value,
114
- left: topx.value
115
- })
184
+ style: vue.normalizeStyle(boxStyle.value)
116
185
  }, [
117
186
  vue.createElementVNode("div", {
118
187
  class: vue.normalizeClass(vue.unref(cs).z("box-list"))
@@ -123,13 +192,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
123
192
  onClick: vue.withModifiers(($event) => onClick(v), ["stop"]),
124
193
  class: vue.normalizeClass(vue.unref(cs).z("box-list-li"))
125
194
  }, [
126
- v.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.Icon), { key: 0 }, {
127
- default: vue.withCtx(() => [
128
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(v.icon)))
129
- ]),
130
- _: 2
131
- }, 1024)) : vue.createCommentVNode("", true),
132
- vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(use.useVueValue)(v, vue.unref(props).label)), 1)
195
+ vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).list, {
196
+ value: v,
197
+ index: k
198
+ }, () => [
199
+ v.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.Icon), { key: 0 }, {
200
+ default: vue.withCtx(() => [
201
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(v.icon)))
202
+ ]),
203
+ _: 2
204
+ }, 1024)) : vue.createCommentVNode("", true),
205
+ vue.createElementVNode("span", null, vue.toDisplayString(vue.unref(use.useVueValue)(v, vue.unref(props).label)), 1)
206
+ ])
133
207
  ], 10, _hoisted_1);
134
208
  }), 128))
135
209
  ], 2)
@@ -137,7 +211,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
137
211
  [vue.vShow, flag.value]
138
212
  ])
139
213
  ]),
140
- _: 1
214
+ _: 3
141
215
  }, 8, ["disabled", "to"])
142
216
  ], 34);
143
217
  };