vxe-pc-ui 3.0.0-alpha.2 → 3.0.0-alpha.4

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 (813) hide show
  1. package/es/alert/index.js +12 -0
  2. package/es/alert/src/alert.js +99 -0
  3. package/es/alert/style.css +129 -0
  4. package/es/alert/style.min.css +1 -0
  5. package/es/anchor/index.js +12 -0
  6. package/es/anchor/src/anchor-link.js +137 -0
  7. package/es/anchor/src/anchor.js +232 -0
  8. package/es/anchor/src/util.js +19 -0
  9. package/es/anchor/style.css +42 -0
  10. package/es/anchor/style.min.css +1 -0
  11. package/es/anchor-link/index.js +12 -0
  12. package/es/anchor-link/style.css +0 -0
  13. package/es/anchor-link/style.min.css +0 -0
  14. package/es/breadcrumb/index.js +12 -0
  15. package/es/breadcrumb/src/breadcrumb-item.js +101 -0
  16. package/es/breadcrumb/src/breadcrumb.js +76 -0
  17. package/es/breadcrumb/style.css +33 -0
  18. package/es/breadcrumb/style.min.css +1 -0
  19. package/es/breadcrumb-item/index.js +12 -0
  20. package/es/breadcrumb-item/style.css +0 -0
  21. package/es/breadcrumb-item/style.min.css +0 -0
  22. package/es/button/index.js +2 -0
  23. package/es/button/src/button-group.js +1 -1
  24. package/es/button/src/button.js +11 -8
  25. package/es/button/style.css +1 -0
  26. package/es/button/style.min.css +1 -1
  27. package/es/button-group/index.js +2 -0
  28. package/es/card/index.js +12 -0
  29. package/es/card/src/card.js +143 -0
  30. package/es/card/style.css +68 -0
  31. package/es/card/style.min.css +1 -0
  32. package/es/col/index.js +2 -0
  33. package/es/components.js +69 -69
  34. package/es/countdown/index.js +12 -0
  35. package/es/countdown/src/countdown.js +248 -0
  36. package/es/countdown/style.css +38 -0
  37. package/es/countdown/style.min.css +1 -0
  38. package/es/date-picker/index.js +13 -0
  39. package/es/date-picker/src/date-picker.js +2410 -0
  40. package/es/date-picker/src/util.js +41 -0
  41. package/es/date-picker/style.css +900 -0
  42. package/es/date-picker/style.min.css +1 -0
  43. package/es/drawer/index.js +68 -0
  44. package/es/drawer/src/drawer.js +523 -0
  45. package/es/drawer/style.css +237 -0
  46. package/es/drawer/style.min.css +1 -0
  47. package/es/dynamics/index.js +25 -45
  48. package/es/icon/index.js +2 -0
  49. package/es/icon/style.css +2 -1
  50. package/es/icon/style.min.css +1 -1
  51. package/es/image/index.js +12 -0
  52. package/es/image/src/group.js +121 -0
  53. package/es/image/src/image.js +147 -0
  54. package/es/image/src/preview.js +675 -0
  55. package/es/image/src/util.js +46 -0
  56. package/es/image/style.css +0 -0
  57. package/es/image/style.min.css +0 -0
  58. package/es/image-group/index.js +12 -0
  59. package/es/image-group/style.css +3 -0
  60. package/es/image-group/style.min.css +1 -0
  61. package/es/image-preview/index.js +14 -0
  62. package/es/image-preview/style.css +215 -0
  63. package/es/image-preview/style.min.css +1 -0
  64. package/es/layout-aside/index.js +2 -0
  65. package/es/layout-aside/src/layout-aside.js +3 -2
  66. package/es/layout-body/index.js +2 -0
  67. package/es/layout-body/src/layout-body.js +3 -2
  68. package/es/layout-container/index.js +2 -0
  69. package/es/layout-container/src/layout-container.js +3 -2
  70. package/es/layout-footer/index.js +2 -0
  71. package/es/layout-footer/src/layout-footer.js +1 -1
  72. package/es/layout-header/index.js +2 -0
  73. package/es/layout-header/src/layout-header.js +1 -1
  74. package/es/link/index.js +2 -0
  75. package/es/link/src/link.js +1 -1
  76. package/es/loading/index.js +4 -3
  77. package/es/loading/src/loading.js +3 -2
  78. package/es/loading/style.css +1 -0
  79. package/es/loading/style.min.css +1 -1
  80. package/es/menu/index.js +2 -0
  81. package/es/menu/src/menu.js +5 -3
  82. package/es/menu/style.css +1 -0
  83. package/es/menu/style.min.css +1 -1
  84. package/es/modal/index.js +122 -0
  85. package/es/modal/src/modal.js +1435 -0
  86. package/es/modal/style.css +435 -0
  87. package/es/modal/style.min.css +1 -0
  88. package/es/number-input/index.js +12 -0
  89. package/es/number-input/src/number-input.js +872 -0
  90. package/es/number-input/src/util.js +10 -0
  91. package/es/number-input/style.css +948 -0
  92. package/es/number-input/style.min.css +1 -0
  93. package/es/print/index.js +14 -0
  94. package/es/print/src/page-break.js +66 -0
  95. package/es/print/src/print.js +225 -0
  96. package/es/print/src/util.js +160 -0
  97. package/es/print/style.css +4 -0
  98. package/es/print/style.min.css +1 -0
  99. package/es/print-page-break/index.js +10 -0
  100. package/es/print-page-break/style.css +0 -0
  101. package/es/print-page-break/style.min.css +0 -0
  102. package/es/pulldown/index.js +12 -0
  103. package/es/pulldown/src/pulldown.js +459 -0
  104. package/es/pulldown/style.css +94 -0
  105. package/es/pulldown/style.min.css +1 -0
  106. package/es/radio/index.js +2 -0
  107. package/es/radio/src/button.js +6 -3
  108. package/es/radio/src/group.js +4 -2
  109. package/es/radio/src/radio.js +6 -3
  110. package/es/radio/style.css +1 -0
  111. package/es/radio/style.min.css +1 -1
  112. package/es/radio-button/index.js +2 -0
  113. package/es/radio-group/index.js +2 -0
  114. package/es/row/index.js +2 -0
  115. package/es/row/src/col.js +1 -1
  116. package/es/style.css +1 -1
  117. package/es/style.min.css +1 -1
  118. package/es/switch/index.js +2 -0
  119. package/es/switch/src/switch.js +2 -1
  120. package/es/switch/style.css +108 -0
  121. package/es/switch/style.min.css +1 -0
  122. package/es/tag/index.js +2 -0
  123. package/es/tag/src/tag.js +1 -1
  124. package/es/text/index.js +2 -0
  125. package/es/text/src/text.js +1 -1
  126. package/es/text/style.css +1 -0
  127. package/es/text/style.min.css +1 -1
  128. package/es/textarea/index.js +12 -0
  129. package/es/textarea/src/textarea.js +387 -0
  130. package/es/textarea/style.css +111 -0
  131. package/es/textarea/style.min.css +1 -0
  132. package/es/tip/index.js +2 -0
  133. package/es/tip/src/tip.js +1 -1
  134. package/es/tooltip/index.js +12 -0
  135. package/es/tooltip/src/tooltip.js +432 -0
  136. package/es/tooltip/style.css +103 -0
  137. package/es/tooltip/style.min.css +1 -0
  138. package/es/ui/index.js +1 -1
  139. package/es/ui/src/log.js +1 -1
  140. package/es/upload/index.js +15 -0
  141. package/es/upload/src/upload.js +1369 -0
  142. package/es/upload/src/util.js +103 -0
  143. package/es/upload/style.css +394 -0
  144. package/es/upload/style.min.css +1 -0
  145. package/es/vxe-alert/index.js +3 -0
  146. package/es/vxe-alert/style.css +129 -0
  147. package/es/vxe-alert/style.min.css +1 -0
  148. package/es/vxe-anchor/index.js +3 -0
  149. package/es/vxe-anchor/style.css +42 -0
  150. package/es/vxe-anchor/style.min.css +1 -0
  151. package/es/vxe-anchor-link/index.js +3 -0
  152. package/es/vxe-anchor-link/style.css +0 -0
  153. package/es/vxe-anchor-link/style.min.css +0 -0
  154. package/es/vxe-breadcrumb/index.js +3 -0
  155. package/es/vxe-breadcrumb/style.css +33 -0
  156. package/es/vxe-breadcrumb/style.min.css +1 -0
  157. package/es/vxe-breadcrumb-item/index.js +3 -0
  158. package/es/vxe-breadcrumb-item/style.css +0 -0
  159. package/es/vxe-breadcrumb-item/style.min.css +0 -0
  160. package/es/vxe-button/style.css +1 -0
  161. package/es/vxe-button/style.min.css +1 -1
  162. package/es/vxe-card/index.js +3 -0
  163. package/es/vxe-card/style.css +68 -0
  164. package/es/vxe-card/style.min.css +1 -0
  165. package/es/vxe-countdown/index.js +3 -0
  166. package/es/vxe-countdown/style.css +38 -0
  167. package/es/vxe-countdown/style.min.css +1 -0
  168. package/es/vxe-date-picker/index.js +3 -0
  169. package/es/vxe-date-picker/style.css +900 -0
  170. package/es/vxe-date-picker/style.min.css +1 -0
  171. package/es/vxe-drawer/index.js +3 -0
  172. package/es/vxe-drawer/style.css +237 -0
  173. package/es/vxe-drawer/style.min.css +1 -0
  174. package/es/vxe-icon/style.css +1 -0
  175. package/es/vxe-icon/style.min.css +1 -1
  176. package/es/vxe-image/index.js +3 -0
  177. package/es/vxe-image/style.css +0 -0
  178. package/es/vxe-image/style.min.css +0 -0
  179. package/es/vxe-image-group/index.js +3 -0
  180. package/es/vxe-image-group/style.css +3 -0
  181. package/es/vxe-image-group/style.min.css +1 -0
  182. package/es/vxe-image-preview/index.js +3 -0
  183. package/es/vxe-image-preview/style.css +215 -0
  184. package/es/vxe-image-preview/style.min.css +1 -0
  185. package/es/vxe-loading/style.css +1 -0
  186. package/es/vxe-loading/style.min.css +1 -1
  187. package/es/vxe-menu/style.css +1 -0
  188. package/es/vxe-menu/style.min.css +1 -1
  189. package/es/vxe-modal/index.js +3 -0
  190. package/es/vxe-modal/style.css +435 -0
  191. package/es/vxe-modal/style.min.css +1 -0
  192. package/es/vxe-number-input/index.js +3 -0
  193. package/es/vxe-number-input/style.css +948 -0
  194. package/es/vxe-number-input/style.min.css +1 -0
  195. package/es/vxe-print/index.js +3 -0
  196. package/es/vxe-print/style.css +4 -0
  197. package/es/vxe-print/style.min.css +1 -0
  198. package/es/vxe-print-page-break/index.js +3 -0
  199. package/es/vxe-print-page-break/style.css +0 -0
  200. package/es/vxe-print-page-break/style.min.css +0 -0
  201. package/es/vxe-pulldown/index.js +3 -0
  202. package/es/vxe-pulldown/style.css +94 -0
  203. package/es/vxe-pulldown/style.min.css +1 -0
  204. package/es/vxe-radio/style.css +1 -0
  205. package/es/vxe-radio/style.min.css +1 -1
  206. package/es/vxe-switch/index.js +3 -0
  207. package/es/vxe-switch/style.css +108 -0
  208. package/es/vxe-switch/style.min.css +1 -0
  209. package/es/vxe-text/style.css +1 -0
  210. package/es/vxe-text/style.min.css +1 -1
  211. package/es/vxe-textarea/index.js +3 -0
  212. package/es/vxe-textarea/style.css +111 -0
  213. package/es/vxe-textarea/style.min.css +1 -0
  214. package/es/vxe-tooltip/index.js +3 -0
  215. package/es/vxe-tooltip/style.css +103 -0
  216. package/es/vxe-tooltip/style.min.css +1 -0
  217. package/es/vxe-upload/index.js +3 -0
  218. package/es/vxe-upload/style.css +394 -0
  219. package/es/vxe-upload/style.min.css +1 -0
  220. package/lib/alert/index.js +19 -0
  221. package/lib/alert/index.min.js +1 -0
  222. package/lib/alert/src/alert.js +100 -0
  223. package/lib/alert/src/alert.min.js +1 -0
  224. package/lib/alert/style/index.js +1 -0
  225. package/lib/alert/style/style.css +129 -0
  226. package/lib/alert/style/style.min.css +1 -0
  227. package/lib/anchor/index.js +19 -0
  228. package/lib/anchor/index.min.js +1 -0
  229. package/lib/anchor/src/anchor-link.js +145 -0
  230. package/lib/anchor/src/anchor-link.min.js +1 -0
  231. package/lib/anchor/src/anchor.js +247 -0
  232. package/lib/anchor/src/anchor.min.js +1 -0
  233. package/lib/anchor/src/util.js +31 -0
  234. package/lib/anchor/src/util.min.js +1 -0
  235. package/lib/anchor/style/index.js +1 -0
  236. package/lib/anchor/style/style.css +42 -0
  237. package/lib/anchor/style/style.min.css +1 -0
  238. package/lib/anchor-link/index.js +19 -0
  239. package/lib/anchor-link/index.min.js +1 -0
  240. package/lib/anchor-link/style/index.js +1 -0
  241. package/lib/anchor-link/style/style.css +0 -0
  242. package/lib/anchor-link/style/style.min.css +0 -0
  243. package/lib/breadcrumb/index.js +19 -0
  244. package/lib/breadcrumb/index.min.js +1 -0
  245. package/lib/breadcrumb/src/breadcrumb-item.js +100 -0
  246. package/lib/breadcrumb/src/breadcrumb-item.min.js +1 -0
  247. package/lib/breadcrumb/src/breadcrumb.js +87 -0
  248. package/lib/breadcrumb/src/breadcrumb.min.js +1 -0
  249. package/lib/breadcrumb/style/index.js +1 -0
  250. package/lib/breadcrumb/style/style.css +33 -0
  251. package/lib/breadcrumb/style/style.min.css +1 -0
  252. package/lib/breadcrumb-item/index.js +19 -0
  253. package/lib/breadcrumb-item/index.min.js +1 -0
  254. package/lib/breadcrumb-item/style/index.js +1 -0
  255. package/lib/breadcrumb-item/style/style.css +0 -0
  256. package/lib/breadcrumb-item/style/style.min.css +0 -0
  257. package/lib/button/index.js +5 -3
  258. package/lib/button/index.min.js +1 -1
  259. package/lib/button/src/button-group.js +32 -34
  260. package/lib/button/src/button-group.min.js +1 -1
  261. package/lib/button/src/button.js +236 -287
  262. package/lib/button/src/button.min.js +1 -1
  263. package/lib/button/style/style.css +1 -0
  264. package/lib/button/style/style.min.css +1 -1
  265. package/lib/button-group/index.js +5 -3
  266. package/lib/button-group/index.min.js +1 -1
  267. package/lib/card/index.js +19 -0
  268. package/lib/card/index.min.js +1 -0
  269. package/lib/card/src/card.js +143 -0
  270. package/lib/card/src/card.min.js +1 -0
  271. package/lib/card/style/index.js +1 -0
  272. package/lib/card/style/style.css +68 -0
  273. package/lib/card/style/style.min.css +1 -0
  274. package/lib/col/index.js +5 -3
  275. package/lib/col/index.min.js +1 -1
  276. package/lib/components.js +311 -107
  277. package/lib/components.min.js +1 -1
  278. package/lib/countdown/index.js +19 -0
  279. package/lib/countdown/index.min.js +1 -0
  280. package/lib/countdown/src/countdown.js +247 -0
  281. package/lib/countdown/src/countdown.min.js +1 -0
  282. package/lib/countdown/style/index.js +1 -0
  283. package/lib/countdown/style/style.css +38 -0
  284. package/lib/countdown/style/style.min.css +1 -0
  285. package/lib/date-picker/index.js +20 -0
  286. package/lib/date-picker/index.min.js +1 -0
  287. package/lib/date-picker/src/date-picker.js +2417 -0
  288. package/lib/date-picker/src/date-picker.min.js +1 -0
  289. package/lib/date-picker/src/util.js +46 -0
  290. package/lib/date-picker/src/util.min.js +1 -0
  291. package/lib/date-picker/style/index.js +1 -0
  292. package/lib/date-picker/style/style.css +900 -0
  293. package/lib/date-picker/style/style.min.css +1 -0
  294. package/lib/drawer/index.js +85 -0
  295. package/lib/drawer/index.min.js +1 -0
  296. package/lib/drawer/src/drawer.js +579 -0
  297. package/lib/drawer/src/drawer.min.js +1 -0
  298. package/lib/drawer/style/index.js +1 -0
  299. package/lib/drawer/style/style.css +237 -0
  300. package/lib/drawer/style/style.min.css +1 -0
  301. package/lib/dynamics/index.js +35 -55
  302. package/lib/dynamics/index.min.js +1 -1
  303. package/lib/icon/index.js +5 -3
  304. package/lib/icon/index.min.js +1 -1
  305. package/lib/icon/src/icon.js +25 -25
  306. package/lib/icon/src/icon.min.js +1 -1
  307. package/lib/icon/style/style.css +2 -1
  308. package/lib/icon/style/style.min.css +2 -1
  309. package/lib/image/index.js +19 -0
  310. package/lib/image/index.min.js +1 -0
  311. package/lib/image/src/group.js +148 -0
  312. package/lib/image/src/group.min.js +1 -0
  313. package/lib/image/src/image.js +175 -0
  314. package/lib/image/src/image.min.js +1 -0
  315. package/lib/image/src/preview.js +645 -0
  316. package/lib/image/src/preview.min.js +1 -0
  317. package/lib/image/src/util.js +54 -0
  318. package/lib/image/src/util.min.js +1 -0
  319. package/lib/image/style/index.js +1 -0
  320. package/lib/image/style/style.css +0 -0
  321. package/lib/image/style/style.min.css +0 -0
  322. package/lib/image-group/index.js +19 -0
  323. package/lib/image-group/index.min.js +1 -0
  324. package/lib/image-group/style/index.js +1 -0
  325. package/lib/image-group/style/style.css +3 -0
  326. package/lib/image-group/style/style.min.css +1 -0
  327. package/lib/image-preview/index.js +21 -0
  328. package/lib/image-preview/index.min.js +1 -0
  329. package/lib/image-preview/style/index.js +1 -0
  330. package/lib/image-preview/style/style.css +215 -0
  331. package/lib/image-preview/style/style.min.css +1 -0
  332. package/lib/index.common.js +4 -3
  333. package/lib/index.umd.js +26464 -6094
  334. package/lib/index.umd.min.js +1 -1
  335. package/lib/layout-aside/index.js +5 -3
  336. package/lib/layout-aside/index.min.js +1 -1
  337. package/lib/layout-aside/src/layout-aside.js +38 -41
  338. package/lib/layout-aside/src/layout-aside.min.js +1 -1
  339. package/lib/layout-body/index.js +5 -3
  340. package/lib/layout-body/index.min.js +1 -1
  341. package/lib/layout-body/src/layout-body.js +25 -24
  342. package/lib/layout-body/src/layout-body.min.js +1 -1
  343. package/lib/layout-container/index.js +5 -3
  344. package/lib/layout-container/index.min.js +1 -1
  345. package/lib/layout-container/src/layout-container.js +25 -23
  346. package/lib/layout-container/src/layout-container.min.js +1 -1
  347. package/lib/layout-footer/index.js +5 -3
  348. package/lib/layout-footer/index.min.js +1 -1
  349. package/lib/layout-footer/src/layout-footer.js +15 -17
  350. package/lib/layout-footer/src/layout-footer.min.js +1 -1
  351. package/lib/layout-header/index.js +5 -3
  352. package/lib/layout-header/index.min.js +1 -1
  353. package/lib/layout-header/src/layout-header.js +12 -14
  354. package/lib/layout-header/src/layout-header.min.js +1 -1
  355. package/lib/link/index.js +5 -3
  356. package/lib/link/index.min.js +1 -1
  357. package/lib/link/src/link.js +45 -49
  358. package/lib/link/src/link.min.js +1 -1
  359. package/lib/loading/index.js +10 -9
  360. package/lib/loading/index.min.js +1 -1
  361. package/lib/loading/src/loading.js +57 -52
  362. package/lib/loading/src/loading.min.js +1 -1
  363. package/lib/loading/style/style.css +1 -0
  364. package/lib/loading/style/style.min.css +1 -1
  365. package/lib/menu/index.js +5 -3
  366. package/lib/menu/index.min.js +1 -1
  367. package/lib/menu/src/menu.js +115 -123
  368. package/lib/menu/src/menu.min.js +1 -1
  369. package/lib/menu/style/style.css +1 -0
  370. package/lib/menu/style/style.min.css +1 -1
  371. package/lib/modal/index.js +141 -0
  372. package/lib/modal/index.min.js +1 -0
  373. package/lib/modal/src/modal.js +1550 -0
  374. package/lib/modal/src/modal.min.js +1 -0
  375. package/lib/modal/style/index.js +1 -0
  376. package/lib/modal/style/style.css +435 -0
  377. package/lib/modal/style/style.min.css +1 -0
  378. package/lib/number-input/index.js +19 -0
  379. package/lib/number-input/index.min.js +1 -0
  380. package/lib/number-input/src/number-input.js +875 -0
  381. package/lib/number-input/src/number-input.min.js +1 -0
  382. package/lib/number-input/src/util.js +18 -0
  383. package/lib/number-input/src/util.min.js +1 -0
  384. package/lib/number-input/style/index.js +1 -0
  385. package/lib/number-input/style/style.css +948 -0
  386. package/lib/number-input/style/style.min.css +1 -0
  387. package/lib/print/index.js +21 -0
  388. package/lib/print/index.min.js +1 -0
  389. package/lib/print/src/page-break.js +75 -0
  390. package/lib/print/src/page-break.min.js +1 -0
  391. package/lib/print/src/print.js +210 -0
  392. package/lib/print/src/print.min.js +1 -0
  393. package/lib/print/src/util.js +152 -0
  394. package/lib/print/src/util.min.js +1 -0
  395. package/lib/print/style/index.js +1 -0
  396. package/lib/print/style/style.css +4 -0
  397. package/lib/print/style/style.min.css +1 -0
  398. package/lib/print-page-break/index.js +17 -0
  399. package/lib/print-page-break/index.min.js +1 -0
  400. package/lib/print-page-break/style/index.js +1 -0
  401. package/lib/print-page-break/style/style.css +0 -0
  402. package/lib/print-page-break/style/style.min.css +0 -0
  403. package/lib/pulldown/index.js +19 -0
  404. package/lib/pulldown/index.min.js +1 -0
  405. package/lib/pulldown/src/pulldown.js +468 -0
  406. package/lib/pulldown/src/pulldown.min.js +1 -0
  407. package/lib/pulldown/style/index.js +1 -0
  408. package/lib/pulldown/style/style.css +94 -0
  409. package/lib/pulldown/style/style.min.css +1 -0
  410. package/lib/radio/index.js +5 -3
  411. package/lib/radio/index.min.js +1 -1
  412. package/lib/radio/src/button.js +66 -62
  413. package/lib/radio/src/button.min.js +1 -1
  414. package/lib/radio/src/group.js +53 -51
  415. package/lib/radio/src/group.min.js +1 -1
  416. package/lib/radio/src/radio.js +68 -65
  417. package/lib/radio/src/radio.min.js +1 -1
  418. package/lib/radio/style/style.css +1 -0
  419. package/lib/radio/style/style.min.css +1 -1
  420. package/lib/radio-button/index.js +5 -3
  421. package/lib/radio-button/index.min.js +1 -1
  422. package/lib/radio-group/index.js +5 -3
  423. package/lib/radio-group/index.min.js +1 -1
  424. package/lib/row/index.js +5 -3
  425. package/lib/row/index.min.js +1 -1
  426. package/lib/row/src/col.js +49 -42
  427. package/lib/row/src/col.min.js +1 -1
  428. package/lib/row/src/row.js +46 -37
  429. package/lib/row/src/row.min.js +1 -1
  430. package/lib/style.css +1 -1
  431. package/lib/style.min.css +1 -1
  432. package/lib/switch/index.js +5 -3
  433. package/lib/switch/index.min.js +1 -1
  434. package/lib/switch/src/switch.js +74 -75
  435. package/lib/switch/src/switch.min.js +1 -1
  436. package/lib/switch/style/index.js +1 -0
  437. package/lib/switch/style/style.css +108 -0
  438. package/lib/switch/style/style.min.css +1 -0
  439. package/lib/tag/index.js +5 -3
  440. package/lib/tag/index.min.js +1 -1
  441. package/lib/tag/src/tag.js +31 -32
  442. package/lib/tag/src/tag.min.js +1 -1
  443. package/lib/text/index.js +5 -3
  444. package/lib/text/index.min.js +1 -1
  445. package/lib/text/src/text.js +46 -53
  446. package/lib/text/src/text.min.js +1 -1
  447. package/lib/text/style/style.css +1 -0
  448. package/lib/text/style/style.min.css +1 -1
  449. package/lib/textarea/index.js +19 -0
  450. package/lib/textarea/index.min.js +1 -0
  451. package/lib/textarea/src/textarea.js +410 -0
  452. package/lib/textarea/src/textarea.min.js +1 -0
  453. package/lib/textarea/style/index.js +1 -0
  454. package/lib/textarea/style/style.css +111 -0
  455. package/lib/textarea/style/style.min.css +1 -0
  456. package/lib/tip/index.js +6 -4
  457. package/lib/tip/index.min.js +1 -1
  458. package/lib/tip/src/tip.js +35 -31
  459. package/lib/tip/src/tip.min.js +1 -1
  460. package/lib/tooltip/index.js +19 -0
  461. package/lib/tooltip/index.min.js +1 -0
  462. package/lib/tooltip/src/tooltip.js +472 -0
  463. package/lib/tooltip/src/tooltip.min.js +1 -0
  464. package/lib/tooltip/style/index.js +1 -0
  465. package/lib/tooltip/style/style.css +103 -0
  466. package/lib/tooltip/style/style.min.css +1 -0
  467. package/lib/ui/index.js +4 -4
  468. package/lib/ui/index.min.js +1 -1
  469. package/lib/ui/src/comp.js +3 -2
  470. package/lib/ui/src/comp.min.js +1 -1
  471. package/lib/ui/src/dom.js +27 -28
  472. package/lib/ui/src/dom.min.js +1 -1
  473. package/lib/ui/src/log.js +3 -3
  474. package/lib/ui/src/log.min.js +1 -1
  475. package/lib/ui/src/utils.js +1 -1
  476. package/lib/upload/index.js +22 -0
  477. package/lib/upload/index.min.js +1 -0
  478. package/lib/upload/src/upload.js +1345 -0
  479. package/lib/upload/src/upload.min.js +1 -0
  480. package/lib/upload/src/util.js +130 -0
  481. package/lib/upload/src/util.min.js +1 -0
  482. package/lib/upload/style/index.js +1 -0
  483. package/lib/upload/style/style.css +394 -0
  484. package/lib/upload/style/style.min.css +1 -0
  485. package/lib/vxe-alert/index.js +23 -0
  486. package/lib/vxe-alert/index.min.js +1 -0
  487. package/lib/vxe-alert/style/index.js +1 -0
  488. package/lib/vxe-alert/style/style.css +129 -0
  489. package/lib/vxe-alert/style/style.min.css +1 -0
  490. package/lib/vxe-anchor/index.js +23 -0
  491. package/lib/vxe-anchor/index.min.js +1 -0
  492. package/lib/vxe-anchor/style/index.js +1 -0
  493. package/lib/vxe-anchor/style/style.css +42 -0
  494. package/lib/vxe-anchor/style/style.min.css +1 -0
  495. package/lib/vxe-anchor-link/index.js +23 -0
  496. package/lib/vxe-anchor-link/index.min.js +1 -0
  497. package/lib/vxe-anchor-link/style/index.js +1 -0
  498. package/lib/vxe-anchor-link/style/style.css +0 -0
  499. package/lib/vxe-anchor-link/style/style.min.css +0 -0
  500. package/lib/vxe-breadcrumb/index.js +23 -0
  501. package/lib/vxe-breadcrumb/index.min.js +1 -0
  502. package/lib/vxe-breadcrumb/style/index.js +1 -0
  503. package/lib/vxe-breadcrumb/style/style.css +33 -0
  504. package/lib/vxe-breadcrumb/style/style.min.css +1 -0
  505. package/lib/vxe-breadcrumb-item/index.js +23 -0
  506. package/lib/vxe-breadcrumb-item/index.min.js +1 -0
  507. package/lib/vxe-breadcrumb-item/style/index.js +1 -0
  508. package/lib/vxe-breadcrumb-item/style/style.css +0 -0
  509. package/lib/vxe-breadcrumb-item/style/style.min.css +0 -0
  510. package/lib/vxe-button/index.js +4 -3
  511. package/lib/vxe-button/index.min.js +1 -1
  512. package/lib/vxe-button/style/style.css +1 -0
  513. package/lib/vxe-button/style/style.min.css +1 -1
  514. package/lib/vxe-button-group/index.js +4 -3
  515. package/lib/vxe-button-group/index.min.js +1 -1
  516. package/lib/vxe-card/index.js +23 -0
  517. package/lib/vxe-card/index.min.js +1 -0
  518. package/lib/vxe-card/style/index.js +1 -0
  519. package/lib/vxe-card/style/style.css +68 -0
  520. package/lib/vxe-card/style/style.min.css +1 -0
  521. package/lib/vxe-col/index.js +4 -3
  522. package/lib/vxe-col/index.min.js +1 -1
  523. package/lib/vxe-countdown/index.js +23 -0
  524. package/lib/vxe-countdown/index.min.js +1 -0
  525. package/lib/vxe-countdown/style/index.js +1 -0
  526. package/lib/vxe-countdown/style/style.css +38 -0
  527. package/lib/vxe-countdown/style/style.min.css +1 -0
  528. package/lib/vxe-date-picker/index.js +23 -0
  529. package/lib/vxe-date-picker/index.min.js +1 -0
  530. package/lib/vxe-date-picker/style/index.js +1 -0
  531. package/lib/vxe-date-picker/style/style.css +900 -0
  532. package/lib/vxe-date-picker/style/style.min.css +1 -0
  533. package/lib/vxe-drawer/index.js +23 -0
  534. package/lib/vxe-drawer/index.min.js +1 -0
  535. package/lib/vxe-drawer/style/index.js +1 -0
  536. package/lib/vxe-drawer/style/style.css +237 -0
  537. package/lib/vxe-drawer/style/style.min.css +1 -0
  538. package/lib/vxe-icon/index.js +4 -3
  539. package/lib/vxe-icon/index.min.js +1 -1
  540. package/lib/vxe-icon/style/style.css +1 -0
  541. package/lib/vxe-icon/style/style.min.css +1 -1
  542. package/lib/vxe-image/index.js +23 -0
  543. package/lib/vxe-image/index.min.js +1 -0
  544. package/lib/vxe-image/style/index.js +1 -0
  545. package/lib/vxe-image/style/style.css +0 -0
  546. package/lib/vxe-image/style/style.min.css +0 -0
  547. package/lib/vxe-image-group/index.js +23 -0
  548. package/lib/vxe-image-group/index.min.js +1 -0
  549. package/lib/vxe-image-group/style/index.js +1 -0
  550. package/lib/vxe-image-group/style/style.css +3 -0
  551. package/lib/vxe-image-group/style/style.min.css +1 -0
  552. package/lib/vxe-image-preview/index.js +23 -0
  553. package/lib/vxe-image-preview/index.min.js +1 -0
  554. package/lib/vxe-image-preview/style/index.js +1 -0
  555. package/lib/vxe-image-preview/style/style.css +215 -0
  556. package/lib/vxe-image-preview/style/style.min.css +1 -0
  557. package/lib/vxe-layout-aside/index.js +4 -3
  558. package/lib/vxe-layout-aside/index.min.js +1 -1
  559. package/lib/vxe-layout-body/index.js +4 -3
  560. package/lib/vxe-layout-body/index.min.js +1 -1
  561. package/lib/vxe-layout-container/index.js +4 -3
  562. package/lib/vxe-layout-container/index.min.js +1 -1
  563. package/lib/vxe-layout-footer/index.js +4 -3
  564. package/lib/vxe-layout-footer/index.min.js +1 -1
  565. package/lib/vxe-layout-header/index.js +4 -3
  566. package/lib/vxe-layout-header/index.min.js +1 -1
  567. package/lib/vxe-link/index.js +4 -3
  568. package/lib/vxe-link/index.min.js +1 -1
  569. package/lib/vxe-loading/index.js +4 -3
  570. package/lib/vxe-loading/index.min.js +1 -1
  571. package/lib/vxe-loading/style/style.css +1 -0
  572. package/lib/vxe-loading/style/style.min.css +1 -1
  573. package/lib/vxe-menu/index.js +4 -3
  574. package/lib/vxe-menu/index.min.js +1 -1
  575. package/lib/vxe-menu/style/style.css +1 -0
  576. package/lib/vxe-menu/style/style.min.css +1 -1
  577. package/lib/vxe-modal/index.js +23 -0
  578. package/lib/vxe-modal/index.min.js +1 -0
  579. package/lib/vxe-modal/style/index.js +1 -0
  580. package/lib/vxe-modal/style/style.css +435 -0
  581. package/lib/vxe-modal/style/style.min.css +1 -0
  582. package/lib/vxe-number-input/index.js +23 -0
  583. package/lib/vxe-number-input/index.min.js +1 -0
  584. package/lib/vxe-number-input/style/index.js +1 -0
  585. package/lib/vxe-number-input/style/style.css +948 -0
  586. package/lib/vxe-number-input/style/style.min.css +1 -0
  587. package/lib/vxe-print/index.js +23 -0
  588. package/lib/vxe-print/index.min.js +1 -0
  589. package/lib/vxe-print/style/index.js +1 -0
  590. package/lib/vxe-print/style/style.css +4 -0
  591. package/lib/vxe-print/style/style.min.css +1 -0
  592. package/lib/vxe-print-page-break/index.js +23 -0
  593. package/lib/vxe-print-page-break/index.min.js +1 -0
  594. package/lib/vxe-print-page-break/style/index.js +1 -0
  595. package/lib/vxe-print-page-break/style/style.css +0 -0
  596. package/lib/vxe-print-page-break/style/style.min.css +0 -0
  597. package/lib/vxe-pulldown/index.js +23 -0
  598. package/lib/vxe-pulldown/index.min.js +1 -0
  599. package/lib/vxe-pulldown/style/index.js +1 -0
  600. package/lib/vxe-pulldown/style/style.css +94 -0
  601. package/lib/vxe-pulldown/style/style.min.css +1 -0
  602. package/lib/vxe-radio/index.js +4 -3
  603. package/lib/vxe-radio/index.min.js +1 -1
  604. package/lib/vxe-radio/style/style.css +1 -0
  605. package/lib/vxe-radio/style/style.min.css +1 -1
  606. package/lib/vxe-radio-button/index.js +4 -3
  607. package/lib/vxe-radio-button/index.min.js +1 -1
  608. package/lib/vxe-radio-group/index.js +4 -3
  609. package/lib/vxe-radio-group/index.min.js +1 -1
  610. package/lib/vxe-row/index.js +4 -3
  611. package/lib/vxe-row/index.min.js +1 -1
  612. package/lib/vxe-switch/index.js +23 -0
  613. package/lib/vxe-switch/index.min.js +1 -0
  614. package/lib/vxe-switch/style/index.js +1 -0
  615. package/lib/vxe-switch/style/style.css +108 -0
  616. package/lib/vxe-switch/style/style.min.css +1 -0
  617. package/lib/vxe-tag/index.js +4 -3
  618. package/lib/vxe-tag/index.min.js +1 -1
  619. package/lib/vxe-text/index.js +4 -3
  620. package/lib/vxe-text/index.min.js +1 -1
  621. package/lib/vxe-text/style/style.css +1 -0
  622. package/lib/vxe-text/style/style.min.css +1 -1
  623. package/lib/vxe-textarea/index.js +23 -0
  624. package/lib/vxe-textarea/index.min.js +1 -0
  625. package/lib/vxe-textarea/style/index.js +1 -0
  626. package/lib/vxe-textarea/style/style.css +111 -0
  627. package/lib/vxe-textarea/style/style.min.css +1 -0
  628. package/lib/vxe-tip/index.js +4 -3
  629. package/lib/vxe-tip/index.min.js +1 -1
  630. package/lib/vxe-tooltip/index.js +23 -0
  631. package/lib/vxe-tooltip/index.min.js +1 -0
  632. package/lib/vxe-tooltip/style/index.js +1 -0
  633. package/lib/vxe-tooltip/style/style.css +103 -0
  634. package/lib/vxe-tooltip/style/style.min.css +1 -0
  635. package/lib/vxe-ui/index.js +4 -3
  636. package/lib/vxe-ui/index.min.js +1 -1
  637. package/lib/vxe-upload/index.js +23 -0
  638. package/lib/vxe-upload/index.min.js +1 -0
  639. package/lib/vxe-upload/style/index.js +1 -0
  640. package/lib/vxe-upload/style/style.css +394 -0
  641. package/lib/vxe-upload/style/style.min.css +1 -0
  642. package/package.json +2 -2
  643. package/packages/alert/index.ts +16 -0
  644. package/packages/alert/src/alert.ts +106 -0
  645. package/packages/anchor/index.ts +16 -0
  646. package/packages/anchor/src/anchor-link.ts +158 -0
  647. package/packages/anchor/src/anchor.ts +251 -0
  648. package/packages/anchor/src/util.ts +23 -0
  649. package/packages/anchor-link/index.ts +16 -0
  650. package/packages/breadcrumb/index.ts +16 -0
  651. package/packages/breadcrumb/src/breadcrumb-item.ts +117 -0
  652. package/packages/breadcrumb/src/breadcrumb.ts +89 -0
  653. package/packages/breadcrumb-item/index.ts +16 -0
  654. package/packages/button/index.ts +2 -0
  655. package/packages/button/src/button-group.ts +1 -1
  656. package/packages/button/src/button.ts +15 -9
  657. package/packages/button-group/index.ts +2 -0
  658. package/packages/card/index.ts +16 -0
  659. package/packages/card/src/card.ts +156 -0
  660. package/packages/col/index.ts +2 -0
  661. package/packages/components.ts +69 -69
  662. package/packages/countdown/index.ts +16 -0
  663. package/packages/countdown/src/countdown.ts +275 -0
  664. package/packages/date-picker/index.ts +17 -0
  665. package/packages/date-picker/src/date-picker.ts +2488 -0
  666. package/packages/date-picker/src/util.ts +42 -0
  667. package/packages/drawer/index.ts +86 -0
  668. package/packages/drawer/src/drawer.ts +559 -0
  669. package/packages/dynamics/index.ts +33 -50
  670. package/packages/icon/index.ts +2 -0
  671. package/packages/image/index.ts +16 -0
  672. package/packages/image/src/group.ts +138 -0
  673. package/packages/image/src/image.ts +169 -0
  674. package/packages/image/src/preview.ts +705 -0
  675. package/packages/image/src/util.ts +49 -0
  676. package/packages/image-group/index.ts +16 -0
  677. package/packages/image-preview/index.ts +18 -0
  678. package/packages/layout-aside/index.ts +2 -0
  679. package/packages/layout-aside/src/layout-aside.ts +3 -2
  680. package/packages/layout-body/index.ts +2 -0
  681. package/packages/layout-body/src/layout-body.ts +3 -2
  682. package/packages/layout-container/index.ts +2 -0
  683. package/packages/layout-container/src/layout-container.ts +3 -2
  684. package/packages/layout-footer/index.ts +2 -0
  685. package/packages/layout-footer/src/layout-footer.ts +1 -1
  686. package/packages/layout-header/index.ts +2 -0
  687. package/packages/layout-header/src/layout-header.ts +1 -1
  688. package/packages/link/index.ts +2 -0
  689. package/packages/link/src/link.ts +1 -1
  690. package/packages/loading/index.ts +4 -3
  691. package/packages/loading/src/loading.ts +3 -2
  692. package/packages/menu/index.ts +2 -0
  693. package/packages/menu/src/menu.ts +5 -3
  694. package/packages/modal/index.ts +143 -0
  695. package/packages/modal/src/modal.ts +1511 -0
  696. package/packages/number-input/index.ts +16 -0
  697. package/packages/number-input/src/number-input.ts +938 -0
  698. package/packages/number-input/src/util.ts +12 -0
  699. package/packages/print/index.ts +18 -0
  700. package/packages/print/src/page-break.ts +78 -0
  701. package/packages/print/src/print.ts +239 -0
  702. package/packages/print/src/util.ts +180 -0
  703. package/packages/print-page-break/index.ts +14 -0
  704. package/packages/pulldown/index.ts +16 -0
  705. package/packages/pulldown/src/pulldown.ts +484 -0
  706. package/packages/radio/index.ts +2 -0
  707. package/packages/radio/src/button.ts +6 -3
  708. package/packages/radio/src/group.ts +4 -2
  709. package/packages/radio/src/radio.ts +6 -3
  710. package/packages/radio-button/index.ts +2 -0
  711. package/packages/radio-group/index.ts +2 -0
  712. package/packages/row/index.ts +2 -0
  713. package/packages/row/src/col.ts +1 -1
  714. package/packages/switch/index.ts +2 -0
  715. package/packages/switch/src/switch.ts +2 -1
  716. package/packages/tag/index.ts +2 -0
  717. package/packages/tag/src/tag.ts +1 -1
  718. package/packages/text/index.ts +2 -0
  719. package/packages/text/src/text.ts +1 -1
  720. package/packages/textarea/index.ts +16 -0
  721. package/packages/textarea/src/textarea.ts +419 -0
  722. package/packages/tip/index.ts +2 -0
  723. package/packages/tip/src/tip.ts +1 -1
  724. package/packages/tooltip/index.ts +16 -0
  725. package/packages/tooltip/src/tooltip.ts +462 -0
  726. package/packages/upload/index.ts +19 -0
  727. package/packages/upload/src/upload.ts +1448 -0
  728. package/packages/upload/src/util.ts +109 -0
  729. package/types/components/alert.d.ts +7 -7
  730. package/types/components/anchor-link.d.ts +8 -8
  731. package/types/components/anchor.d.ts +10 -9
  732. package/types/components/breadcrumb-item.d.ts +7 -7
  733. package/types/components/breadcrumb.d.ts +7 -7
  734. package/types/components/button-group.d.ts +6 -6
  735. package/types/components/button.d.ts +6 -7
  736. package/types/components/calendar.d.ts +8 -8
  737. package/types/components/card.d.ts +6 -6
  738. package/types/components/carousel-item.d.ts +6 -6
  739. package/types/components/carousel.d.ts +9 -9
  740. package/types/components/checkbox-group.d.ts +9 -9
  741. package/types/components/checkbox.d.ts +9 -9
  742. package/types/components/col.d.ts +6 -6
  743. package/types/components/colgroup.d.ts +7 -7
  744. package/types/components/collapse-pane.d.ts +7 -7
  745. package/types/components/collapse.d.ts +8 -7
  746. package/types/components/column.d.ts +6 -6
  747. package/types/components/countdown.d.ts +13 -9
  748. package/types/components/date-picker.d.ts +45 -16
  749. package/types/components/drawer.d.ts +9 -9
  750. package/types/components/flow-design.d.ts +7 -7
  751. package/types/components/flow-view.d.ts +7 -7
  752. package/types/components/form-design.d.ts +7 -8
  753. package/types/components/form-gather.d.ts +6 -4
  754. package/types/components/form-item.d.ts +6 -4
  755. package/types/components/form-view.d.ts +8 -8
  756. package/types/components/form.d.ts +6 -7
  757. package/types/components/grid.d.ts +7 -7
  758. package/types/components/icon-picker.d.ts +9 -9
  759. package/types/components/icon.d.ts +6 -6
  760. package/types/components/image-group.d.ts +7 -7
  761. package/types/components/image-preview.d.ts +9 -9
  762. package/types/components/image.d.ts +7 -7
  763. package/types/components/input.d.ts +9 -9
  764. package/types/components/layout-aside.d.ts +6 -6
  765. package/types/components/layout-body.d.ts +6 -6
  766. package/types/components/layout-container.d.ts +6 -6
  767. package/types/components/layout-footer.d.ts +6 -6
  768. package/types/components/layout-header.d.ts +6 -4
  769. package/types/components/link.d.ts +6 -6
  770. package/types/components/list-design.d.ts +7 -7
  771. package/types/components/list-view.d.ts +7 -7
  772. package/types/components/list.d.ts +7 -8
  773. package/types/components/loading.d.ts +6 -6
  774. package/types/components/menu.d.ts +9 -9
  775. package/types/components/modal.d.ts +28 -18
  776. package/types/components/number-input.d.ts +13 -9
  777. package/types/components/optgroup.d.ts +7 -7
  778. package/types/components/option.d.ts +7 -7
  779. package/types/components/pager.d.ts +7 -7
  780. package/types/components/password-input.d.ts +9 -9
  781. package/types/components/print-page-break.d.ts +7 -7
  782. package/types/components/print.d.ts +7 -7
  783. package/types/components/pulldown.d.ts +14 -10
  784. package/types/components/radio-button.d.ts +7 -7
  785. package/types/components/radio-group.d.ts +7 -7
  786. package/types/components/radio.d.ts +7 -7
  787. package/types/components/row.d.ts +6 -6
  788. package/types/components/select.d.ts +13 -9
  789. package/types/components/switch.d.ts +8 -9
  790. package/types/components/tab-pane.d.ts +7 -7
  791. package/types/components/table.d.ts +6 -7
  792. package/types/components/tabs.d.ts +9 -9
  793. package/types/components/tag.d.ts +6 -6
  794. package/types/components/text.d.ts +6 -6
  795. package/types/components/textarea.d.ts +9 -9
  796. package/types/components/tip.d.ts +7 -7
  797. package/types/components/toolbar.d.ts +7 -7
  798. package/types/components/tooltip.d.ts +13 -9
  799. package/types/components/tree-select.d.ts +8 -8
  800. package/types/components/tree.d.ts +7 -8
  801. package/types/components/upload.d.ts +13 -9
  802. /package/es/icon/style/{iconfont.1725529913473.ttf → iconfont.1725627455309.ttf} +0 -0
  803. /package/es/icon/style/{iconfont.1725529913473.woff → iconfont.1725627455309.woff} +0 -0
  804. /package/es/icon/style/{iconfont.1725529913473.woff2 → iconfont.1725627455309.woff2} +0 -0
  805. /package/es/{iconfont.1725529913473.ttf → iconfont.1725627455309.ttf} +0 -0
  806. /package/es/{iconfont.1725529913473.woff → iconfont.1725627455309.woff} +0 -0
  807. /package/es/{iconfont.1725529913473.woff2 → iconfont.1725627455309.woff2} +0 -0
  808. /package/lib/icon/style/{iconfont.1725529913473.ttf → iconfont.1725627455309.ttf} +0 -0
  809. /package/lib/icon/style/{iconfont.1725529913473.woff → iconfont.1725627455309.woff} +0 -0
  810. /package/lib/icon/style/{iconfont.1725529913473.woff2 → iconfont.1725627455309.woff2} +0 -0
  811. /package/lib/{iconfont.1725529913473.ttf → iconfont.1725627455309.ttf} +0 -0
  812. /package/lib/{iconfont.1725529913473.woff → iconfont.1725627455309.woff} +0 -0
  813. /package/lib/{iconfont.1725529913473.woff2 → iconfont.1725627455309.woff2} +0 -0
@@ -0,0 +1,12 @@
1
+ import { VxeUI } from '@vxe-ui/core';
2
+ import { dynamicApp } from '../dynamics';
3
+ import VxeAlertComponent from './src/alert';
4
+ export const VxeAlert = Object.assign({}, VxeAlertComponent, {
5
+ install(app) {
6
+ app.component(VxeAlertComponent.name, VxeAlertComponent);
7
+ }
8
+ });
9
+ dynamicApp.use(VxeAlert);
10
+ VxeUI.component(VxeAlertComponent);
11
+ export const Alert = VxeAlert;
12
+ export default VxeAlert;
@@ -0,0 +1,99 @@
1
+ import { defineVxeComponent } from '../../ui/src/comp';
2
+ import XEUtils from 'xe-utils';
3
+ import { getConfig, createEvent, getIcon, renderEmptyElement } from '../../ui';
4
+ import { getSlotVNs } from '../../ui/src/vn';
5
+ export default defineVxeComponent({
6
+ name: 'VxeAlert',
7
+ props: {
8
+ title: {
9
+ type: [String, Number],
10
+ default: () => getConfig().alert.title
11
+ },
12
+ content: [String, Number],
13
+ status: String,
14
+ showIcon: Boolean,
15
+ showClose: Boolean,
16
+ icon: {
17
+ type: String,
18
+ default: () => getConfig().alert.icon
19
+ }
20
+ },
21
+ data() {
22
+ const xID = XEUtils.uniqueId();
23
+ const reactData = {};
24
+ return {
25
+ xID,
26
+ reactData
27
+ };
28
+ },
29
+ methods: {
30
+ //
31
+ // Method
32
+ //
33
+ dispatchEvent(type, params, evnt) {
34
+ const $xeAlert = this;
35
+ this.$emit(type, createEvent(evnt, { $alert: $xeAlert }, params));
36
+ },
37
+ closeEvent(evnt) {
38
+ const $xeAlert = this;
39
+ $xeAlert.dispatchEvent('close', {}, evnt);
40
+ },
41
+ //
42
+ // Render
43
+ //
44
+ renderVN(h) {
45
+ const $xeAlert = this;
46
+ const props = $xeAlert;
47
+ const slots = $xeAlert.$scopedSlots;
48
+ const { status, content, icon, title, showIcon, showClose } = props;
49
+ const defaultSlot = slots.default;
50
+ const titleSlot = slots.title;
51
+ const iconSlot = slots.icon;
52
+ return h('div', {
53
+ ref: 'refElem',
54
+ class: ['vxe-alert', {
55
+ [`theme--${status}`]: status
56
+ }]
57
+ }, [
58
+ iconSlot || (showIcon && status) || icon
59
+ ? h('div', {
60
+ class: 'vxe-alert--icon'
61
+ }, iconSlot
62
+ ? getSlotVNs(iconSlot({}))
63
+ : [
64
+ h('i', {
65
+ class: icon || getIcon()[`ALERT_${status === null || status === void 0 ? void 0 : status.toUpperCase()}`]
66
+ })
67
+ ])
68
+ : renderEmptyElement($xeAlert),
69
+ h('div', {
70
+ class: 'vxe-alert--body'
71
+ }, [
72
+ titleSlot || title
73
+ ? h('div', {
74
+ class: 'vxe-alert--title'
75
+ }, titleSlot ? getSlotVNs(titleSlot({})) : XEUtils.toValueString(title))
76
+ : renderEmptyElement($xeAlert),
77
+ h('div', {
78
+ class: 'vxe-alert--content'
79
+ }, defaultSlot ? getSlotVNs(defaultSlot({})) : XEUtils.toValueString(content))
80
+ ]),
81
+ showClose
82
+ ? h('div', {
83
+ class: 'vxe-alert--close-btn',
84
+ on: {
85
+ click: $xeAlert.closeEvent
86
+ }
87
+ }, [
88
+ h('i', {
89
+ class: getIcon().ALERT_CLOSE
90
+ })
91
+ ])
92
+ : renderEmptyElement($xeAlert)
93
+ ]);
94
+ }
95
+ },
96
+ render(h) {
97
+ return this.renderVN(h);
98
+ }
99
+ });
@@ -0,0 +1,129 @@
1
+ .vxe-alert {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: row;
5
+ color: var(--vxe-ui-font-color);
6
+ padding: var(--vxe-ui-layout-padding-default);
7
+ margin-bottom: var(--vxe-ui-layout-padding-default);
8
+ font-size: var(--vxe-ui-font-size-default);
9
+ border-radius: var(--vxe-ui-base-border-radius);
10
+ }
11
+ .vxe-alert.theme--primary {
12
+ color: var(--vxe-ui-font-primary-color);
13
+ border: 1px solid var(--vxe-ui-font-primary-lighten-color);
14
+ background-color: var(--vxe-ui-font-primary-tinge-color);
15
+ }
16
+ .vxe-alert.theme--primary::after {
17
+ background-color: var(--vxe-ui-font-primary-color);
18
+ }
19
+ .vxe-alert.theme--primary .vxe-alert--icon {
20
+ color: var(--vxe-ui-font-primary-color);
21
+ }
22
+ .vxe-alert.theme--primary .vxe-alert--close-btn:hover {
23
+ color: var(--vxe-ui-font-primary-lighten-color);
24
+ }
25
+ .vxe-alert.theme--success {
26
+ color: var(--vxe-ui-status-success-color);
27
+ border: 1px solid var(--vxe-ui-status-success-lighten-color);
28
+ background-color: var(--vxe-ui-status-success-tinge-color);
29
+ }
30
+ .vxe-alert.theme--success::after {
31
+ background-color: var(--vxe-ui-status-success-color);
32
+ }
33
+ .vxe-alert.theme--success .vxe-alert--icon {
34
+ color: var(--vxe-ui-status-success-color);
35
+ }
36
+ .vxe-alert.theme--success .vxe-alert--close-btn:hover {
37
+ color: var(--vxe-ui-status-success-lighten-color);
38
+ }
39
+ .vxe-alert.theme--info {
40
+ color: var(--vxe-ui-status-info-color);
41
+ border: 1px solid var(--vxe-ui-status-info-lighten-color);
42
+ background-color: var(--vxe-ui-status-info-tinge-color);
43
+ }
44
+ .vxe-alert.theme--info::after {
45
+ background-color: var(--vxe-ui-status-info-color);
46
+ }
47
+ .vxe-alert.theme--info .vxe-alert--icon {
48
+ color: var(--vxe-ui-status-info-color);
49
+ }
50
+ .vxe-alert.theme--info .vxe-alert--close-btn:hover {
51
+ color: var(--vxe-ui-status-info-lighten-color);
52
+ }
53
+ .vxe-alert.theme--warning {
54
+ color: var(--vxe-ui-status-warning-color);
55
+ border: 1px solid var(--vxe-ui-status-warning-lighten-color);
56
+ background-color: var(--vxe-ui-status-warning-tinge-color);
57
+ }
58
+ .vxe-alert.theme--warning::after {
59
+ background-color: var(--vxe-ui-status-warning-color);
60
+ }
61
+ .vxe-alert.theme--warning .vxe-alert--icon {
62
+ color: var(--vxe-ui-status-warning-color);
63
+ }
64
+ .vxe-alert.theme--warning .vxe-alert--close-btn:hover {
65
+ color: var(--vxe-ui-status-warning-lighten-color);
66
+ }
67
+ .vxe-alert.theme--danger {
68
+ color: var(--vxe-ui-status-danger-color);
69
+ border: 1px solid var(--vxe-ui-status-danger-lighten-color);
70
+ background-color: var(--vxe-ui-status-danger-tinge-color);
71
+ }
72
+ .vxe-alert.theme--danger::after {
73
+ background-color: var(--vxe-ui-status-danger-color);
74
+ }
75
+ .vxe-alert.theme--danger .vxe-alert--icon {
76
+ color: var(--vxe-ui-status-danger-color);
77
+ }
78
+ .vxe-alert.theme--danger .vxe-alert--close-btn:hover {
79
+ color: var(--vxe-ui-status-danger-lighten-color);
80
+ }
81
+ .vxe-alert.theme--error {
82
+ color: var(--vxe-ui-status-error-color);
83
+ border: 1px solid var(--vxe-ui-status-error-lighten-color);
84
+ background-color: var(--vxe-ui-status-error-tinge-color);
85
+ }
86
+ .vxe-alert.theme--error::after {
87
+ background-color: var(--vxe-ui-status-error-color);
88
+ }
89
+ .vxe-alert.theme--error .vxe-alert--icon {
90
+ color: var(--vxe-ui-status-error-color);
91
+ }
92
+ .vxe-alert.theme--error .vxe-alert--close-btn:hover {
93
+ color: var(--vxe-ui-status-error-lighten-color);
94
+ }
95
+ .vxe-alert.size--medium {
96
+ font-size: var(--vxe-ui-font-size-medium);
97
+ }
98
+ .vxe-alert.size--small {
99
+ font-size: var(--vxe-ui-font-size-small);
100
+ }
101
+ .vxe-alert.size--mini {
102
+ font-size: var(--vxe-ui-font-size-mini);
103
+ }
104
+
105
+ .vxe-alert--icon {
106
+ display: flex;
107
+ flex-direction: row;
108
+ align-items: center;
109
+ justify-content: center;
110
+ flex-shrink: 0;
111
+ font-size: 1.5em;
112
+ padding: 0 var(--vxe-ui-layout-padding-default);
113
+ }
114
+
115
+ .vxe-alert--body {
116
+ flex-grow: 1;
117
+ }
118
+
119
+ .vxe-alert--title {
120
+ font-size: 1.1em;
121
+ font-weight: 700;
122
+ line-height: 2em;
123
+ }
124
+
125
+ .vxe-alert--close-btn {
126
+ padding: 0 0.4em;
127
+ line-height: 2.2em;
128
+ cursor: pointer;
129
+ }
@@ -0,0 +1 @@
1
+ .vxe-alert{position:relative;display:flex;flex-direction:row;color:var(--vxe-ui-font-color);padding:var(--vxe-ui-layout-padding-default);margin-bottom:var(--vxe-ui-layout-padding-default);font-size:var(--vxe-ui-font-size-default);border-radius:var(--vxe-ui-base-border-radius)}.vxe-alert.theme--primary{color:var(--vxe-ui-font-primary-color);border:1px solid var(--vxe-ui-font-primary-lighten-color);background-color:var(--vxe-ui-font-primary-tinge-color)}.vxe-alert.theme--primary::after{background-color:var(--vxe-ui-font-primary-color)}.vxe-alert.theme--primary .vxe-alert--icon{color:var(--vxe-ui-font-primary-color)}.vxe-alert.theme--primary .vxe-alert--close-btn:hover{color:var(--vxe-ui-font-primary-lighten-color)}.vxe-alert.theme--success{color:var(--vxe-ui-status-success-color);border:1px solid var(--vxe-ui-status-success-lighten-color);background-color:var(--vxe-ui-status-success-tinge-color)}.vxe-alert.theme--success::after{background-color:var(--vxe-ui-status-success-color)}.vxe-alert.theme--success .vxe-alert--icon{color:var(--vxe-ui-status-success-color)}.vxe-alert.theme--success .vxe-alert--close-btn:hover{color:var(--vxe-ui-status-success-lighten-color)}.vxe-alert.theme--info{color:var(--vxe-ui-status-info-color);border:1px solid var(--vxe-ui-status-info-lighten-color);background-color:var(--vxe-ui-status-info-tinge-color)}.vxe-alert.theme--info::after{background-color:var(--vxe-ui-status-info-color)}.vxe-alert.theme--info .vxe-alert--icon{color:var(--vxe-ui-status-info-color)}.vxe-alert.theme--info .vxe-alert--close-btn:hover{color:var(--vxe-ui-status-info-lighten-color)}.vxe-alert.theme--warning{color:var(--vxe-ui-status-warning-color);border:1px solid var(--vxe-ui-status-warning-lighten-color);background-color:var(--vxe-ui-status-warning-tinge-color)}.vxe-alert.theme--warning::after{background-color:var(--vxe-ui-status-warning-color)}.vxe-alert.theme--warning .vxe-alert--icon{color:var(--vxe-ui-status-warning-color)}.vxe-alert.theme--warning .vxe-alert--close-btn:hover{color:var(--vxe-ui-status-warning-lighten-color)}.vxe-alert.theme--danger{color:var(--vxe-ui-status-danger-color);border:1px solid var(--vxe-ui-status-danger-lighten-color);background-color:var(--vxe-ui-status-danger-tinge-color)}.vxe-alert.theme--danger::after{background-color:var(--vxe-ui-status-danger-color)}.vxe-alert.theme--danger .vxe-alert--icon{color:var(--vxe-ui-status-danger-color)}.vxe-alert.theme--danger .vxe-alert--close-btn:hover{color:var(--vxe-ui-status-danger-lighten-color)}.vxe-alert.theme--error{color:var(--vxe-ui-status-error-color);border:1px solid var(--vxe-ui-status-error-lighten-color);background-color:var(--vxe-ui-status-error-tinge-color)}.vxe-alert.theme--error::after{background-color:var(--vxe-ui-status-error-color)}.vxe-alert.theme--error .vxe-alert--icon{color:var(--vxe-ui-status-error-color)}.vxe-alert.theme--error .vxe-alert--close-btn:hover{color:var(--vxe-ui-status-error-lighten-color)}.vxe-alert.size--medium{font-size:var(--vxe-ui-font-size-medium)}.vxe-alert.size--small{font-size:var(--vxe-ui-font-size-small)}.vxe-alert.size--mini{font-size:var(--vxe-ui-font-size-mini)}.vxe-alert--icon{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-shrink:0;font-size:1.5em;padding:0 var(--vxe-ui-layout-padding-default)}.vxe-alert--body{flex-grow:1}.vxe-alert--title{font-size:1.1em;font-weight:700;line-height:2em}.vxe-alert--close-btn{padding:0 .4em;line-height:2.2em;cursor:pointer}
@@ -0,0 +1,12 @@
1
+ import { VxeUI } from '@vxe-ui/core';
2
+ import { dynamicApp } from '../dynamics';
3
+ import VxeAnchorComponent from './src/anchor';
4
+ export const VxeAnchor = Object.assign({}, VxeAnchorComponent, {
5
+ install(app) {
6
+ app.component(VxeAnchorComponent.name, VxeAnchorComponent);
7
+ }
8
+ });
9
+ dynamicApp.use(VxeAnchor);
10
+ VxeUI.component(VxeAnchorComponent);
11
+ export const Anchor = VxeAnchor;
12
+ export default VxeAnchor;
@@ -0,0 +1,137 @@
1
+ import { defineVxeComponent } from '../../ui/src/comp';
2
+ import XEUtils from 'xe-utils';
3
+ import { createEvent, renderEmptyElement } from '../../ui';
4
+ import { assembleAnchorLink, destroyAnchorLink } from './util';
5
+ export default defineVxeComponent({
6
+ name: 'VxeAnchorLink',
7
+ props: {
8
+ content: [String, Number],
9
+ title: [String, Number],
10
+ href: String
11
+ },
12
+ inject: {
13
+ $xeAnchor: {
14
+ default: null
15
+ },
16
+ $xeParentAnchorLink: {
17
+ from: '$xeAnchorLink',
18
+ default: null
19
+ }
20
+ },
21
+ provide() {
22
+ const $xeAnchorLink = this;
23
+ return {
24
+ $xeAnchorLink
25
+ };
26
+ },
27
+ data() {
28
+ const xID = XEUtils.uniqueId();
29
+ const reactData = {};
30
+ const linkConfig = {
31
+ id: xID,
32
+ href: '',
33
+ children: []
34
+ };
35
+ return {
36
+ xID,
37
+ reactData,
38
+ linkConfig
39
+ };
40
+ },
41
+ computed: Object.assign(Object.assign({}, {}), { computeIsActive() {
42
+ const $xeAnchorLink = this;
43
+ const props = $xeAnchorLink;
44
+ const $xeAnchor = $xeAnchorLink.$xeAnchor;
45
+ const { href } = props;
46
+ if ($xeAnchor) {
47
+ return $xeAnchor.reactData.activeHref === href;
48
+ }
49
+ return null;
50
+ } }),
51
+ watch: {
52
+ href(val) {
53
+ const $xeAnchorLink = this;
54
+ const linkConfig = $xeAnchorLink.linkConfig;
55
+ linkConfig.href = val;
56
+ }
57
+ },
58
+ methods: {
59
+ //
60
+ // Method
61
+ //
62
+ dispatchEvent(type, params, evnt) {
63
+ const $xeAnchorLink = this;
64
+ $xeAnchorLink.$emit(type, createEvent(evnt, { $anchorLink: $xeAnchorLink }, params));
65
+ },
66
+ clickEvent(event) {
67
+ const $xeAnchorLink = this;
68
+ const props = $xeAnchorLink;
69
+ const $xeAnchor = $xeAnchorLink.$xeAnchor;
70
+ const { href } = props;
71
+ if ($xeAnchor) {
72
+ $xeAnchor.handleClickLink(event, href);
73
+ }
74
+ },
75
+ //
76
+ // Render
77
+ //
78
+ renderVN(h) {
79
+ const $xeAnchorLink = this;
80
+ const props = $xeAnchorLink;
81
+ const slots = $xeAnchorLink.$scopedSlots;
82
+ const { href, content, title } = props;
83
+ const defaultSlot = slots.default;
84
+ const subSlot = slots.sub;
85
+ const isActive = $xeAnchorLink.computeIsActive;
86
+ return h('div', {
87
+ ref: 'refElem',
88
+ class: ['vxe-anchor-link', {
89
+ 'is--active': isActive
90
+ }]
91
+ }, [
92
+ h('a', {
93
+ class: 'vxe-anchor-link--item',
94
+ attrs: {
95
+ href,
96
+ title
97
+ },
98
+ on: {
99
+ click: $xeAnchorLink.clickEvent
100
+ }
101
+ }, defaultSlot ? defaultSlot({}) : (XEUtils.toValueString(content))),
102
+ subSlot
103
+ ? h('div', {
104
+ class: 'vxe-anchor-link--sub-items'
105
+ }, subSlot({}))
106
+ : renderEmptyElement($xeAnchorLink)
107
+ ]);
108
+ }
109
+ },
110
+ created() {
111
+ const $xeAnchorLink = this;
112
+ const props = $xeAnchorLink;
113
+ const linkConfig = $xeAnchorLink.linkConfig;
114
+ linkConfig.href = props.href;
115
+ },
116
+ mounted() {
117
+ const $xeAnchorLink = this;
118
+ const $xeAnchor = $xeAnchorLink.$xeAnchor;
119
+ const $xeParentAnchorLink = $xeAnchorLink.$xeParentAnchorLink;
120
+ const linkConfig = $xeAnchorLink.linkConfig;
121
+ const elem = $xeAnchorLink.$refs.refElem;
122
+ if ($xeAnchor && elem) {
123
+ assembleAnchorLink($xeAnchor, elem, linkConfig, $xeParentAnchorLink);
124
+ }
125
+ },
126
+ beforeDestroy() {
127
+ const $xeAnchorLink = this;
128
+ const $xeAnchor = $xeAnchorLink.$xeAnchor;
129
+ const linkConfig = $xeAnchorLink.linkConfig;
130
+ if ($xeAnchor) {
131
+ destroyAnchorLink($xeAnchor, linkConfig);
132
+ }
133
+ },
134
+ render(h) {
135
+ return this.renderVN(h);
136
+ }
137
+ });
@@ -0,0 +1,232 @@
1
+ import { defineVxeComponent } from '../../ui/src/comp';
2
+ import XEUtils from 'xe-utils';
3
+ import { createEvent, renderEmptyElement } from '../../ui';
4
+ import { getOffsetPos } from '../../ui/src/dom';
5
+ import VxeAnchorLinkComponent from './anchor-link';
6
+ export default defineVxeComponent({
7
+ name: 'VxeAnchor',
8
+ props: {
9
+ value: String,
10
+ options: Array,
11
+ container: [String, Object, Function],
12
+ showMarker: {
13
+ type: Boolean,
14
+ default: true
15
+ }
16
+ },
17
+ provide() {
18
+ const $xeAnchor = this;
19
+ return {
20
+ $xeAnchor
21
+ };
22
+ },
23
+ data() {
24
+ const xID = XEUtils.uniqueId();
25
+ const reactData = {
26
+ activeHref: null,
27
+ staticLinks: [],
28
+ containerElem: null
29
+ };
30
+ return {
31
+ xID,
32
+ reactData
33
+ };
34
+ },
35
+ computed: {
36
+ computeAllHrefList() {
37
+ const $xeAnchor = this;
38
+ const reactData = $xeAnchor.reactData;
39
+ const list = [];
40
+ XEUtils.eachTree(reactData.staticLinks, item => {
41
+ list.push(item.href || '');
42
+ }, { children: 'children' });
43
+ return list;
44
+ }
45
+ },
46
+ watch: {
47
+ value(val) {
48
+ const $xeAnchor = this;
49
+ const reactData = $xeAnchor.reactData;
50
+ reactData.activeHref = val;
51
+ },
52
+ 'reactData.activeHref'() {
53
+ const $xeAnchor = this;
54
+ $xeAnchor.updateMarkerPos();
55
+ },
56
+ container() {
57
+ const $xeAnchor = this;
58
+ $xeAnchor.removeContainerElemScroll();
59
+ $xeAnchor.updateContainerElem();
60
+ }
61
+ },
62
+ methods: {
63
+ //
64
+ // Method
65
+ //
66
+ dispatchEvent(type, params, evnt) {
67
+ const $xeAnchor = this;
68
+ $xeAnchor.$emit(type, createEvent(evnt, { $anchor: $xeAnchor }, params));
69
+ },
70
+ getContainerElem() {
71
+ const $xeAnchor = this;
72
+ const props = $xeAnchor;
73
+ const { container } = props;
74
+ if (container) {
75
+ if (XEUtils.isElement(container)) {
76
+ return container;
77
+ }
78
+ if (XEUtils.isString(container)) {
79
+ return document.querySelector(container);
80
+ }
81
+ if (XEUtils.isFunction(container)) {
82
+ return container({ $anchor: $xeAnchor });
83
+ }
84
+ }
85
+ return null;
86
+ },
87
+ emitEvent(value) {
88
+ const $xeAnchor = this;
89
+ const reactData = $xeAnchor.reactData;
90
+ reactData.activeHref = value;
91
+ $xeAnchor.$emit('input', value);
92
+ $xeAnchor.$emit('modelValue', value);
93
+ },
94
+ handleContainerScrollEvent() {
95
+ const $xeAnchor = this;
96
+ const reactData = $xeAnchor.reactData;
97
+ const allHrefList = $xeAnchor.computeAllHrefList;
98
+ const { containerElem } = reactData;
99
+ if (containerElem) {
100
+ const wrapperElList = containerElem.querySelectorAll(allHrefList.map(href => `${href}`).join(','));
101
+ for (let i = 0; i < wrapperElList.length; i++) {
102
+ const wrapperEl = wrapperElList[i];
103
+ const wrapperRect = wrapperEl.getBoundingClientRect();
104
+ if (wrapperRect.top > 0) {
105
+ const href = wrapperEl.id;
106
+ reactData.activeHref = `#${href}`;
107
+ break;
108
+ }
109
+ }
110
+ }
111
+ },
112
+ removeContainerElemScroll() {
113
+ const $xeAnchor = this;
114
+ const reactData = $xeAnchor.reactData;
115
+ const { containerElem } = reactData;
116
+ if (containerElem) {
117
+ containerElem.removeEventListener('scroll', $xeAnchor.handleContainerScrollEvent);
118
+ }
119
+ },
120
+ updateContainerElem() {
121
+ const $xeAnchor = this;
122
+ const reactData = $xeAnchor.reactData;
123
+ const containerElem = $xeAnchor.getContainerElem();
124
+ reactData.containerElem = containerElem;
125
+ if (containerElem) {
126
+ containerElem.addEventListener('scroll', $xeAnchor.handleContainerScrollEvent, {
127
+ passive: false
128
+ });
129
+ }
130
+ },
131
+ updateMarkerPos() {
132
+ const $xeAnchor = this;
133
+ const reactData = $xeAnchor.reactData;
134
+ $xeAnchor.$nextTick(() => {
135
+ const { activeHref } = reactData;
136
+ const elem = $xeAnchor.$refs.refElem;
137
+ const markerEl = $xeAnchor.$refs.refMarkerElem;
138
+ if (elem && markerEl) {
139
+ if (activeHref) {
140
+ const linkEl = elem.querySelector(`[href="${activeHref}"]`);
141
+ if (linkEl) {
142
+ const { top } = getOffsetPos(linkEl, elem);
143
+ markerEl.style.top = `${top}px`;
144
+ }
145
+ }
146
+ }
147
+ });
148
+ },
149
+ handleClickLink(evnt, href) {
150
+ const $xeAnchor = this;
151
+ evnt.preventDefault();
152
+ const targetEl = document.getElementById(`${href}`.replace('#', ''));
153
+ if (targetEl) {
154
+ targetEl.scrollIntoView({
155
+ behavior: 'smooth'
156
+ });
157
+ }
158
+ $xeAnchor.emitEvent(href);
159
+ $xeAnchor.dispatchEvent('click', { href }, evnt);
160
+ },
161
+ //
162
+ // Render
163
+ //
164
+ renderSubItems(h, options) {
165
+ const $xeAnchor = this;
166
+ const itemVNs = [];
167
+ if (options) {
168
+ options.forEach(item => {
169
+ const subItems = item.children;
170
+ if (subItems && subItems.length) {
171
+ itemVNs.push(h(VxeAnchorLinkComponent, {
172
+ props: {
173
+ content: item.content,
174
+ title: item.title,
175
+ href: item.href
176
+ },
177
+ scopedSlots: {
178
+ sub: () => $xeAnchor.renderSubItems(h, subItems)
179
+ }
180
+ }));
181
+ }
182
+ else {
183
+ itemVNs.push(h(VxeAnchorLinkComponent, {
184
+ props: {
185
+ content: item.content,
186
+ title: item.title,
187
+ href: item.href
188
+ }
189
+ }));
190
+ }
191
+ });
192
+ }
193
+ return itemVNs;
194
+ },
195
+ renderVN(h) {
196
+ const $xeAnchor = this;
197
+ const props = $xeAnchor;
198
+ const slots = $xeAnchor.$scopedSlots;
199
+ const { options, showMarker } = props;
200
+ const defaultSlot = slots.default;
201
+ return h('div', {
202
+ ref: 'refElem',
203
+ class: ['vxe-anchor', {
204
+ 'is--marker': showMarker
205
+ }]
206
+ }, [
207
+ h('div', {
208
+ class: 'vxe-anchor--list'
209
+ }, defaultSlot ? defaultSlot({}) : $xeAnchor.renderSubItems(h, options)),
210
+ showMarker
211
+ ? h('div', {
212
+ ref: 'refMarkerElem',
213
+ class: 'vxe-anchor--marker'
214
+ })
215
+ : renderEmptyElement($xeAnchor)
216
+ ]);
217
+ }
218
+ },
219
+ mounted() {
220
+ const $xeAnchor = this;
221
+ $xeAnchor.$nextTick(() => {
222
+ $xeAnchor.updateContainerElem();
223
+ });
224
+ },
225
+ beforeDestroy() {
226
+ const $xeAnchor = this;
227
+ $xeAnchor.removeContainerElemScroll();
228
+ },
229
+ render(h) {
230
+ return this.renderVN(h);
231
+ }
232
+ });
@@ -0,0 +1,19 @@
1
+ import XEUtils from 'xe-utils';
2
+ export function assembleAnchorLink($xeAnchor, elem, linkConfig, $xeParentAnchorLink) {
3
+ const staticLinks = $xeAnchor.reactData.staticLinks;
4
+ const parentElem = elem.parentNode;
5
+ const parentLinkConfig = $xeParentAnchorLink ? $xeParentAnchorLink.linkConfig : null;
6
+ const parentLinks = parentLinkConfig ? parentLinkConfig.children : staticLinks;
7
+ if (parentElem && parentLinks) {
8
+ parentLinks.splice(XEUtils.arrayIndexOf(parentElem.children, elem), 0, linkConfig);
9
+ $xeAnchor.reactData.staticLinks = staticLinks.slice(0);
10
+ }
11
+ }
12
+ export function destroyAnchorLink($xeAnchor, linkConfig) {
13
+ const staticLinks = $xeAnchor.reactData.staticLinks;
14
+ const matchObj = XEUtils.findTree(staticLinks, item => item.id === linkConfig.id, { children: 'children' });
15
+ if (matchObj) {
16
+ matchObj.items.splice(matchObj.index, 1);
17
+ }
18
+ $xeAnchor.reactData.staticLinks = staticLinks.slice(0);
19
+ }
@@ -0,0 +1,42 @@
1
+ .vxe-anchor {
2
+ position: relative;
3
+ color: var(--vxe-ui-font-color);
4
+ font-family: var(--vxe-ui-font-family);
5
+ }
6
+
7
+ .vxe-anchor--marker {
8
+ position: absolute;
9
+ left: 0;
10
+ top: 0;
11
+ width: 0.2em;
12
+ height: 1.5em;
13
+ padding: 0.25em 0;
14
+ transition: all 0.35s ease-in-out;
15
+ }
16
+ .vxe-anchor--marker::before {
17
+ display: block;
18
+ content: "";
19
+ height: 100%;
20
+ width: 100%;
21
+ border-radius: 1em;
22
+ background-color: var(--vxe-ui-anchor-link-active-color);
23
+ }
24
+
25
+ .vxe-anchor-link {
26
+ position: relative;
27
+ padding-left: 0.6em;
28
+ }
29
+ .vxe-anchor-link.is--active > .vxe-anchor-link--item {
30
+ color: var(--vxe-ui-anchor-link-active-color);
31
+ }
32
+
33
+ .vxe-anchor-link--item {
34
+ display: block;
35
+ height: 1.5em;
36
+ line-height: 1.5em;
37
+ overflow: hidden;
38
+ text-overflow: ellipsis;
39
+ white-space: nowrap;
40
+ cursor: pointer;
41
+ color: var(--vxe-ui-anchor-link-color);
42
+ }
@@ -0,0 +1 @@
1
+ .vxe-anchor{position:relative;color:var(--vxe-ui-font-color);font-family:var(--vxe-ui-font-family)}.vxe-anchor--marker{position:absolute;left:0;top:0;width:.2em;height:1.5em;padding:.25em 0;transition:all .35s ease-in-out}.vxe-anchor--marker::before{display:block;content:"";height:100%;width:100%;border-radius:1em;background-color:var(--vxe-ui-anchor-link-active-color)}.vxe-anchor-link{position:relative;padding-left:.6em}.vxe-anchor-link.is--active>.vxe-anchor-link--item{color:var(--vxe-ui-anchor-link-active-color)}.vxe-anchor-link--item{display:block;height:1.5em;line-height:1.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;color:var(--vxe-ui-anchor-link-color)}