Skip to content

Commit 70c0db6

Browse files
committed
feat: copy to clipboard
1 parent b9a6949 commit 70c0db6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/App.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,14 +678,22 @@ function App() {
678678
anchor="right"
679679
>
680680
<Toolbar />
681+
<Box display={'flex'} marginBottom={2}>
682+
<Button variant={'contained'} onClick={() => {
683+
void navigator.clipboard.writeText(JSON.stringify({
684+
...configBase,
685+
Implementations: impls.map(({ config }) => config),
686+
}, null, 4));
687+
}}>复制到剪贴板</Button>
688+
</Box>
681689
<TextField
682690
multiline={true}
683691
fullWidth={true}
684692
value={JSON.stringify({
685693
...configBase,
686694
Implementations: impls.map(({ config }) => config),
687695
}, null, 4)}
688-
InputProps={{
696+
inputProps={{
689697
sx: {
690698
fontFamily: [
691699
'"JetBrains Mono Variable"',

0 commit comments

Comments
 (0)