MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / showSuccessToast

Function showSuccessToast

src/composables/useScreenCapture.ts:83–110  ·  view source on GitHub ↗

* 显示截屏成功的 Toast

(imageData: string)

Source from the content-addressed store, hash-verified

81 * 显示截屏成功的 Toast
82 */
83 function showSuccessToast(imageData: string) {
84 lastCapturedImage = imageData
85
86 toast.add({
87 title: '截图已复制到剪贴板',
88 color: 'primary',
89 actions: [
90 {
91 label: '预览截图',
92 icon: 'i-heroicons-eye',
93 onClick: () => {
94 if (lastCapturedImage) {
95 layoutStore.openScreenCaptureModal(lastCapturedImage)
96 }
97 },
98 },
99 {
100 label: '保存',
101 icon: 'i-heroicons-arrow-down-tray',
102 onClick: () => {
103 if (lastCapturedImage) {
104 downloadImage(lastCapturedImage)
105 }
106 },
107 },
108 ],
109 })
110 }
111
112 /**
113 * 捕获指定选择器的元素

Callers 1

captureElementFunction · 0.85

Calls 2

downloadImageFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected