Skip to content

Commit

Permalink
feat: support copy to clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
oeyoews committed Mar 24, 2024
1 parent b155d70 commit ded3b50
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions entrypoints/popup/Popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import json from '../../package.json'
// @ts-ignore
import MdiSparklesOutline from '~icons/mdi/sparkles-outline?width=16px&height=16px';
// @ts-ignore
import MdiContentCopy from '~icons/mdi/content-copy?width=16px&height=16px';
// @ts-ignore
import EosIconsAi from '~icons/eos-icons/ai?width=16px&height=16px';
// @ts-ignore
import CharmGithub from '~icons/charm/github?width=16px&height=16px';
Expand Down Expand Up @@ -56,6 +58,14 @@ chrome.storage.local.get(['tags'], function (result) {
}
});
function copyMd() {
navigator.clipboard.writeText(md.value)
ElMessage({
message: '复制成功',
type: "success"
})
}
function saveGROQAPIKEY() {
if (!GROQ_APIKEY.value) {
ElMessage({
Expand Down Expand Up @@ -236,6 +246,13 @@ watch(port, (newValue) => {
</ElIcon>
</ElButton>

<ElButton @click="copyMd">
<ElIcon>
<MdiContentCopy />
</ElIcon>

</ElButton>

<ElButton @click="ai2md">
<MdiSparklesOutline />
</ElButton>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "usewiki2",
"description": "manifest.json description",
"private": true,
"version": "1.1.0",
"version": "1.1.1",
"type": "module",
"scripts": {
"dev": "wxt",
Expand Down

0 comments on commit ded3b50

Please sign in to comment.