chore: Replace packages with native functions (#5140)
This commit is contained in:
parent
262458f07d
commit
a18c0a97f3
15 changed files with 68 additions and 57 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
<script>
|
||||
import 'highlight.js/styles/default.css';
|
||||
import copy from 'copy-text-to-clipboard';
|
||||
import { copyTextToClipboard } from 'shared/helpers/clipboard';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -23,9 +23,9 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
onCopy(e) {
|
||||
async onCopy(e) {
|
||||
e.preventDefault();
|
||||
copy(this.script);
|
||||
await copyTextToClipboard(this.script);
|
||||
bus.$emit('newToastMessage', this.$t('COMPONENTS.CODE.COPY_SUCCESSFUL'));
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue