chore(example): clean up and migrate to ts partially (#3492)

* chore(example): clean up and migrate to ts

* Add missing permissions

* Mirror line-height: 1.5 and remove h-*
This commit is contained in:
Tony
2026-07-16 19:47:52 +08:00
committed by GitHub
parent 40ae0a7fa0
commit d6e0b6bbb1
7 changed files with 224 additions and 188 deletions
+1 -2
View File
@@ -5,7 +5,6 @@
import { readFile } from '@tauri-apps/plugin-fs'
export let onMessage
export let insecureRenderHtml
let text = 'clipboard message'
function writeText() {
@@ -41,7 +40,7 @@
const image = await clipboard.readImage()
arrayBufferToBase64(await image.rgba(), function (base64) {
const src = 'data:image/png;base64,' + base64
insecureRenderHtml('<img src="' + src + '"></img>')
onMessage('<img src="' + src + '"></img>')
})
return
} catch (_) {}