foucui 1.0.1 → 2.0.0

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 (371) hide show
  1. package/README.md +8 -8
  2. package/README.publish.md +19 -0
  3. package/dist/components/{QiuAnchor → FouAnchor}/context.d.ts +4 -4
  4. package/dist/components/{QiuBadge → FouBadge}/composables/useTableHostHeight.d.ts +1 -1
  5. package/dist/components/FouBadge/index.d.ts +18 -0
  6. package/dist/components/{QiuBadge → FouBadge}/shared/BadgeTemplateRenderer.vue.d.ts +1 -1
  7. package/dist/components/{QiuBadge → FouBadge}/shared/badgeTemplate.d.ts +1 -1
  8. package/dist/components/{QiuButton → FouButton}/index.vue.d.ts +4 -4
  9. package/dist/components/{QiuCanvasKit/QiuCanvasEditor.vue.d.ts → FouCanvasKit/FouCanvasEditor.vue.d.ts} +4 -2
  10. package/dist/components/{QiuCanvasKit → FouCanvasKit}/components/DataModulesPanel.vue.d.ts +1 -0
  11. package/dist/components/{QiuCanvasKit → FouCanvasKit}/index.d.ts +4 -4
  12. package/dist/components/{QiuCanvasKit → FouCanvasKit}/types.d.ts +1 -1
  13. package/dist/components/{QiuCarousel → FouCarousel}/context.d.ts +4 -4
  14. package/dist/components/{QiuCascader → FouCascader}/types.d.ts +7 -7
  15. package/dist/components/{QiuCheckbox → FouCheckbox}/types.d.ts +1 -1
  16. package/dist/components/{QiuCollapse → FouCollapse}/context.d.ts +2 -2
  17. package/dist/components/{QiuDescriptions → FouDescriptions}/context.d.ts +4 -4
  18. package/dist/components/{QiuDropdown → FouDropdown}/context.d.ts +2 -2
  19. package/dist/components/{QiuForm → FouForm}/types.d.ts +10 -10
  20. package/dist/components/FouLoading/index.d.ts +26 -0
  21. package/dist/components/{QiuLoading → FouLoading}/spinner.vue.d.ts +3 -3
  22. package/dist/components/{QiuLoading → FouLoading}/types.d.ts +2 -2
  23. package/dist/components/{QiuMenu → FouMenu}/context.d.ts +2 -2
  24. package/dist/components/{QiuMenuNav → FouMenuNav}/context.d.ts +2 -2
  25. package/dist/components/{QiuMsg/QiuMsgItem.vue.d.ts → FouMsg/FouMsgItem.vue.d.ts} +3 -3
  26. package/dist/components/FouMsg/index.d.ts +30 -0
  27. package/dist/components/{QiuMsg → FouMsg}/types.d.ts +5 -5
  28. package/dist/components/{QiuMsgBox → FouMsgBox}/index.d.ts +3 -3
  29. package/dist/components/{QiuNotification/QiuNotificationItem.vue.d.ts → FouNotification/FouNotificationItem.vue.d.ts} +3 -3
  30. package/dist/components/FouNotification/index.d.ts +30 -0
  31. package/dist/components/FouNotification/types.d.ts +12 -0
  32. package/dist/components/{QiuRadio → FouRadio}/types.d.ts +1 -1
  33. package/dist/components/FouRow/types.d.ts +4 -0
  34. package/dist/components/{QiuSelect → FouSelect}/index.vue.d.ts +3 -3
  35. package/dist/components/{QiuSelect → FouSelect}/types.d.ts +3 -3
  36. package/dist/components/{QiuStep → FouStep}/index.vue.d.ts +1 -1
  37. package/dist/components/{QiuSteps → FouSteps}/context.d.ts +5 -5
  38. package/dist/components/{QiuTabBar → FouTabBar}/index.vue.d.ts +3 -3
  39. package/dist/components/{QiuTabBar → FouTabBar}/types.d.ts +5 -5
  40. package/dist/components/{QiuTable → FouTable}/export.d.ts +5 -5
  41. package/dist/components/FouTable/index.d.ts +3 -0
  42. package/dist/components/{QiuTable → FouTable}/index.vue.d.ts +60 -60
  43. package/dist/components/FouTable/registry.d.ts +39 -0
  44. package/dist/components/{QiuTable → FouTable}/types.d.ts +60 -60
  45. package/dist/components/{QiuTable → FouTable}/useArea.d.ts +10 -10
  46. package/dist/components/{QiuTable → FouTable}/useColumns.d.ts +5 -5
  47. package/dist/components/FouTable/useEdit.d.ts +36 -0
  48. package/dist/components/{QiuTable → FouTable}/useHistory.d.ts +5 -5
  49. package/dist/components/{QiuTable → FouTable}/useMerge.d.ts +6 -6
  50. package/dist/components/{QiuTable → FouTable}/useScrollSync.d.ts +1 -1
  51. package/dist/components/{QiuTable → FouTable}/utils.d.ts +17 -17
  52. package/dist/components/FouTree/types.d.ts +13 -0
  53. package/dist/components/{QiuUpload → FouUpload}/index.vue.d.ts +17 -17
  54. package/dist/foucui.css +1 -1
  55. package/dist/foucui.js +10749 -10646
  56. package/dist/foucui.umd.cjs +40 -40
  57. package/dist/index.d.ts +43 -43
  58. package/dist/src/bridge/@/config/index.d.ts +1 -1
  59. package/dist/src/bridge/@fou/plugins/shortcuts.d.ts +2 -0
  60. package/package.json +27 -15
  61. package/components/QiuAffix/index.vue +0 -186
  62. package/components/QiuAlert/index.vue +0 -208
  63. package/components/QiuAnchor/context.ts +0 -18
  64. package/components/QiuAnchor/index.vue +0 -180
  65. package/components/QiuAnchorLink/index.vue +0 -67
  66. package/components/QiuApp/index.vue +0 -9
  67. package/components/QiuAutocomplete/index.vue +0 -408
  68. package/components/QiuAvatar/index.vue +0 -140
  69. package/components/QiuBacktop/index.vue +0 -121
  70. package/components/QiuBadge/api/index.ts +0 -389
  71. package/components/QiuBadge/components/BadgeImagePickerDialog.vue +0 -243
  72. package/components/QiuBadge/components/BadgeLibraryManagerDialog.vue +0 -30
  73. package/components/QiuBadge/components/BadgeLibraryPanel.vue +0 -182
  74. package/components/QiuBadge/composables/useTableHostHeight.ts +0 -53
  75. package/components/QiuBadge/index.ts +0 -18
  76. package/components/QiuBadge/shared/BadgeTemplateRenderer.vue +0 -32
  77. package/components/QiuBadge/shared/assetUrl.ts +0 -26
  78. package/components/QiuBadge/shared/badgeTemplate.ts +0 -309
  79. package/components/QiuBadge/utils/chinaAreaData.ts +0 -44
  80. package/components/QiuBadge/utils/hostRegion.ts +0 -22
  81. package/components/QiuBadge/utils/pca-code.json +0 -1
  82. package/components/QiuBadge/utils/pdfFromElement.ts +0 -348
  83. package/components/QiuBadge/views/BadgeLibraryView.vue +0 -32
  84. package/components/QiuBadge/views/BadgeManageView.vue +0 -1364
  85. package/components/QiuBadge/views/BadgeTemplateEditorView.vue +0 -10
  86. package/components/QiuBadge/views/BadgeTemplateListView.vue +0 -229
  87. package/components/QiuBadge/views/DeskLabelTemplateListView.vue +0 -227
  88. package/components/QiuBadge/views/DeskLabelView.vue +0 -683
  89. package/components/QiuBadgeDot/index.vue +0 -87
  90. package/components/QiuButton/index.vue +0 -247
  91. package/components/QiuButtonGroup/index.vue +0 -63
  92. package/components/QiuCanvasKit/QiuCanvasEditor.vue +0 -5503
  93. package/components/QiuCanvasKit/QiuCanvasRenderer.vue +0 -348
  94. package/components/QiuCanvasKit/assetUrl.ts +0 -11
  95. package/components/QiuCanvasKit/components/DataModulesPanel.vue +0 -352
  96. package/components/QiuCanvasKit/export/html.ts +0 -132
  97. package/components/QiuCanvasKit/export/pdf.ts +0 -48
  98. package/components/QiuCanvasKit/export/png.ts +0 -50
  99. package/components/QiuCanvasKit/index.ts +0 -20
  100. package/components/QiuCanvasKit/modules/badgeCompat.ts +0 -84
  101. package/components/QiuCanvasKit/modules/dataRegistry.ts +0 -207
  102. package/components/QiuCanvasKit/modules/merge.ts +0 -71
  103. package/components/QiuCanvasKit/presets/badge.ts +0 -67
  104. package/components/QiuCanvasKit/presets/banner.ts +0 -79
  105. package/components/QiuCanvasKit/types.ts +0 -138
  106. package/components/QiuCard/index.vue +0 -104
  107. package/components/QiuCarousel/context.ts +0 -16
  108. package/components/QiuCarousel/index.vue +0 -343
  109. package/components/QiuCarouselItem/index.vue +0 -47
  110. package/components/QiuCascader/index.vue +0 -879
  111. package/components/QiuCascader/types.ts +0 -48
  112. package/components/QiuCheckbox/QiuCheckboxGroup.vue +0 -78
  113. package/components/QiuCheckbox/index.vue +0 -231
  114. package/components/QiuCheckbox/types.ts +0 -8
  115. package/components/QiuCode/index.vue +0 -64
  116. package/components/QiuCol/col.scss +0 -55
  117. package/components/QiuCol/index.vue +0 -64
  118. package/components/QiuCollapse/context.ts +0 -10
  119. package/components/QiuCollapse/index.vue +0 -70
  120. package/components/QiuCollapseItem/index.vue +0 -167
  121. package/components/QiuColorField/index.vue +0 -296
  122. package/components/QiuColorPicker/README.md +0 -118
  123. package/components/QiuColorPicker/index.vue +0 -60
  124. package/components/QiuColorfulCard/index.vue +0 -101
  125. package/components/QiuCombobox/index.vue +0 -277
  126. package/components/QiuConfigProvider/index.vue +0 -31
  127. package/components/QiuContextMenu/index.vue +0 -209
  128. package/components/QiuDate/index.vue +0 -1134
  129. package/components/QiuDescriptions/context.ts +0 -20
  130. package/components/QiuDescriptions/index.vue +0 -115
  131. package/components/QiuDescriptionsItem/index.vue +0 -103
  132. package/components/QiuDialog/index.vue +0 -828
  133. package/components/QiuDigitalCard/index.vue +0 -159
  134. package/components/QiuDivider/index.vue +0 -185
  135. package/components/QiuDot/index.vue +0 -83
  136. package/components/QiuDrawer/index.vue +0 -350
  137. package/components/QiuDropdown/QiuDropdownItem.vue +0 -74
  138. package/components/QiuDropdown/QiuDropdownMenu.vue +0 -22
  139. package/components/QiuDropdown/context.ts +0 -9
  140. package/components/QiuDropdown/index.vue +0 -189
  141. package/components/QiuEmpty/index.vue +0 -73
  142. package/components/QiuForm/index.vue +0 -172
  143. package/components/QiuForm/types.ts +0 -39
  144. package/components/QiuFormItem/index.vue +0 -276
  145. package/components/QiuFullscreen/index.vue +0 -11
  146. package/components/QiuGrid/index.vue +0 -408
  147. package/components/QiuHoverCard/index.vue +0 -192
  148. package/components/QiuIcon/index.vue +0 -117
  149. package/components/QiuIconPicker/iconify.libraries.ts +0 -182
  150. package/components/QiuIconPicker/icons.catalog.ts +0 -3072
  151. package/components/QiuIconPicker/index.vue +0 -488
  152. package/components/QiuImage/index.vue +0 -177
  153. package/components/QiuInput/index.vue +0 -328
  154. package/components/QiuInputNumber/index.vue +0 -295
  155. package/components/QiuInputOtp/index.vue +0 -190
  156. package/components/QiuKbd/index.vue +0 -57
  157. package/components/QiuLayoutContainer/index.vue +0 -50
  158. package/components/QiuLinkPreview/index.vue +0 -224
  159. package/components/QiuLoading/index.ts +0 -176
  160. package/components/QiuLoading/spinner.vue +0 -820
  161. package/components/QiuLoading/types.ts +0 -44
  162. package/components/QiuMention/index.vue +0 -299
  163. package/components/QiuMenu/QiuMenuRoot.vue +0 -241
  164. package/components/QiuMenu/components/QiuMenuItem.vue +0 -340
  165. package/components/QiuMenu/components/QiuSubMenu.vue +0 -504
  166. package/components/QiuMenu/context.ts +0 -21
  167. package/components/QiuMenu/index.vue +0 -43
  168. package/components/QiuMenuNav/QiuMenuNavItem.vue +0 -100
  169. package/components/QiuMenuNav/QiuMenuNavSub.vue +0 -120
  170. package/components/QiuMenuNav/context.ts +0 -14
  171. package/components/QiuMenuNav/index.vue +0 -148
  172. package/components/QiuMsg/QiuMsgItem.vue +0 -180
  173. package/components/QiuMsg/index.ts +0 -158
  174. package/components/QiuMsg/types.ts +0 -23
  175. package/components/QiuMsgBox/index.ts +0 -147
  176. package/components/QiuNotification/QiuNotificationItem.vue +0 -168
  177. package/components/QiuNotification/index.ts +0 -155
  178. package/components/QiuNotification/types.ts +0 -14
  179. package/components/QiuPage/index.vue +0 -12
  180. package/components/QiuPageHeader/index.vue +0 -115
  181. package/components/QiuPageMain/index.vue +0 -78
  182. package/components/QiuPagination/index.vue +0 -421
  183. package/components/QiuPasswordStrength/index.vue +0 -101
  184. package/components/QiuPopconfirm/index.vue +0 -196
  185. package/components/QiuPopover/index.vue +0 -277
  186. package/components/QiuProgress/index.vue +0 -235
  187. package/components/QiuQrcode/index.vue +0 -302
  188. package/components/QiuQueryForm/components/QiuQueryFormBottomPanel.vue +0 -13
  189. package/components/QiuQueryForm/components/QiuQueryFormLeftPanel.vue +0 -37
  190. package/components/QiuQueryForm/components/QiuQueryFormRightPanel.vue +0 -37
  191. package/components/QiuQueryForm/components/QiuQueryFormTopPanel.vue +0 -13
  192. package/components/QiuQueryForm/index.vue +0 -117
  193. package/components/QiuRadio/QiuRadioGroup.vue +0 -75
  194. package/components/QiuRadio/index.vue +0 -191
  195. package/components/QiuRadio/types.ts +0 -9
  196. package/components/QiuRate/index.vue +0 -184
  197. package/components/QiuRefresh/index.vue +0 -32
  198. package/components/QiuResult/index.vue +0 -103
  199. package/components/QiuRow/index.vue +0 -60
  200. package/components/QiuRow/types.ts +0 -5
  201. package/components/QiuScrollbar/index.vue +0 -107
  202. package/components/QiuSearchBar/index.vue +0 -154
  203. package/components/QiuSegmented/index.vue +0 -120
  204. package/components/QiuSelect/QiuOption.vue +0 -93
  205. package/components/QiuSelect/index.vue +0 -452
  206. package/components/QiuSelect/types.ts +0 -15
  207. package/components/QiuSkeleton/index.vue +0 -78
  208. package/components/QiuSlider/index.vue +0 -266
  209. package/components/QiuSpace/index.vue +0 -95
  210. package/components/QiuSparkline/index.vue +0 -92
  211. package/components/QiuStatistic/index.vue +0 -4
  212. package/components/QiuStatistics/index.vue +0 -123
  213. package/components/QiuStep/index.vue +0 -220
  214. package/components/QiuSteps/context.ts +0 -25
  215. package/components/QiuSteps/index.vue +0 -84
  216. package/components/QiuSwitch/index.vue +0 -145
  217. package/components/QiuTabBar/index.vue +0 -218
  218. package/components/QiuTabBar/types.ts +0 -19
  219. package/components/QiuTabPane/index.vue +0 -82
  220. package/components/QiuTable/columns.ts +0 -16
  221. package/components/QiuTable/export.ts +0 -102
  222. package/components/QiuTable/index.ts +0 -24
  223. package/components/QiuTable/index.vue +0 -3503
  224. package/components/QiuTable/registry.ts +0 -75
  225. package/components/QiuTable/styles/table.scss +0 -1230
  226. package/components/QiuTable/types.ts +0 -413
  227. package/components/QiuTable/useArea.ts +0 -202
  228. package/components/QiuTable/useColumns.ts +0 -325
  229. package/components/QiuTable/useEdit.ts +0 -136
  230. package/components/QiuTable/useExtras.ts +0 -115
  231. package/components/QiuTable/useHistory.ts +0 -77
  232. package/components/QiuTable/useMerge.ts +0 -105
  233. package/components/QiuTable/useResize.ts +0 -86
  234. package/components/QiuTable/useScrollSync.ts +0 -152
  235. package/components/QiuTable/useVirtual.ts +0 -97
  236. package/components/QiuTable/utils.ts +0 -165
  237. package/components/QiuTableColumn/index.vue +0 -101
  238. package/components/QiuTag/index.vue +0 -143
  239. package/components/QiuText/index.vue +0 -99
  240. package/components/QiuTime/index.vue +0 -548
  241. package/components/QiuTimeAgo/index.vue +0 -103
  242. package/components/QiuTimeline/index.vue +0 -54
  243. package/components/QiuTimelineItem/index.vue +0 -140
  244. package/components/QiuTips/index.vue +0 -323
  245. package/components/QiuTooltip/index.vue +0 -237
  246. package/components/QiuTransfer/index.vue +0 -277
  247. package/components/QiuTree/QiuTreeNode.vue +0 -146
  248. package/components/QiuTree/index.vue +0 -143
  249. package/components/QiuTree/types.ts +0 -30
  250. package/components/QiuTreeSelect/index.vue +0 -259
  251. package/components/QiuTrend/index.vue +0 -92
  252. package/components/QiuUpload/index.vue +0 -628
  253. package/components/QiuUploadCrop/index.vue +0 -1267
  254. package/components/QiuWatermark/index.vue +0 -121
  255. package/components/useBodyScrollLock.ts +0 -28
  256. package/dist/components/QiuBadge/index.d.ts +0 -18
  257. package/dist/components/QiuBadge/utils/pca-code.json.d.ts +0 -3
  258. package/dist/components/QiuLoading/index.d.ts +0 -26
  259. package/dist/components/QiuMsg/index.d.ts +0 -30
  260. package/dist/components/QiuNotification/index.d.ts +0 -30
  261. package/dist/components/QiuNotification/types.d.ts +0 -12
  262. package/dist/components/QiuRow/types.d.ts +0 -4
  263. package/dist/components/QiuTable/index.d.ts +0 -3
  264. package/dist/components/QiuTable/registry.d.ts +0 -39
  265. package/dist/components/QiuTable/useEdit.d.ts +0 -36
  266. package/dist/components/QiuTree/types.d.ts +0 -13
  267. package/dist/src/bridge/@qiu/plugins/shortcuts.d.ts +0 -2
  268. package/plugins/qiu.ts +0 -83
  269. package/plugins/shortcuts.ts +0 -69
  270. package/src/bridge/@/api/media.ts +0 -8
  271. package/src/bridge/@/api/notice.ts +0 -5
  272. package/src/bridge/@/config/index.ts +0 -38
  273. package/src/bridge/@/config/media.config.ts +0 -37
  274. package/src/bridge/@/config/security.config.ts +0 -8
  275. package/src/bridge/@/i18n/index.ts +0 -6
  276. package/src/bridge/@/store/modules/bing.ts +0 -9
  277. package/src/bridge/@/store/modules/errorLog.ts +0 -9
  278. package/src/bridge/@/store/modules/media.ts +0 -10
  279. package/src/bridge/@/store/modules/routes.ts +0 -10
  280. package/src/bridge/@/store/modules/settings.ts +0 -9
  281. package/src/bridge/@/store/modules/tabs.ts +0 -9
  282. package/src/bridge/@/store/modules/user.ts +0 -9
  283. package/src/bridge/@/utils/convertToCamelCase.ts +0 -11
  284. package/src/bridge/@/utils/index.ts +0 -9
  285. package/src/bridge/@/utils/pageTitle.ts +0 -4
  286. package/src/bridge/@/utils/routes.ts +0 -14
  287. package/src/bridge/@/utils/validate.ts +0 -17
  288. package/src/bridge/@qiu/plugins/shortcuts.ts +0 -3
  289. package/src/i18n.ts +0 -8
  290. package/src/icons/qiu-logo.svg +0 -1
  291. package/styles/dark.scss +0 -194
  292. package/styles/normalize.css +0 -349
  293. package/styles/plain.scss +0 -423
  294. package/styles/qiu-tokens.scss +0 -40
  295. package/styles/qiu.scss +0 -1149
  296. package/styles/technology.scss +0 -452
  297. package/styles/var.scss +0 -382
  298. package/styles/variables.scss +0 -77
  299. /package/dist/components/{QiuAnchorLink → FouAnchorLink}/index.vue.d.ts +0 -0
  300. /package/dist/components/{QiuBadge → FouBadge}/api/index.d.ts +0 -0
  301. /package/dist/components/{QiuBadge → FouBadge}/components/BadgeImagePickerDialog.vue.d.ts +0 -0
  302. /package/dist/components/{QiuBadge → FouBadge}/components/BadgeLibraryManagerDialog.vue.d.ts +0 -0
  303. /package/dist/components/{QiuBadge → FouBadge}/components/BadgeLibraryPanel.vue.d.ts +0 -0
  304. /package/dist/components/{QiuBadge → FouBadge}/shared/assetUrl.d.ts +0 -0
  305. /package/dist/components/{QiuBadge → FouBadge}/utils/chinaAreaData.d.ts +0 -0
  306. /package/dist/components/{QiuBadge → FouBadge}/utils/hostRegion.d.ts +0 -0
  307. /package/dist/components/{QiuBadge → FouBadge}/utils/pdfFromElement.d.ts +0 -0
  308. /package/dist/components/{QiuBadge → FouBadge}/views/BadgeLibraryView.vue.d.ts +0 -0
  309. /package/dist/components/{QiuBadge → FouBadge}/views/BadgeManageView.vue.d.ts +0 -0
  310. /package/dist/components/{QiuBadge → FouBadge}/views/BadgeTemplateListView.vue.d.ts +0 -0
  311. /package/dist/components/{QiuBadge → FouBadge}/views/DeskLabelTemplateListView.vue.d.ts +0 -0
  312. /package/dist/components/{QiuBadge → FouBadge}/views/DeskLabelView.vue.d.ts +0 -0
  313. /package/dist/components/{QiuCanvasKit/QiuCanvasRenderer.vue.d.ts → FouCanvasKit/FouCanvasRenderer.vue.d.ts} +0 -0
  314. /package/dist/components/{QiuCanvasKit → FouCanvasKit}/assetUrl.d.ts +0 -0
  315. /package/dist/components/{QiuCanvasKit → FouCanvasKit}/export/html.d.ts +0 -0
  316. /package/dist/components/{QiuCanvasKit → FouCanvasKit}/export/pdf.d.ts +0 -0
  317. /package/dist/components/{QiuCanvasKit → FouCanvasKit}/export/png.d.ts +0 -0
  318. /package/dist/components/{QiuCanvasKit → FouCanvasKit}/modules/badgeCompat.d.ts +0 -0
  319. /package/dist/components/{QiuCanvasKit → FouCanvasKit}/modules/dataRegistry.d.ts +0 -0
  320. /package/dist/components/{QiuCanvasKit → FouCanvasKit}/modules/merge.d.ts +0 -0
  321. /package/dist/components/{QiuCanvasKit → FouCanvasKit}/presets/badge.d.ts +0 -0
  322. /package/dist/components/{QiuCanvasKit → FouCanvasKit}/presets/banner.d.ts +0 -0
  323. /package/dist/components/{QiuCarouselItem → FouCarouselItem}/index.vue.d.ts +0 -0
  324. /package/dist/components/{QiuCheckbox/QiuCheckboxGroup.vue.d.ts → FouCheckbox/FouCheckboxGroup.vue.d.ts} +0 -0
  325. /package/dist/components/{QiuCheckbox → FouCheckbox}/index.vue.d.ts +0 -0
  326. /package/dist/components/{QiuCode → FouCode}/index.vue.d.ts +0 -0
  327. /package/dist/components/{QiuCollapseItem → FouCollapseItem}/index.vue.d.ts +0 -0
  328. /package/dist/components/{QiuColorField → FouColorField}/index.vue.d.ts +0 -0
  329. /package/dist/components/{QiuColorPicker → FouColorPicker}/index.vue.d.ts +0 -0
  330. /package/dist/components/{QiuCombobox → FouCombobox}/index.vue.d.ts +0 -0
  331. /package/dist/components/{QiuContextMenu → FouContextMenu}/index.vue.d.ts +0 -0
  332. /package/dist/components/{QiuDescriptionsItem → FouDescriptionsItem}/index.vue.d.ts +0 -0
  333. /package/dist/components/{QiuDigitalCard → FouDigitalCard}/index.vue.d.ts +0 -0
  334. /package/dist/components/{QiuDropdown/QiuDropdownItem.vue.d.ts → FouDropdown/FouDropdownItem.vue.d.ts} +0 -0
  335. /package/dist/components/{QiuDropdown/QiuDropdownMenu.vue.d.ts → FouDropdown/FouDropdownMenu.vue.d.ts} +0 -0
  336. /package/dist/components/{QiuDropdown → FouDropdown}/index.vue.d.ts +0 -0
  337. /package/dist/components/{QiuHoverCard → FouHoverCard}/index.vue.d.ts +0 -0
  338. /package/dist/components/{QiuIcon → FouIcon}/index.vue.d.ts +0 -0
  339. /package/dist/components/{QiuIconPicker → FouIconPicker}/iconify.libraries.d.ts +0 -0
  340. /package/dist/components/{QiuIconPicker → FouIconPicker}/icons.catalog.d.ts +0 -0
  341. /package/dist/components/{QiuInput → FouInput}/index.vue.d.ts +0 -0
  342. /package/dist/components/{QiuInputNumber → FouInputNumber}/index.vue.d.ts +0 -0
  343. /package/dist/components/{QiuInputOtp → FouInputOtp}/index.vue.d.ts +0 -0
  344. /package/dist/components/{QiuKbd → FouKbd}/index.vue.d.ts +0 -0
  345. /package/dist/components/{QiuLayoutContainer → FouLayoutContainer}/index.vue.d.ts +0 -0
  346. /package/dist/components/{QiuLinkPreview → FouLinkPreview}/index.vue.d.ts +0 -0
  347. /package/dist/components/{QiuMention → FouMention}/index.vue.d.ts +0 -0
  348. /package/dist/components/{QiuMenu/QiuMenuRoot.vue.d.ts → FouMenu/FouMenuRoot.vue.d.ts} +0 -0
  349. /package/dist/components/{QiuMenuNav/QiuMenuNavItem.vue.d.ts → FouMenuNav/FouMenuNavItem.vue.d.ts} +0 -0
  350. /package/dist/components/{QiuMenuNav/QiuMenuNavSub.vue.d.ts → FouMenuNav/FouMenuNavSub.vue.d.ts} +0 -0
  351. /package/dist/components/{QiuMenuNav → FouMenuNav}/index.vue.d.ts +0 -0
  352. /package/dist/components/{QiuPageMain → FouPageMain}/index.vue.d.ts +0 -0
  353. /package/dist/components/{QiuPagination → FouPagination}/index.vue.d.ts +0 -0
  354. /package/dist/components/{QiuPasswordStrength → FouPasswordStrength}/index.vue.d.ts +0 -0
  355. /package/dist/components/{QiuQrcode → FouQrcode}/index.vue.d.ts +0 -0
  356. /package/dist/components/{QiuRadio/QiuRadioGroup.vue.d.ts → FouRadio/FouRadioGroup.vue.d.ts} +0 -0
  357. /package/dist/components/{QiuSearchBar → FouSearchBar}/index.vue.d.ts +0 -0
  358. /package/dist/components/{QiuSelect/QiuOption.vue.d.ts → FouSelect/FouOption.vue.d.ts} +0 -0
  359. /package/dist/components/{QiuSparkline → FouSparkline}/index.vue.d.ts +0 -0
  360. /package/dist/components/{QiuSwitch → FouSwitch}/index.vue.d.ts +0 -0
  361. /package/dist/components/{QiuTabPane → FouTabPane}/index.vue.d.ts +0 -0
  362. /package/dist/components/{QiuTable → FouTable}/columns.d.ts +0 -0
  363. /package/dist/components/{QiuTable → FouTable}/useExtras.d.ts +0 -0
  364. /package/dist/components/{QiuTable → FouTable}/useResize.d.ts +0 -0
  365. /package/dist/components/{QiuTable → FouTable}/useVirtual.d.ts +0 -0
  366. /package/dist/components/{QiuTime → FouTime}/index.vue.d.ts +0 -0
  367. /package/dist/components/{QiuTimeAgo → FouTimeAgo}/index.vue.d.ts +0 -0
  368. /package/dist/components/{QiuTimelineItem → FouTimelineItem}/index.vue.d.ts +0 -0
  369. /package/dist/components/{QiuTooltip → FouTooltip}/index.vue.d.ts +0 -0
  370. /package/dist/components/{QiuTrend → FouTrend}/index.vue.d.ts +0 -0
  371. /package/dist/components/{QiuUploadCrop → FouUploadCrop}/index.vue.d.ts +0 -0
package/dist/index.d.ts CHANGED
@@ -1,46 +1,46 @@
1
1
  import { App } from 'vue';
2
- import { QIU_LOADING_EFFECTS, qiuLoading } from './components/QiuLoading';
3
- import { qiuMsg } from './components/QiuMsg';
4
- import { qiuNotify } from './components/QiuNotification';
5
- export declare const version = "1.0.1";
6
- export { qiuMsg, qiuNotify, qiuLoading };
7
- /** QiuCanvasKit:证件 / 桌签 / Banner 统一画布 */
8
- export { QiuCanvasEditor, QiuCanvasRenderer, QiuCanvasDataModulesPanel, mergeTemplateText, mergeBadgeText, flattenBadgeForMerge, flattenDeskLabelForMerge, mapRowToContext, resolveDataModules, cloneBuiltinModules, createCustomModule, sampleContextFromModules, listInsertableFields, createBannerDoc, createBadgeDoc, buildCanvasHtml, downloadCanvasHtml, downloadElementPng, downloadElementPdf, BADGE_PLACEHOLDER_KEYS, BADGE_PLACEHOLDER_LABELS, BUILTIN_DATA_MODULES, LEGACY_FLAT_KEY_MAP, } from './components/QiuCanvasKit';
9
- export type { CanvasKitMode, CanvasKitDoc, CanvasKitElement, DataModuleDef, DataFieldDef, MergeContext, ElementLink, } from './components/QiuCanvasKit';
10
- export { qiuConfirmPromise, qiuAlert, qiuConfirm } from './components/QiuMsgBox';
11
- export { default as QiuButton } from './components/QiuButton/index.vue';
12
- export { default as QiuConfigProvider } from './components/QiuConfigProvider/index.vue';
13
- export { default as QiuColorPicker } from './components/QiuColorPicker/index.vue';
14
- export { default as QiuNotification } from './components/QiuNotification';
15
- export { default as QiuLoading } from './components/QiuLoading';
16
- export { QIU_LOADING_EFFECTS };
17
- export { default as QiuUpload } from './components/QiuUpload/index.vue';
18
- export { default as QiuUploadCrop } from './components/QiuUploadCrop/index.vue';
19
- export { default as QiuTabBar } from './components/QiuTabBar/index.vue';
20
- export { default as QiuTabPane } from './components/QiuTabPane/index.vue';
21
- export { default as QiuContextMenu } from './components/QiuContextMenu/index.vue';
22
- export { default as QiuHoverCard } from './components/QiuHoverCard/index.vue';
23
- export { default as QiuInputOtp } from './components/QiuInputOtp/index.vue';
24
- export { default as QiuKbd } from './components/QiuKbd/index.vue';
25
- export { default as QiuLayoutContainer } from './components/QiuLayoutContainer/index.vue';
26
- export { default as QiuPageMain } from './components/QiuPageMain/index.vue';
27
- export { default as QiuPasswordStrength } from './components/QiuPasswordStrength/index.vue';
28
- export { default as QiuSearchBar } from './components/QiuSearchBar/index.vue';
29
- export { default as QiuTrend } from './components/QiuTrend/index.vue';
30
- export { default as QiuCode } from './components/QiuCode/index.vue';
31
- export { default as QiuCombobox } from './components/QiuCombobox/index.vue';
32
- export { default as QiuDigitalCard } from './components/QiuDigitalCard/index.vue';
33
- export { default as QiuLinkPreview } from './components/QiuLinkPreview/index.vue';
34
- export { default as QiuMention } from './components/QiuMention/index.vue';
35
- export { default as QiuQrcode } from './components/QiuQrcode/index.vue';
36
- export { default as QiuSparkline } from './components/QiuSparkline/index.vue';
37
- export { default as QiuTimeAgo } from './components/QiuTimeAgo/index.vue';
38
- export { qiuApp } from './plugins/qiu';
39
- export type { QiuMsgOptions, QiuMsgPosition, QiuMsgType, QiuMsgFn } from './components/QiuMsg';
40
- export type { QiuNotifyOptions } from './components/QiuNotification';
41
- export type { QiuConfigProviderContext } from './components/QiuConfigProvider/index.vue';
42
- export type { QiuFormRules, QiuFormRule, QiuFormItemContext, QiuFormContext } from './components/QiuForm/types';
43
- export declare const setupQiu: (app: App<Element>) => void;
44
- /** setupQiu 别名(包名 foucui;兼容旧名 qiuye) */
2
+ import { FOU_LOADING_EFFECTS, fouLoading } from './components/FouLoading';
3
+ import { fouMsg } from './components/FouMsg';
4
+ import { fouNotify } from './components/FouNotification';
5
+ export declare const version = "2.0.0";
6
+ export { fouMsg, fouNotify, fouLoading };
7
+ /** FouCanvasKit:证件 / 桌签 / Banner 统一画布 */
8
+ export { FouCanvasEditor, FouCanvasRenderer, FouCanvasDataModulesPanel, mergeTemplateText, mergeBadgeText, flattenBadgeForMerge, flattenDeskLabelForMerge, mapRowToContext, resolveDataModules, cloneBuiltinModules, createCustomModule, sampleContextFromModules, listInsertableFields, createBannerDoc, createBadgeDoc, buildCanvasHtml, downloadCanvasHtml, downloadElementPng, downloadElementPdf, BADGE_PLACEHOLDER_KEYS, BADGE_PLACEHOLDER_LABELS, BUILTIN_DATA_MODULES, LEGACY_FLAT_KEY_MAP, } from './components/FouCanvasKit';
9
+ export type { CanvasKitMode, CanvasKitDoc, CanvasKitElement, DataModuleDef, DataFieldDef, MergeContext, ElementLink, } from './components/FouCanvasKit';
10
+ export { fouConfirmPromise, fouAlert, fouConfirm } from './components/FouMsgBox';
11
+ export { default as FouButton } from './components/FouButton/index.vue';
12
+ export { default as FouConfigProvider } from './components/FouConfigProvider/index.vue';
13
+ export { default as FouColorPicker } from './components/FouColorPicker/index.vue';
14
+ export { default as FouNotification } from './components/FouNotification';
15
+ export { default as FouLoading } from './components/FouLoading';
16
+ export { FOU_LOADING_EFFECTS };
17
+ export { default as FouUpload } from './components/FouUpload/index.vue';
18
+ export { default as FouUploadCrop } from './components/FouUploadCrop/index.vue';
19
+ export { default as FouTabBar } from './components/FouTabBar/index.vue';
20
+ export { default as FouTabPane } from './components/FouTabPane/index.vue';
21
+ export { default as FouContextMenu } from './components/FouContextMenu/index.vue';
22
+ export { default as FouHoverCard } from './components/FouHoverCard/index.vue';
23
+ export { default as FouInputOtp } from './components/FouInputOtp/index.vue';
24
+ export { default as FouKbd } from './components/FouKbd/index.vue';
25
+ export { default as FouLayoutContainer } from './components/FouLayoutContainer/index.vue';
26
+ export { default as FouPageMain } from './components/FouPageMain/index.vue';
27
+ export { default as FouPasswordStrength } from './components/FouPasswordStrength/index.vue';
28
+ export { default as FouSearchBar } from './components/FouSearchBar/index.vue';
29
+ export { default as FouTrend } from './components/FouTrend/index.vue';
30
+ export { default as FouCode } from './components/FouCode/index.vue';
31
+ export { default as FouCombobox } from './components/FouCombobox/index.vue';
32
+ export { default as FouDigitalCard } from './components/FouDigitalCard/index.vue';
33
+ export { default as FouLinkPreview } from './components/FouLinkPreview/index.vue';
34
+ export { default as FouMention } from './components/FouMention/index.vue';
35
+ export { default as FouQrcode } from './components/FouQrcode/index.vue';
36
+ export { default as FouSparkline } from './components/FouSparkline/index.vue';
37
+ export { default as FouTimeAgo } from './components/FouTimeAgo/index.vue';
38
+ export { fouApp } from './plugins/fou';
39
+ export type { FouMsgOptions, FouMsgPosition, FouMsgType, FouMsgFn } from './components/FouMsg';
40
+ export type { FouNotifyOptions } from './components/FouNotification';
41
+ export type { FouConfigProviderContext } from './components/FouConfigProvider/index.vue';
42
+ export type { FouFormRules, FouFormRule, FouFormItemContext, FouFormContext } from './components/FouForm/types';
43
+ export declare const setupFou: (app: App<Element>) => void;
44
+ /** setupFou 别名(包名 foucui;兼容旧名 qiuye) */
45
45
  export declare const setupQiuye: (app: App<Element>) => void;
