vome-core 0.3.65 → 0.3.67

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 (342) hide show
  1. package/dist/admin/api/client.js +7 -2
  2. package/dist/admin/components/ui/avatar/Avatar.vue +18 -18
  3. package/dist/admin/components/ui/avatar/AvatarFallback.vue +21 -21
  4. package/dist/admin/components/ui/avatar/AvatarImage.vue +16 -16
  5. package/dist/admin/components/ui/avatar/index.js +1 -1
  6. package/dist/admin/components/ui/badge/Badge.vue +26 -26
  7. package/dist/admin/components/ui/button/Button.vue +31 -31
  8. package/dist/admin/components/ui/checkbox/Checkbox.vue +35 -35
  9. package/dist/admin/components/ui/checkbox/index.js +1 -1
  10. package/dist/admin/components/ui/dialog/Dialog.vue +19 -19
  11. package/dist/admin/components/ui/dialog/DialogClose.vue +15 -15
  12. package/dist/admin/components/ui/dialog/DialogContent.vue +267 -267
  13. package/dist/admin/components/ui/dialog/DialogDescription.vue +23 -23
  14. package/dist/admin/components/ui/dialog/DialogFooter.vue +27 -27
  15. package/dist/admin/components/ui/dialog/DialogHeader.vue +17 -17
  16. package/dist/admin/components/ui/dialog/DialogOverlay.vue +21 -21
  17. package/dist/admin/components/ui/dialog/DialogScrollContent.vue +60 -60
  18. package/dist/admin/components/ui/dialog/DialogTitle.vue +23 -23
  19. package/dist/admin/components/ui/dialog/DialogTrigger.vue +15 -15
  20. package/dist/admin/components/ui/dialog/index.js +1 -1
  21. package/dist/admin/components/ui/dropdown-menu/DropdownMenu.vue +19 -19
  22. package/dist/admin/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -39
  23. package/dist/admin/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -39
  24. package/dist/admin/components/ui/dropdown-menu/DropdownMenuGroup.vue +15 -15
  25. package/dist/admin/components/ui/dropdown-menu/DropdownMenuItem.vue +31 -31
  26. package/dist/admin/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -23
  27. package/dist/admin/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -21
  28. package/dist/admin/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +40 -40
  29. package/dist/admin/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -23
  30. package/dist/admin/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -17
  31. package/dist/admin/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -18
  32. package/dist/admin/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -27
  33. package/dist/admin/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -31
  34. package/dist/admin/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -17
  35. package/dist/admin/components/ui/dropdown-menu/index.js +1 -1
  36. package/dist/admin/components/ui/input/Input.vue +183 -183
  37. package/dist/admin/components/ui/input/index.js +1 -1
  38. package/dist/admin/components/ui/label/Label.vue +26 -26
  39. package/dist/admin/components/ui/label/index.js +1 -1
  40. package/dist/admin/components/ui/scroll-area/ScrollArea.vue +33 -33
  41. package/dist/admin/components/ui/scroll-area/ScrollBar.vue +32 -32
  42. package/dist/admin/components/ui/scroll-area/index.js +1 -1
  43. package/dist/admin/components/ui/select/Select.vue +19 -19
  44. package/dist/admin/components/ui/select/SelectContent.vue +51 -51
  45. package/dist/admin/components/ui/select/SelectGroup.vue +15 -15
  46. package/dist/admin/components/ui/select/SelectItem.vue +53 -53
  47. package/dist/admin/components/ui/select/SelectItemText.vue +15 -15
  48. package/dist/admin/components/ui/select/SelectLabel.vue +17 -17
  49. package/dist/admin/components/ui/select/SelectScrollDownButton.vue +26 -26
  50. package/dist/admin/components/ui/select/SelectScrollUpButton.vue +26 -26
  51. package/dist/admin/components/ui/select/SelectSeparator.vue +19 -19
  52. package/dist/admin/components/ui/select/SelectTrigger.vue +44 -44
  53. package/dist/admin/components/ui/select/SelectValue.vue +15 -15
  54. package/dist/admin/components/ui/select/index.js +1 -1
  55. package/dist/admin/components/ui/separator/Separator.vue +29 -29
  56. package/dist/admin/components/ui/separator/index.js +1 -1
  57. package/dist/admin/components/ui/sheet/Sheet.vue +19 -19
  58. package/dist/admin/components/ui/sheet/SheetClose.vue +15 -15
  59. package/dist/admin/components/ui/sheet/SheetContent.vue +63 -63
  60. package/dist/admin/components/ui/sheet/SheetDescription.vue +21 -21
  61. package/dist/admin/components/ui/sheet/SheetFooter.vue +16 -16
  62. package/dist/admin/components/ui/sheet/SheetHeader.vue +15 -15
  63. package/dist/admin/components/ui/sheet/SheetOverlay.vue +21 -21
  64. package/dist/admin/components/ui/sheet/SheetTitle.vue +21 -21
  65. package/dist/admin/components/ui/sheet/SheetTrigger.vue +15 -15
  66. package/dist/admin/components/ui/sheet/index.js +1 -1
  67. package/dist/admin/components/ui/sonner/Toaster.vue +117 -117
  68. package/dist/admin/components/ui/sonner/index.js +1 -1
  69. package/dist/admin/components/ui/table/Table.vue +16 -16
  70. package/dist/admin/components/ui/table/TableBody.vue +17 -17
  71. package/dist/admin/components/ui/table/TableCaption.vue +17 -17
  72. package/dist/admin/components/ui/table/TableCell.vue +22 -22
  73. package/dist/admin/components/ui/table/TableEmpty.vue +34 -34
  74. package/dist/admin/components/ui/table/TableFooter.vue +17 -17
  75. package/dist/admin/components/ui/table/TableHead.vue +17 -17
  76. package/dist/admin/components/ui/table/TableHeader.vue +17 -17
  77. package/dist/admin/components/ui/table/TableRow.vue +17 -17
  78. package/dist/admin/components/ui/table/index.js +1 -1
  79. package/dist/admin/components/ui/tabs/Tabs.vue +24 -24
  80. package/dist/admin/components/ui/tabs/TabsContent.vue +21 -21
  81. package/dist/admin/components/ui/tabs/TabsList.vue +24 -24
  82. package/dist/admin/components/ui/tabs/TabsTrigger.vue +26 -26
  83. package/dist/admin/components/ui/tabs/index.js +1 -1
  84. package/dist/admin/components/ui/tooltip/Tooltip.vue +19 -19
  85. package/dist/admin/components/ui/tooltip/TooltipContent.vue +34 -34
  86. package/dist/admin/components/ui/tooltip/TooltipProvider.vue +14 -14
  87. package/dist/admin/components/ui/tooltip/TooltipTrigger.vue +15 -15
  88. package/dist/admin/components/ui/tooltip/index.js +1 -1
  89. package/dist/admin/components/vm-action-btn.vue +136 -136
  90. package/dist/admin/components/vm-aside-list-item.vue +136 -136
  91. package/dist/admin/components/vm-aside.vue +229 -229
  92. package/dist/admin/components/vm-auto-perm-dialog.vue +371 -371
  93. package/dist/admin/components/vm-card-grid.vue +37 -37
  94. package/dist/admin/components/vm-card-head.vue +45 -45
  95. package/dist/admin/components/vm-card-meta.vue +22 -22
  96. package/dist/admin/components/vm-card-title.vue +56 -56
  97. package/dist/admin/components/vm-card.vue +176 -176
  98. package/dist/admin/components/vm-check-tree.vue +340 -340
  99. package/dist/admin/components/vm-clamp-text.vue +39 -39
  100. package/dist/admin/components/vm-dept-tree.vue +497 -497
  101. package/dist/admin/components/vm-empty.vue +68 -68
  102. package/dist/admin/components/vm-eps-perm-picker.vue +123 -123
  103. package/dist/admin/components/vm-form-dialog.vue +632 -632
  104. package/dist/admin/components/vm-group-cascader.vue +560 -560
  105. package/dist/admin/components/vm-icon-btn.vue +88 -88
  106. package/dist/admin/components/vm-icon-picker.vue +647 -647
  107. package/dist/admin/components/vm-inline-search.vue +61 -61
  108. package/dist/admin/components/vm-loading.vue +114 -114
  109. package/dist/admin/components/vm-markdown.vue +405 -405
  110. package/dist/admin/components/vm-marquee.vue +265 -265
  111. package/dist/admin/components/vm-page-tabs.vue +94 -94
  112. package/dist/admin/components/vm-perm-section.vue +57 -57
  113. package/dist/admin/components/vm-ri-icon.vue +23 -23
  114. package/dist/admin/components/vm-role-picker.vue +314 -314
  115. package/dist/admin/components/vm-split-layout.vue +106 -106
  116. package/dist/admin/components/vm-thumb.vue +49 -49
  117. package/dist/admin/components/vm-view-path-picker.vue +59 -59
  118. package/dist/admin/crud/auto-fields.js +1 -1
  119. package/dist/admin/crud/components/vm-avatar.vue +104 -104
  120. package/dist/admin/crud/components/vm-color-picker.vue +1626 -1626
  121. package/dist/admin/crud/components/vm-column-custom.vue +193 -193
  122. package/dist/admin/crud/components/vm-context-menu.vue +105 -105
  123. package/dist/admin/crud/components/vm-copy-btn.vue +102 -102
  124. package/dist/admin/crud/components/vm-date-calendar-panel.vue +537 -537
  125. package/dist/admin/crud/components/vm-date-picker.vue +75 -75
  126. package/dist/admin/crud/components/vm-date-range.vue +88 -88
  127. package/dist/admin/crud/components/vm-date-text.vue +42 -42
  128. package/dist/admin/crud/components/vm-datetime-field.vue +215 -215
  129. package/dist/admin/crud/components/vm-datetime-picker.vue +9 -9
  130. package/dist/admin/crud/components/vm-dict-tag.vue +112 -112
  131. package/dist/admin/crud/components/vm-ellipsis-text.vue +34 -34
  132. package/dist/admin/crud/components/vm-form-hint.vue +81 -81
  133. package/dist/admin/crud/components/vm-json-code.vue +41 -41
  134. package/dist/admin/crud/components/vm-json-editor.vue +161 -161
  135. package/dist/admin/crud/components/vm-json-kv-editor.vue +318 -318
  136. package/dist/admin/crud/components/vm-kv-row.vue +51 -51
  137. package/dist/admin/crud/components/vm-multi-select.vue +279 -279
  138. package/dist/admin/crud/components/vm-number-range.vue +204 -204
  139. package/dist/admin/crud/components/vm-preview-viewer.vue +894 -894
  140. package/dist/admin/crud/components/vm-radio.vue +87 -87
  141. package/dist/admin/crud/components/vm-richtext.vue +313 -313
  142. package/dist/admin/crud/components/vm-select.vue +570 -570
  143. package/dist/admin/crud/components/vm-status-tag.vue +158 -158
  144. package/dist/admin/crud/components/vm-switch.vue +158 -158
  145. package/dist/admin/crud/components/vm-tag-list.vue +108 -108
  146. package/dist/admin/crud/components/vm-text-link.vue +52 -52
  147. package/dist/admin/crud/components/vm-toggle-switch.vue +84 -84
  148. package/dist/admin/crud/components/vm-tree-select.vue +450 -450
  149. package/dist/admin/crud/components/vm-upload-item.vue +298 -298
  150. package/dist/admin/crud/components/vm-upload.vue +436 -436
  151. package/dist/admin/crud/config.js +1 -1
  152. package/dist/admin/crud/confirm.js +1 -1
  153. package/dist/admin/crud/crud-page-request.js +1 -1
  154. package/dist/admin/crud/data-i18n.js +1 -1
  155. package/dist/admin/crud/dict.js +1 -1
  156. package/dist/admin/crud/export-fetch.js +1 -1
  157. package/dist/admin/crud/index.js +1 -0
  158. package/dist/admin/crud/key.js +1 -1
  159. package/dist/admin/crud/plugins.js +1 -1
  160. package/dist/admin/crud/span.js +1 -1
  161. package/dist/admin/crud/style.js +1 -1
  162. package/dist/admin/crud/useCrud.js +3 -0
  163. package/dist/admin/crud/validate.js +1 -1
  164. package/dist/admin/crud/vm-add-btn.vue +70 -70
  165. package/dist/admin/crud/vm-adv-search.vue +83 -83
  166. package/dist/admin/crud/vm-crud.vue +711 -711
  167. package/dist/admin/crud/vm-data-i18n-btn.vue +456 -456
  168. package/dist/admin/crud/vm-data-i18n-lang.vue +183 -183
  169. package/dist/admin/crud/vm-export-btn.vue +183 -183
  170. package/dist/admin/crud/vm-flex.vue +14 -14
  171. package/dist/admin/crud/vm-form.vue +33 -15
  172. package/dist/admin/crud/vm-import-btn.vue +747 -747
  173. package/dist/admin/crud/vm-multi-delete-btn.vue +49 -49
  174. package/dist/admin/crud/vm-pagination.vue +212 -212
  175. package/dist/admin/crud/vm-refresh-btn.vue +35 -35
  176. package/dist/admin/crud/vm-row.vue +55 -55
  177. package/dist/admin/crud/vm-search-key.vue +78 -78
  178. package/dist/admin/crud/vm-search.vue +466 -466
  179. package/dist/admin/crud/vm-table.vue +1390 -1390
  180. package/dist/admin/crud/vm-tabs.vue +94 -94
  181. package/dist/admin/crud/vm-toolbar.vue +357 -357
  182. package/dist/admin/crud/vm-upsert.vue +765 -765
  183. package/dist/admin/directives/perm.js +1 -1
  184. package/dist/admin/env.d.ts +1 -1
  185. package/dist/admin/hooks/useUpload.js +1 -1
  186. package/dist/admin/index.d.ts +1 -31
  187. package/dist/admin/lib/browser.js +1 -1
  188. package/dist/admin/lib/cn.js +1 -1
  189. package/dist/admin/lib/dialog-float.js +1 -1
  190. package/dist/admin/lib/export-excel.js +1 -1
  191. package/dist/admin/lib/import-excel.js +1 -1
  192. package/dist/admin/lib/json.js +1 -1
  193. package/dist/admin/lib/menu.js +1 -1
  194. package/dist/admin/lib/micro-locale.js +1 -1
  195. package/dist/admin/lib/micro-theme.js +1 -1
  196. package/dist/admin/lib/shell.js +1 -1
  197. package/dist/admin/lib/theme-color-options.js +1 -1
  198. package/dist/admin/lib/tree.js +1 -1
  199. package/dist/admin/lib/upload.js +1 -1
  200. package/dist/admin/lib/video-frame.js +1 -1
  201. package/dist/admin/router/create.js +1 -1
  202. package/dist/admin/router/guards.js +1 -1
  203. package/dist/admin/router/index.d.ts +1 -5
  204. package/dist/admin/service/index.d.ts +1 -11
  205. package/dist/admin/styles/base.css +121 -121
  206. package/dist/admin/vendor/browser-image-compression.js +1144 -1144
  207. package/dist/admin/vendor/decimal-js.js +12 -12
  208. package/dist/admin/vendor/xlsx.js +263 -263
  209. package/dist/ai/index.js +1 -1
  210. package/dist/client/admin-vendor.d.ts +1 -13
  211. package/dist/client/ai-model-registry.js +1 -1
  212. package/dist/client/base.js +1 -1
  213. package/dist/client/configure.js +1 -1
  214. package/dist/client/dict.js +1 -1
  215. package/dist/client/eps-payload.js +1 -1
  216. package/dist/client/eps.js +1 -1
  217. package/dist/client/index.d.ts +1 -7
  218. package/dist/client/index.js +1 -1
  219. package/dist/client/locale-change.js +1 -1
  220. package/dist/client/locale-store.js +1 -1
  221. package/dist/client/service.js +1 -1
  222. package/dist/client/vite-admin.d.ts +1 -40
  223. package/dist/client/vite-admin.js +1 -1
  224. package/dist/client/vite-auto-import.d.ts +1 -2
  225. package/dist/client/vite-auto-import.js +1 -1
  226. package/dist/client/vite-micro-proxy.d.ts +1 -20
  227. package/dist/client/vite-micro-proxy.js +1 -1
  228. package/dist/client/vite-plugin-eps.d.ts +1 -20
  229. package/dist/client/vite-plugin-eps.js +1 -1
  230. package/dist/client/vite-resolve.d.ts +1 -16
  231. package/dist/client/vite-resolve.js +1 -1
  232. package/dist/config/index.js +1 -1
  233. package/dist/index.js +1 -1
  234. package/dist/server/index.js +1 -1
  235. package/dist/shared/datetime-picker.js +1 -1
  236. package/dist/shared/decimal.js +1 -1
  237. package/dist/shared/excel.js +1 -1
  238. package/dist/shared/index.js +1 -1
  239. package/dist/shared/locale-json.js +1 -1
  240. package/dist/shared/tree.js +1 -1
  241. package/package.json +1 -1
  242. package/typings/admin/base/auth.ts +24 -24
  243. package/typings/admin/base/permission.ts +19 -19
  244. package/typings/admin/comm/cascader.ts +7 -7
  245. package/typings/admin/comm/check-tree.ts +7 -7
  246. package/typings/admin/comm/crud.ts +427 -427
  247. package/typings/admin/comm/eps.ts +86 -86
  248. package/typings/admin/comm/request.ts +16 -16
  249. package/typings/admin/comm/service.ts +43 -43
  250. package/typings/admin/comm/upload.ts +39 -39
  251. package/typings/admin/theme.ts +10 -10
  252. package/typings/admin/vome/browser.ts +11 -11
  253. package/typings/admin/vome/module.ts +13 -13
  254. package/typings/admin/vome/tags.ts +9 -9
  255. package/typings/comm/crud.ts +83 -83
  256. package/typings/comm/page.ts +18 -18
  257. package/typings/comm/scan.ts +6 -6
  258. package/typings/common.ts +4 -4
  259. package/typings/context/data.ts +10 -10
  260. package/typings/ext/market-seat.ts +42 -42
  261. package/typings/ext/market.ts +55 -55
  262. package/typings/ext/module.ts +64 -64
  263. package/typings/ext/plugin.ts +38 -38
  264. package/typings/ioc/metadata.ts +34 -34
  265. package/typings/logger/config.ts +6 -6
  266. package/typings/routing/crud.ts +199 -199
  267. package/typings/routing/eps.ts +88 -88
  268. package/typings/routing/meta.ts +63 -63
  269. package/typings/routing/register.ts +21 -21
  270. package/typings/routing/scan-context.ts +7 -7
  271. package/dist/admin/api/client.d.ts +0 -50
  272. package/dist/admin/components/ui/avatar/index.d.ts +0 -3
  273. package/dist/admin/components/ui/badge/index.d.ts +0 -6
  274. package/dist/admin/components/ui/button/index.d.ts +0 -7
  275. package/dist/admin/components/ui/checkbox/index.d.ts +0 -1
  276. package/dist/admin/components/ui/dialog/index.d.ts +0 -10
  277. package/dist/admin/components/ui/dropdown-menu/index.d.ts +0 -15
  278. package/dist/admin/components/ui/input/index.d.ts +0 -1
  279. package/dist/admin/components/ui/label/index.d.ts +0 -1
  280. package/dist/admin/components/ui/scroll-area/index.d.ts +0 -2
  281. package/dist/admin/components/ui/select/index.d.ts +0 -11
  282. package/dist/admin/components/ui/separator/index.d.ts +0 -1
  283. package/dist/admin/components/ui/sheet/index.d.ts +0 -8
  284. package/dist/admin/components/ui/sonner/index.d.ts +0 -1
  285. package/dist/admin/components/ui/table/index.d.ts +0 -9
  286. package/dist/admin/components/ui/tabs/index.d.ts +0 -4
  287. package/dist/admin/components/ui/tooltip/index.d.ts +0 -4
  288. package/dist/admin/crud/auto-fields.d.ts +0 -68
  289. package/dist/admin/crud/config.d.ts +0 -5
  290. package/dist/admin/crud/confirm.d.ts +0 -19
  291. package/dist/admin/crud/crud-page-request.d.ts +0 -21
  292. package/dist/admin/crud/data-i18n.d.ts +0 -62
  293. package/dist/admin/crud/dict.d.ts +0 -4
  294. package/dist/admin/crud/export-fetch.d.ts +0 -22
  295. package/dist/admin/crud/index.d.ts +0 -60
  296. package/dist/admin/crud/json-kv.d.ts +0 -9
  297. package/dist/admin/crud/key.d.ts +0 -22
  298. package/dist/admin/crud/paging.d.ts +0 -2
  299. package/dist/admin/crud/plugins.d.ts +0 -63
  300. package/dist/admin/crud/registry.d.ts +0 -3
  301. package/dist/admin/crud/span.d.ts +0 -17
  302. package/dist/admin/crud/style.d.ts +0 -82
  303. package/dist/admin/crud/useCrud.d.ts +0 -21
  304. package/dist/admin/crud/validate.d.ts +0 -7
  305. package/dist/admin/directives/perm.d.ts +0 -3
  306. package/dist/admin/hooks/useBrowser.d.ts +0 -6
  307. package/dist/admin/hooks/useUpload.d.ts +0 -8
  308. package/dist/admin/hooks/useVome.d.ts +0 -10
  309. package/dist/admin/lib/browser.d.ts +0 -3
  310. package/dist/admin/lib/cn.d.ts +0 -2
  311. package/dist/admin/lib/compress-image.d.ts +0 -12
  312. package/dist/admin/lib/dialog-float.d.ts +0 -8
  313. package/dist/admin/lib/eps.d.ts +0 -2
  314. package/dist/admin/lib/export-excel.d.ts +0 -9
  315. package/dist/admin/lib/file-preview.d.ts +0 -9
  316. package/dist/admin/lib/import-excel.d.ts +0 -21
  317. package/dist/admin/lib/json.d.ts +0 -11
  318. package/dist/admin/lib/menu.d.ts +0 -3
  319. package/dist/admin/lib/micro-locale.d.ts +0 -5
  320. package/dist/admin/lib/micro-theme.d.ts +0 -14
  321. package/dist/admin/lib/module.d.ts +0 -21
  322. package/dist/admin/lib/scarce-assets.d.ts +0 -5
  323. package/dist/admin/lib/shell.d.ts +0 -8
  324. package/dist/admin/lib/theme-color-options.d.ts +0 -15
  325. package/dist/admin/lib/tree.d.ts +0 -2
  326. package/dist/admin/lib/upload.d.ts +0 -17
  327. package/dist/admin/lib/video-frame.d.ts +0 -6
  328. package/dist/admin/router/create.d.ts +0 -16
  329. package/dist/admin/router/guards.d.ts +0 -6
  330. package/dist/admin/router/menu-routes.d.ts +0 -13
  331. package/dist/admin/stores/app.d.ts +0 -13
  332. package/dist/admin/stores/tags.d.ts +0 -14
  333. package/dist/admin/stores/user.d.ts +0 -48
  334. package/dist/client/ai-model-registry.d.ts +0 -16
  335. package/dist/client/base.d.ts +0 -28
  336. package/dist/client/configure.d.ts +0 -33
  337. package/dist/client/dict.d.ts +0 -31
  338. package/dist/client/eps-payload.d.ts +0 -3
  339. package/dist/client/eps.d.ts +0 -17
  340. package/dist/client/locale-change.d.ts +0 -16
  341. package/dist/client/locale-store.d.ts +0 -105
  342. package/dist/client/service.d.ts +0 -29