46
46
  export declare const setupFoucui: (app: App<Element>) => void;
@@ -4,7 +4,7 @@ export declare const uniqueOpened = true;
4
4
  export declare const openFirstMenu = false;
5
5
  export declare const keepAliveMaxNum = 99;
6
6
  export declare const color: string[];
7
- export declare const title = "qiu-ui";
7
+ export declare const title = "fou-ui";
8
8
  export declare const logo = "";
9
9
  export declare const tokenName = "token";
10
10
  export declare const tokenTableName = "token";
@@ -0,0 +1,2 @@
1
+ export declare const FOU_SHORTCUTS: any[];
2
+ export default FOU_SHORTCUTS;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "foucui",
3
- "version": "1.0.1",
4
- "description": "FouCui Vue3 组件库(原 qiuui-vue / qiuye,含 QiuCanvasKit 画布套件)",
3
+ "version": "2.0.0",
4
+ "description": "FouCui Vue3 组件库(组件前缀 Fou/fou-;含 FouCanvasKit)",
5
5
  "type": "module",
6
6
  "main": "./dist/foucui.umd.cjs",
7
7
  "module": "./dist/foucui.js",
@@ -13,23 +13,17 @@
13
13
  "require": "./dist/foucui.umd.cjs"
14
14
  },
15
15
  "./dist/foucui.css": "./dist/foucui.css",