@@ -1,405 +1,405 @@
1
- <template>
2
- <div
3
- class="vm-markdown"
4
- :class="{
5
- 'is-shell': showShell,
6
- 'is-disabled': disabled,
7
- }"
8
- >
9
- <div v-if="showTabs" class="vm-markdown__tabs" role="tablist">
10
- <button
11
- type="button"
12
- class="vm-markdown__tab"
13
- :class="{ 'is-on': tab === 'edit' }"
14
- role="tab"
15
- :aria-selected="tab === 'edit'"
16
- @click="tab = 'edit'"
17
- >
18
- {{ crudLabel('markdownEdit') }}
19
- </button>
20
- <button
21
- type="button"
22
- class="vm-markdown__tab"
23
- :class="{ 'is-on': tab === 'preview' }"
24
- role="tab"
25
- :aria-selected="tab === 'preview'"
26
- @click="tab = 'preview'"
27
- >
28
- {{ crudLabel('markdownPreview') }}
29
- </button>
30
- </div>
31
-
32
- <textarea
33
- v-if="editEnabled && (!previewEnabled || tab === 'edit')"
34
- ref="editorRef"
35
- class="vm-markdown__editor"
36
- :style="editorStyle"
37
- :value="text"
38
- :disabled="disabled || uploading"
39
- :placeholder="placeholder ?? crudLabel('markdownHint')"
40
- @input="onInput"
41
- @paste="onPaste"
42
- />
43
-
44
- <div
45
- v-if="previewEnabled && (!editEnabled || tab === 'preview')"
46
- class="vm-markdown__preview"
47
- :class="{ 'is-bare': isBarePreview }"
48
- :style="previewStyle"
49
- v-html="html"
50
- />
51
-
52
- <p v-if="uploading" class="vm-markdown__hint">{{ crudLabel('markdownUploading') }}</p>
53
- </div>
54
- </template>
55
-
56
- <script setup lang="ts">
57
- import { crudLabel } from '../crud/style'
58
- import { computed, nextTick, ref, watch } from 'vue'
59
- import DOMPurify from 'dompurify'
60
- import { marked } from 'marked'
61
-
62
- defineOptions({ name: 'vm-markdown' })
63
-
64
- const props = withDefaults(
65
- defineProps<{
66
- modelValue?: string | null
67
- /** 是否可编辑 Markdown 源码,默认 false */
68
- edit?: boolean
69
- /** 是否显示预览,默认 true */
70
- preview?: boolean
71
- disabled?: boolean
72
- placeholder?: string
73
- /** 编辑区 / 带壳预览区最小高度;只读预览传入后可滚动 */
74
- height?: number | string
75
- /** 粘贴图片时上传,返回可访问 url;未传则忽略图片粘贴 */
76
- uploadImage?: (file: File) => Promise<string>
77
- }>(),
78
- {
79
- edit: false,
80
- preview: true,
81
- disabled: false,
82
- placeholder: undefined,
83
- },
84
- )
85
-
86
- const emit = defineEmits<{
87
- 'update:modelValue': [v: string]
88
- }>()
89
-
90
- marked.setOptions({
91
- gfm: true,
92
- breaks: false,
93
- })
94
-
95
- const editorRef = ref<HTMLTextAreaElement | null>(null)
96
- const uploading = ref(false)
97
- const tab = ref<'edit' | 'preview'>('edit')
98
-
99
- const editEnabled = computed(() => Boolean(props.edit))
100
- const previewEnabled = computed(() => {
101
- // 至少保留一种能力:两者都关时按只读预览
102
- if (!props.edit && !props.preview) return true
103
- return Boolean(props.preview)
104
- })
105
-
106
- const showTabs = computed(() => editEnabled.value && previewEnabled.value)
107
- /** 编辑、双 Tab,或只读预览且指定了 height 时显示边框壳 */
108
- const showShell = computed(
109
- () =>
110
- editEnabled.value ||
111
- showTabs.value ||
112
- (previewEnabled.value && !editEnabled.value && props.height != null),
113
- )
114
- /** 纯展示(如文档详情)无壳无固定高 */
115
- const isBarePreview = computed(
116
- () => !editEnabled.value && props.height == null,
117
- )
118
-
119
- const text = computed(() => String(props.modelValue ?? ''))
120
-
121
- const html = computed(() => {
122
- const raw = text.value
123
- if (!raw.trim()) return ''
124
- const parsed = marked.parse(raw, { async: false }) as string
125
- return DOMPurify.sanitize(parsed, {
126
- USE_PROFILES: { html: true },
127
- })
128
- })
129
-
130
- function toMinHeight(h: number | string) {
131
- return typeof h === 'number' ? `${h}px` : h
132
- }
133
-
134
- const editorStyle = computed(() => {
135
- const h = props.height ?? (editEnabled.value ? 280 : undefined)
136
- if (h == null) return undefined
137
- return { minHeight: toMinHeight(h) }
138
- })
139
-
140
- const previewStyle = computed(() => {
141
- if (isBarePreview.value) return undefined
142
- const h = props.height ?? (editEnabled.value ? 280 : undefined)
143
- if (h == null) return undefined
144
- return {
145
- minHeight: toMinHeight(h),
146
- maxHeight: toMinHeight(h),
147
- overflow: 'auto',
148
- }
149
- })
150
-
151
- watch(
152
- showTabs,
153
- (both) => {
154
- if (both) tab.value = 'edit'
155
- },
156
- { immediate: true },
157
- )
158
-
159
- function onInput(e: Event) {
160
- const v = (e.target as HTMLTextAreaElement).value
161
- emit('update:modelValue', v)
162
- }
163
-
164
- function insertAtCursor(snippet: string) {
165
- const el = editorRef.value
166
- const cur = text.value
167
- if (!el) {
168
- emit('update:modelValue', `${cur}${snippet}`)
169
- return
170
- }
171
- const start = el.selectionStart ?? cur.length
172
- const end = el.selectionEnd ?? cur.length
173
- const next = cur.slice(0, start) + snippet + cur.slice(end)
174
- emit('update:modelValue', next)
175
- void nextTick(() => {
176
- const pos = start + snippet.length
177
- el.focus()
178
- el.setSelectionRange(pos, pos)
179
- })
180
- }
181
-
182
- async function onPaste(e: ClipboardEvent) {
183
- if (!props.uploadImage || props.disabled || uploading.value) return
184
- const items = e.clipboardData?.items
185
- if (!items?.length) return
186
-
187
- const files: File[] = []
188
- for (const item of Array.from(items)) {
189
- if (item.kind === 'file' && item.type.startsWith('image/')) {
190
- const file = item.getAsFile()
191
- if (file) files.push(file)
192
- }
193
- }
194
- if (!files.length) return
195
-
196
- e.preventDefault()
197
- uploading.value = true
198
- try {
199
- for (const file of files) {
200
- const url = await props.uploadImage(file)
201
- const alt =
202
- (file.name || 'image').replace(/\.[^.]+$/, '').trim() || 'image'
203
- insertAtCursor(`\n![${alt}](${url})\n`)
204
- }
205
- } finally {
206
- uploading.value = false
207
- }
208
- }
209
- </script>
210
-
211
- <style lang="scss" scoped>
212
- .vm-markdown {
213
- color: var(--foreground);
214
- font-size: 14px;
215
- line-height: 1.7;
216
- word-break: break-word;
217
- }
218
-
219
- .vm-markdown.is-shell {
220
- border: 1px solid var(--border);
221
- border-radius: var(--radius, 12px);
222
- overflow: hidden;
223
- background: var(--card, #fff);
224
- }
225
-
226
- .vm-markdown.is-disabled {
227
- opacity: 0.65;
228
- pointer-events: none;
229
- }
230
-
231
- .vm-markdown__tabs {
232
- display: flex;
233
- border-bottom: 1px solid var(--border);
234
- background: var(--muted, #f7f8fc);
235
- }
236
-
237
- .vm-markdown__tab {
238
- appearance: none;
239
- border: 0;
240
- background: transparent;
241
- padding: 10px 16px;
242
- font: inherit;
243
- font-size: 14px;
244
- font-weight: 600;
245
- color: var(--muted-foreground);
246
- cursor: pointer;
247
- }
248
-
249
- .vm-markdown__tab.is-on {
250
- color: var(--brand);
251
- background: var(--card, #fff);
252
- box-shadow: inset 0 -2px 0 var(--brand);
253
- }
254
-
255
- .vm-markdown__editor {
256
- display: block;
257
- width: 100%;
258
- margin: 0;
259
- padding: 14px 16px;
260
- border: 0;
261
- resize: vertical;
262
- box-sizing: border-box;
263
- background: color-mix(in srgb, var(--brand) 3%, var(--background, #fff));
264
- color: var(--foreground);
265
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
266
- font-size: 13.5px;
267
- line-height: 1.6;
268
- }
269
-
270
- .vm-markdown__editor:focus {
271
- outline: none;
272
- background: var(--card, #fff);
273
- }
274
-
275
- .vm-markdown__preview {
276
- padding: 14px 16px;
277
- box-sizing: border-box;
278
- }
279
-
280
- .vm-markdown__preview.is-bare {
281
- padding: 0;
282
- min-height: 0;
283
- max-height: none;
284
- overflow: visible;
285
- }
286
-
287
- .vm-markdown__hint {
288
- margin: 0;
289
- padding: 8px 16px 12px;
290
- font-size: 13px;
291
- color: var(--muted-foreground);
292
- }
293
-
294
- .vm-markdown__preview {
295
- :deep(h1),
296
- :deep(h2),
297
- :deep(h3),
298
- :deep(h4) {
299
- margin: 1.25em 0 0.55em;
300
- font-weight: 700;
301
- letter-spacing: -0.01em;
302
- line-height: 1.35;
303
- color: var(--foreground);
304
- }
305
-
306
- :deep(h1) {
307
- margin-top: 0;
308
- font-size: 22px;
309
- }
310
-
311
- :deep(h2) {
312
- font-size: 18px;
313
- }
314
-
315
- :deep(h3) {
316
- font-size: 16px;
317
- }
318
-
319
- :deep(p) {
320
- margin: 0.65em 0;
321
- }
322
-
323
- :deep(ul),
324
- :deep(ol) {
325
- margin: 0.65em 0;
326
- padding-left: 1.35em;
327
- }
328
-
329
- :deep(li) {
330
- margin: 0.28em 0;
331
- }
332
-
333
- :deep(a) {
334
- color: var(--brand);
335
- text-decoration: underline;
336
- text-underline-offset: 2px;
337
- }
338
-
339
- :deep(strong) {
340
- font-weight: 700;
341
- }
342
-
343
- :deep(code) {
344
- padding: 0.12em 0.4em;
345
- border-radius: 6px;
346
- background: color-mix(in srgb, var(--foreground) 8%, var(--background));
347
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
348
- font-size: 0.88em;
349
- }
350
-
351
- :deep(pre) {
352
- margin: 0.85em 0;
353
- overflow: auto;
354
- padding: 14px 16px;
355
- border-radius: 12px;
356
- background: color-mix(in srgb, var(--foreground) 5%, var(--muted));
357
- line-height: 1.55;
358
- }
359
-
360
- :deep(pre code) {
361
- padding: 0;
362
- border-radius: 0;
363
- background: transparent;
364
- font-size: 12.5px;
365
- }
366
-
367
- :deep(blockquote) {
368
- margin: 0.85em 0;
369
- padding: 0.2em 0 0.2em 12px;
370
- border-left: 3px solid var(--brand);
371
- color: var(--muted-foreground);
372
- }
373
-
374
- :deep(hr) {
375
- margin: 1.25em 0;
376
- border: none;
377
- border-top: 1px solid var(--border);
378
- }
379
-
380
- :deep(table) {
381
- width: 100%;
382
- margin: 0.85em 0;
383
- border-collapse: collapse;
384
- font-size: 13px;
385
- }
386
-
387
- :deep(th),
388
- :deep(td) {
389
- padding: 8px 10px;
390
- border: 1px solid var(--border);
391
- text-align: left;
392
- }
393
-
394
- :deep(th) {
395
- background: color-mix(in srgb, var(--foreground) 4%, var(--background));
396
- font-weight: 650;
397
- }
398
-
399
- :deep(img) {
400
- max-width: 100%;
401
- height: auto;
402
- border-radius: 8px;
403
- }
404
- }
405
- </style>
1
+ <template>
2
+ <div
3
+ class="vm-markdown"
4
+ :class="{
5
+ 'is-shell': showShell,
6
+ 'is-disabled': disabled,
7
+ }"
8
+ >
9
+ <div v-if="showTabs" class="vm-markdown__tabs" role="tablist">
10
+ <button
11
+ type="button"
12
+ class="vm-markdown__tab"
13
+ :class="{ 'is-on': tab === 'edit' }"
14
+ role="tab"
15
+ :aria-selected="tab === 'edit'"
16
+ @click="tab = 'edit'"
17
+ >
18
+ {{ crudLabel('markdownEdit') }}
19
+ </button>
20
+ <button
21
+ type="button"
22
+ class="vm-markdown__tab"
23
+ :class="{ 'is-on': tab === 'preview' }"
24
+ role="tab"
25
+ :aria-selected="tab === 'preview'"
26
+ @click="tab = 'preview'"
27
+ >
28
+ {{ crudLabel('markdownPreview') }}
29
+ </button>
30
+ </div>
31
+
32
+ <textarea
33
+ v-if="editEnabled && (!previewEnabled || tab === 'edit')"
34
+ ref="editorRef"
35
+ class="vm-markdown__editor"
36
+ :style="editorStyle"
37
+ :value="text"
38
+ :disabled="disabled || uploading"
39
+ :placeholder="placeholder ?? crudLabel('markdownHint')"
40
+ @input="onInput"
41
+ @paste="onPaste"
42
+ />
43
+
44
+ <div
45
+ v-if="previewEnabled && (!editEnabled || tab === 'preview')"
46
+ class="vm-markdown__preview"
47
+ :class="{ 'is-bare': isBarePreview }"
48
+ :style="previewStyle"
49
+ v-html="html"
50
+ />
51
+
52
+ <p v-if="uploading" class="vm-markdown__hint">{{ crudLabel('markdownUploading') }}</p>
53
+ </div>
54
+ </template>
55
+
56
+ <script setup lang="ts">
57
+ import { crudLabel } from '../crud/style'
58
+ import { computed, nextTick, ref, watch } from 'vue'
59
+ import DOMPurify from 'dompurify'
60
+ import { marked } from 'marked'
61
+
62
+ defineOptions({ name: 'vm-markdown' })
63
+
64
+ const props = withDefaults(
65
+ defineProps<{
66
+ modelValue?: string | null
67
+ /** 是否可编辑 Markdown 源码,默认 false */
68
+ edit?: boolean
69
+ /** 是否显示预览,默认 true */
70
+ preview?: boolean
71
+ disabled?: boolean
72
+ placeholder?: string
73
+ /** 编辑区 / 带壳预览区最小高度;只读预览传入后可滚动 */
74
+ height?: number | string
75
+ /** 粘贴图片时上传,返回可访问 url;未传则忽略图片粘贴 */
76
+ uploadImage?: (file: File) => Promise<string>
77
+ }>(),
78
+ {
79
+ edit: false,
80
+ preview: true,
81
+ disabled: false,
82
+ placeholder: undefined,
83
+ },
84
+ )
85
+
86
+ const emit = defineEmits<{
87
+ 'update:modelValue': [v: string]
88
+ }>()
89
+
90
+ marked.setOptions({
91
+ gfm: true,
92
+ breaks: false,
93
+ })
94
+
95
+ const editorRef = ref<HTMLTextAreaElement | null>(null)
96
+ const uploading = ref(false)
97
+ const tab = ref<'edit' | 'preview'>('edit')
98
+
99
+ const editEnabled = computed(() => Boolean(props.edit))
100
+ const previewEnabled = computed(() => {
101
+ // 至少保留一种能力:两者都关时按只读预览
102
+ if (!props.edit && !props.preview) return true
103
+ return Boolean(props.preview)
104
+ })
105
+
106
+ const showTabs = computed(() => editEnabled.value && previewEnabled.value)
107
+ /** 编辑、双 Tab,或只读预览且指定了 height 时显示边框壳 */
108
+ const showShell = computed(
109
+ () =>
110
+ editEnabled.value ||
111
+ showTabs.value ||
112
+ (previewEnabled.value && !editEnabled.value && props.height != null),
113
+ )
114
+ /** 纯展示(如文档详情)无壳无固定高 */
115
+ const isBarePreview = computed(
116
+ () => !editEnabled.value && props.height == null,
117
+ )
118
+
119
+ const text = computed(() => String(props.modelValue ?? ''))
120
+
121
+ const html = computed(() => {
122
+ const raw = text.value
123
+ if (!raw.trim()) return ''
124
+ const parsed = marked.parse(raw, { async: false }) as string
125
+ return DOMPurify.sanitize(parsed, {
126
+ USE_PROFILES: { html: true },
127
+ })
128
+ })
129
+
130
+ function toMinHeight(h: number | string) {
131
+ return typeof h === 'number' ? `${h}px` : h
132
+ }
133
+
134
+ const editorStyle = computed(() => {
135
+ const h = props.height ?? (editEnabled.value ? 280 : undefined)
136
+ if (h == null) return undefined
137
+ return { minHeight: toMinHeight(h) }
138
+ })
139
+
140
+ const previewStyle = computed(() => {
141
+ if (isBarePreview.value) return undefined
142
+ const h = props.height ?? (editEnabled.value ? 280 : undefined)
143
+ if (h == null) return undefined
144
+ return {
145
+ minHeight: toMinHeight(h),
146
+ maxHeight: toMinHeight(h),
147
+ overflow: 'auto',
148
+ }
149
+ })
150
+
151
+ watch(
152
+ showTabs,
153
+ (both) => {
154
+ if (both) tab.value = 'edit'
155
+ },
156
+ { immediate: true },
157
+ )
158
+
159
+ function onInput(e: Event) {
160
+ const v = (e.target as HTMLTextAreaElement).value
161
+ emit('update:modelValue', v)
162
+ }
163
+
164
+ function insertAtCursor(snippet: string) {
165
+ const el = editorRef.value
166
+ const cur = text.value
167
+ if (!el) {
168
+ emit('update:modelValue', `${cur}${snippet}`)
169
+ return
170
+ }
171
+ const start = el.selectionStart ?? cur.length
172
+ const end = el.selectionEnd ?? cur.length
173
+ const next = cur.slice(0, start) + snippet + cur.slice(end)
174
+ emit('update:modelValue', next)
175
+ void nextTick(() => {
176
+ const pos = start + snippet.length
177
+ el.focus()
178
+ el.setSelectionRange(pos, pos)
179
+ })
180
+ }
181
+
182
+ async function onPaste(e: ClipboardEvent) {
183
+ if (!props.uploadImage || props.disabled || uploading.value) return
184
+ const items = e.clipboardData?.items
185
+ if (!items?.length) return
186
+
187
+ const files: File[] = []
188
+ for (const item of Array.from(items)) {
189
+ if (item.kind === 'file' && item.type.startsWith('image/')) {
190
+ const file = item.getAsFile()
191
+ if (file) files.push(file)
192
+ }
193
+ }
194
+ if (!files.length) return
195
+
196
+ e.preventDefault()
197
+ uploading.value = true
198
+ try {
199
+ for (const file of files) {
200
+ const url = await props.uploadImage(file)
201
+ const alt =
202
+ (file.name || 'image').replace(/\.[^.]+$/, '').trim() || 'image'
203
+ insertAtCursor(`\n![${alt}](${url})\n`)
204
+ }
205
+ } finally {
206
+ uploading.value = false
207
+ }
208
+ }
209
+ </script>
210
+
211
+ <style lang="scss" scoped>
212
+ .vm-markdown {
213
+ color: var(--foreground);
214
+ font-size: 14px;
215
+ line-height: 1.7;
216
+ word-break: break-word;
217
+ }
218
+
219
+ .vm-markdown.is-shell {
220
+ border: 1px solid var(--border);
221
+ border-radius: var(--radius, 12px);
222
+ overflow: hidden;
223
+ background: var(--card, #fff);
224
+ }
225
+
226
+ .vm-markdown.is-disabled {
227
+ opacity: 0.65;
228
+ pointer-events: none;
229
+ }
230
+
231
+ .vm-markdown__tabs {
232
+ display: flex;
233
+ border-bottom: 1px solid var(--border);
234
+ background: var(--muted, #f7f8fc);
235
+ }
236
+
237
+ .vm-markdown__tab {
238
+ appearance: none;
239
+ border: 0;
240
+ background: transparent;
241
+ padding: 10px 16px;
242
+ font: inherit;
243
+ font-size: 14px;
244
+ font-weight: 600;
245
+ color: var(--muted-foreground);
246
+ cursor: pointer;
247
+ }
248
+
249
+ .vm-markdown__tab.is-on {
250
+ color: var(--brand);
251
+ background: var(--card, #fff);
252
+ box-shadow: inset 0 -2px 0 var(--brand);
253
+ }
254
+
255
+ .vm-markdown__editor {
256
+ display: block;
257
+ width: 100%;
258
+ margin: 0;
259
+ padding: 14px 16px;
260
+ border: 0;
261
+ resize: vertical;
262
+ box-sizing: border-box;
263
+ background: color-mix(in srgb, var(--brand) 3%, var(--background, #fff));
264
+ color: var(--foreground);
265
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
266
+ font-size: 13.5px;
267
+ line-height: 1.6;
268
+ }
269
+
270
+ .vm-markdown__editor:focus {
271
+ outline: none;
272
+ background: var(--card, #fff);
273
+ }
274
+
275
+ .vm-markdown__preview {
276
+ padding: 14px 16px;
277
+ box-sizing: border-box;
278
+ }
279
+
280
+ .vm-markdown__preview.is-bare {
281
+ padding: 0;
282
+ min-height: 0;
283
+ max-height: none;
284
+ overflow: visible;
285
+ }
286
+
287
+ .vm-markdown__hint {
288
+ margin: 0;
289
+ padding: 8px 16px 12px;
290
+ font-size: 13px;
291
+ color: var(--muted-foreground);
292
+ }
293
+
294
+ .vm-markdown__preview {
295
+ :deep(h1),
296
+ :deep(h2),
297
+ :deep(h3),
298
+ :deep(h4) {
299
+ margin: 1.25em 0 0.55em;
300
+ font-weight: 700;
301
+ letter-spacing: -0.01em;
302
+ line-height: 1.35;
303
+ color: var(--foreground);
304
+ }
305
+
306
+ :deep(h1) {
307
+ margin-top: 0;
308
+ font-size: 22px;
309
+ }
310
+
311
+ :deep(h2) {
312
+ font-size: 18px;
313
+ }
314
+
315
+ :deep(h3) {
316
+ font-size: 16px;
317
+ }
318
+
319
+ :deep(p) {
320
+ margin: 0.65em 0;
321
+ }
322
+
323
+ :deep(ul),
324
+ :deep(ol) {
325
+ margin: 0.65em 0;
326
+ padding-left: 1.35em;
327
+ }
328
+
329
+ :deep(li) {
330
+ margin: 0.28em 0;
331
+ }
332
+
333
+ :deep(a) {
334
+ color: var(--brand);
335
+ text-decoration: underline;
336
+ text-underline-offset: 2px;
337
+ }
338
+
339
+ :deep(strong) {
340
+ font-weight: 700;
341
+ }
342
+
343
+ :deep(code) {
344
+ padding: 0.12em 0.4em;
345
+ border-radius: 6px;
346
+ background: color-mix(in srgb, var(--foreground) 8%, var(--background));
347
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
348
+ font-size: 0.88em;
349
+ }
350
+
351
+ :deep(pre) {
352
+ margin: 0.85em 0;
353
+ overflow: auto;
354
+ padding: 14px 16px;
355
+ border-radius: 12px;
356
+ background: color-mix(in srgb, var(--foreground) 5%, var(--muted));
357
+ line-height: 1.55;
358
+ }
359
+
360
+ :deep(pre code) {
361
+ padding: 0;
362
+ border-radius: 0;
363
+ background: transparent;
364
+ font-size: 12.5px;
365
+ }
366
+
367
+ :deep(blockquote) {
368
+ margin: 0.85em 0;
369
+ padding: 0.2em 0 0.2em 12px;
370
+ border-left: 3px solid var(--brand);
371
+ color: var(--muted-foreground);
372
+ }
373
+
374
+ :deep(hr) {
375
+ margin: 1.25em 0;
376
+ border: none;
377
+ border-top: 1px solid var(--border);
378
+ }
379
+
380
+ :deep(table) {
381
+ width: 100%;
382
+ margin: 0.85em 0;
383
+ border-collapse: collapse;
384
+ font-size: 13px;
385
+ }
386
+
387
+ :deep(th),
388
+ :deep(td) {
389
+ padding: 8px 10px;
390
+ border: 1px solid var(--border);
391
+ text-align: left;
392
+ }
393
+
394
+ :deep(th) {
395
+ background: color-mix(in srgb, var(--foreground) 4%, var(--background));
396
+ font-weight: 650;
397
+ }
398
+
399
+ :deep(img) {
400
+ max-width: 100%;
401
+ height: auto;
402
+ border-radius: 8px;
403
+ }
404
+ }
405
+ </style>