16
+ "./dist/fou.css": "./dist/foucui.css",
16
17
  "./dist/qiuye.css": "./dist/foucui.css",
18
+ "./dist/fouui-vue.css": "./dist/foucui.css",
17
19
  "./dist/qiuui-vue.css": "./dist/foucui.css",
18
- "./styles/*": "./styles/*",
19
- "./components/*": "./components/*",
20
- "./plugins/*": "./plugins/*"
20
+ "./package.json": "./package.json"
21
21
  },
22
22
  "files": [
23
- "dist",
24
- "styles",
25
- "components",
26
- "plugins",
27
- "src"
23
+ "dist"
28
24
  ],
29
25
  "sideEffects": [
30
- "**/*.scss",
31
- "**/*.css",
32
- "virtual:svg-icons-register"
26
+ "**/*.css"
33
27
  ],
34
28
  "scripts": {
35
29
  "build": "vite build",
@@ -41,6 +35,19 @@
41
35
  "vue-router": ">=4.0.0"
42
36
  },
43
37
  "dependencies": {
38
+ "@iconify-json/ant-design": "^1.2.5",
39
+ "@iconify-json/bi": "^1.2.2",
40
+ "@iconify-json/carbon": "^1.2.8",
41
+ "@iconify-json/ep": "^1.2.2",
42
+ "@iconify-json/flagpack": "^1.2.1",
43
+ "@iconify-json/icon-park": "^1.2.2",
44
+ "@iconify-json/icon-park-outline": "^1.2.2",
45
+ "@iconify-json/logos": "^1.2.4",
46
+ "@iconify-json/lucide": "^1.2.45",
47
+ "@iconify-json/mdi": "^1.2.3",
48
+ "@iconify-json/ph": "^1.2.2",
49
+ "@iconify-json/ri": "^1.2.5",
50
+ "@iconify-json/tabler": "^1.2.17",
44
51
  "@iconify/vue": "^4.1.2",
45
52
  "@vueuse/head": "^2.0.0",
46
53
  "axios": "^1.6.0",
@@ -71,13 +78,18 @@
71
78
  "vue": "^3.4.0",
72
79
  "vue-router": "^4.3.0"
73
80
  },
81
+ "author": "qiuye <yjk150@qq.com>",
74
82
  "license": "MIT",
75
83
  "keywords": [
76
84
  "vue3",
77
85
  "foucui",
78
86
  "qiuye",
79
- "qiuui",
87
+ "fouui",
80
88
  "canvas",
81
89
  "badge"
82
- ]
90
+ ],
91
+ "publishConfig": {
92
+ "access": "public",
93
+ "registry": "https://registry.npmjs.org/"
94
+ }
83
95
  }
@@ -1,186 +0,0 @@
1
- <template>
2
- <div ref="rootRef" class="qiu-affix">
3
- <div
4
- v-if="fixed && !useSticky"
5
- class="qiu-affix__placeholder"
6
- :style="{ height: `${placeholderHeight}px` }"
7
- />
8
- <div
9
- ref="affixRef"
10
- class="qiu-affix__content"
11
- :class="{ 'is-fixed': fixed && !useSticky, 'is-sticky': useSticky }"
12
- :style="contentStyle"
13
- >
14
- <slot />
15
- </div>
16
- </div>
17
- </template>
18
-
19
- <script lang="ts" setup>
20
- defineOptions({ name: 'QiuAffix' })
21
-
22
- const props = withDefaults(
23
- defineProps<{
24
- offset?: number
25
- position?: 'top' | 'bottom'
26
- zIndex?: number
27
- /** 滚动容器选择器;指定后优先用 sticky(适合 overflow 容器) */
28
- target?: string
29
- }>(),
30
- {
31
- offset: 0,
32
- position: 'top',
33
- zIndex: 100,
34
- target: '',
35
- }
36
- )
37
-
38
- const emit = defineEmits<{
39
- change: [fixed: boolean]
40
- scroll: [payload: { scrollTop: number; fixed: boolean }]
41
- }>()
42
-
43
- const rootRef = ref<HTMLElement | null>(null)
44
- const affixRef = ref<HTMLElement | null>(null)
45
- const fixed = ref(false)
46
- const placeholderHeight = ref(0)
47
-
48
- /** 有 target 时用 sticky,天然适配 overflow 滚动容器 */
49
- const useSticky = computed(() => !!props.target)
50
-
51
- const getScrollContainer = (): HTMLElement | Window => {
52
- if (!props.target) return window
53
- const el = document.querySelector(props.target)
54
- return (el as HTMLElement) || window
55
- }
56
-
57
- const update = () => {
58
- if (useSticky.value) return
59
-
60
- const root = rootRef.value
61
- const affix = affixRef.value
62
- if (!root || !affix) return
63
-
64
- const container = getScrollContainer()
65
- const rootRect = root.getBoundingClientRect()
66
- placeholderHeight.value = affix.offsetHeight
67
-
68
- let next = false
69
- if (props.position === 'top') {
70
- // 仅判断是否滚过阈值;滚回时自动解除(勿再加与之矛盾的 bottom 条件)
71
- if (container === window) {
72
- next = rootRect.top <= props.offset
73
- } else {
74
- const cTop = (container as HTMLElement).getBoundingClientRect().top
75
- next = rootRect.top <= cTop + props.offset
76
- }
77
- } else if (container === window) {
78
- next = rootRect.bottom >= window.innerHeight - props.offset
79
- } else {
80
- const cBottom = (container as HTMLElement).getBoundingClientRect().bottom
81
- next = rootRect.bottom >= cBottom - props.offset
82
- }
83
-
84
- if (next !== fixed.value) {
85
- fixed.value = next
86
- emit('change', next)
87
- }
88
-
89
- const scrollTop =
90
- container === window
91
- ? window.scrollY || document.documentElement.scrollTop
92
- : (container as HTMLElement).scrollTop
93
- emit('scroll', { scrollTop, fixed: fixed.value })
94
- }
95
-
96
- const contentStyle = computed(() => {
97
- if (useSticky.value) {
98
- return {
99
- position: 'sticky',
100
- zIndex: String(props.zIndex),
101
- ...(props.position === 'top'
102
- ? { top: `${props.offset}px` }
103
- : { bottom: `${props.offset}px` }),
104
- } as Record<string, string>
105
- }
106
-
107
- if (!fixed.value) return undefined
108
-
109
- const container = getScrollContainer()
110
- const style: Record<string, string> = {
111
- position: 'fixed',
112
- zIndex: String(props.zIndex),
113
- width: `${rootRef.value?.offsetWidth ?? 0}px`,
114
- }
115
-
116
- if (props.position === 'top') {
117
- const top =
118
- container === window
119
- ? props.offset
120
- : (container as HTMLElement).getBoundingClientRect().top + props.offset
121
- style.top = `${top}px`
122
- } else {
123
- const bottom =
124
- container === window
125
- ? props.offset
126
- : window.innerHeight -
127
- (container as HTMLElement).getBoundingClientRect().bottom +
128
- props.offset
129
- style.bottom = `${bottom}px`
130
- }
131
-
132
- if (container !== window) {
133
- const rect = (container as HTMLElement).getBoundingClientRect()
134
- style.left = `${rect.left}px`
135
- style.width = `${rect.width}px`
136
- } else if (rootRef.value) {
137
- style.left = `${rootRef.value.getBoundingClientRect().left}px`
138
- }
139
-
140
- return style
141
- })
142
-
143
- let containerEl: HTMLElement | Window = window
144
-
145
- const onScroll = () => update()
146
- const onResize = () => update()
147
-
148
- const bind = () => {
149
- containerEl.removeEventListener('scroll', onScroll)
150
- window.removeEventListener('resize', onResize)
151
- if (useSticky.value) return
152
- containerEl = getScrollContainer()
153
- containerEl.addEventListener('scroll', onScroll, { passive: true })
154
- window.addEventListener('resize', onResize, { passive: true })
155
- update()
156
- }
157
-
158
- onMounted(() => {
159
- nextTick(bind)
160
- })
161
-
162
- onBeforeUnmount(() => {
163
- containerEl.removeEventListener('scroll', onScroll)
164
- window.removeEventListener('resize', onResize)
165
- })
166
-
167
- watch(
168
- () => [props.target, props.offset, props.position],
169
- () => nextTick(bind)
170
- )
171
-
172
- defineExpose({ update })
173
- </script>
174
-
175
- <style lang="scss" scoped>
176
- .qiu-affix {
177
- &__content {
178
- box-sizing: border-box;
179
-
180
- &.is-fixed,
181
- &.is-sticky {
182
- z-index: 10;
183
- }
184
- }
185
- }
186
- </style>
@@ -1,208 +0,0 @@
1
- <template>
2
- <div
3
- v-show="visible"
4
- class="qiu-alert"
5
- :class="[
6
- `qiu-alert--${normalizedType}`,
7
- `qiu-alert--${effect}`,
8
- { 'is-center': center },
9
- ]"
10
- role="alert"
11
- v-bind="$attrs"
12
- >
13
- <qiu-icon v-if="showIcon" class="qiu-alert__icon" :icon="typeIcon" />
14
- <div class="qiu-alert__content">
15
- <div v-if="title || $slots.title" class="qiu-alert__title">
16
- <slot name="title">{{ title }}</slot>
17
- </div>
18
- <div v-if="$slots.default || description" class="qiu-alert__description">
19
- <slot>{{ description }}</slot>
20
- </div>
21
- </div>
22
- <button
23
- v-if="closable"
24
- type="button"
25
- class="qiu-alert__close"
26
- :aria-label="closeText || 'Close'"
27
- @click="handleClose"
28
- >
29
- <span v-if="closeText">{{ closeText }}</span>
30
- <qiu-icon v-else icon="close-line" />
31
- </button>
32
- </div>
33
- </template>
34
-
35
- <script lang="ts" setup>
36
- defineOptions({
37
- name: 'QiuAlert',
38
- })
39
-
40
- const props = defineProps({
41
- title: {
42
- type: String,
43
- default: '',
44
- },
45
- description: {
46
- type: String,
47
- default: '',
48
- },
49
- type: {
50
- type: String as () => 'success' | 'warning' | 'info' | 'error' | 'danger',
51
- default: 'info',
52
- },
53
- closable: {
54
- type: Boolean,
55
- default: false,
56
- },
57
- closeText: {
58
- type: String,
59
- default: '',
60
- },
61
- showIcon: {
62
- type: Boolean,
63
- default: false,
64
- },
65
- center: {
66
- type: Boolean,
67
- default: false,
68
- },
69
- effect: {
70
- type: String as () => 'light' | 'dark',
71
- default: 'light',
72
- },
73
- })
74
-
75
- const emit = defineEmits<{
76
- close: []
77
- }>()
78
-
79
- const visible = ref(true)
80
-
81
- const normalizedType = computed(() => (props.type === 'danger' ? 'error' : props.type))
82
-
83
- const typeIcon = computed(() => {
84
- const map: Record<string, string> = {
85
- success: 'checkbox-circle-line',
86
- warning: 'error-warning-line',
87
- info: 'information-line',
88
- error: 'close-circle-line',
89
- }
90
- return map[normalizedType.value] || map.info
91
- })
92
-
93
- const handleClose = () => {
94
- visible.value = false
95
- emit('close')
96
- }
97
- </script>
98
-
99
- <style lang="scss" scoped>
100
- .qiu-alert {
101
- display: flex;
102
- gap: 8px;
103
- align-items: flex-start;
104
- width: 100%;
105
- padding: 8px 16px;
106
- margin: 0;
107
- overflow: hidden;
108
- border-radius: var(--qiu-border-radius-base, 4px);
109
- box-sizing: border-box;
110
- transition: opacity 0.2s ease;
111
-
112
- &.is-center {
113
- justify-content: center;
114
- text-align: center;
115
-
116
- .qiu-alert__content {
117
- flex: none;
118
- }
119
- }
120
-
121
- &--light {
122
- &.qiu-alert--success {
123
- color: var(--qiu-color-success);
124
- background-color: var(--qiu-color-success-light-9, #f0f9eb);
125
- }
126
-
127
- &.qiu-alert--warning {
128
- color: var(--qiu-color-warning);
129
- background-color: var(--qiu-color-warning-light-9, #fdf6ec);
130
- }
131
-
132
- &.qiu-alert--info {
133
- color: var(--qiu-color-info);
134
- background-color: var(--qiu-color-info-light-9, #f4f4f5);
135
- }
136
-
137
- &.qiu-alert--error {
138
- color: var(--qiu-color-error);
139
- background-color: var(--qiu-color-error-light-9, #fef0f0);
140
- }
141
- }
142
-
143
- &--dark {
144
- &.qiu-alert--success {
145
- color: #fff;
146
- background-color: var(--qiu-color-success);
147
- }
148
-
149
- &.qiu-alert--warning {
150
- color: #fff;
151
- background-color: var(--qiu-color-warning);
152
- }
153
-
154
- &.qiu-alert--info {
155
- color: #fff;
156
- background-color: var(--qiu-color-info);
157
- }
158
-
159
- &.qiu-alert--error {
160
- color: #fff;
161
- background-color: var(--qiu-color-error);
162
- }
163
- }
164
- }
165
-
166
- .qiu-alert__icon {
167
- flex-shrink: 0;
168
- margin-top: 2px;
169
- font-size: 16px;
170
- }
171
-
172
- .qiu-alert__content {
173
- flex: 1;
174
- min-width: 0;
175
- }
176
-
177
- .qiu-alert__title {
178
- font-size: 14px;
179
- font-weight: 700;
180
- line-height: 1.4;
181
- }
182
-
183
- .qiu-alert__description {
184
- margin: 4px 0 0;
185
- font-size: 13px;
186
- line-height: 1.6;
187
- }
188
-
189
- .qiu-alert__close {
190
- display: inline-flex;
191
- flex-shrink: 0;
192
- align-items: center;
193
- justify-content: center;
194
- padding: 0;
195
- margin: 0;
196
- font-size: 12px;
197
- color: inherit;
198
- cursor: pointer;
199
- background: transparent;
200
- border: none;
201
- opacity: 0.7;
202
- transition: opacity 0.2s ease;
203
-
204
- &:hover {
205
- opacity: 1;
206
- }
207
- }
208
- </style>
@@ -1,18 +0,0 @@
1
- import type { InjectionKey, Ref } from 'vue'
2
-
3
- export interface QiuAnchorLinkRecord {
4
- href: string
5
- title: string
6
- el: HTMLElement | null
7
- }
8
-
9
- export interface QiuAnchorContext {
10
- offset: Ref<number>
11
- bound: Ref<string>
12
- activeLink: Ref<string>
13
- registerLink: (link: QiuAnchorLinkRecord) => void
14
- unregisterLink: (href: string) => void
15
- scrollToLink: (href: string) => void
16
- }
17
-
18
- export const QIU_ANCHOR_KEY: InjectionKey<QiuAnchorContext> = Symbol('QiuAnchor')