other components...
This commit is contained in:
37
src/components/CCopyBtn/CCopyBtn.ts
Executable file
37
src/components/CCopyBtn/CCopyBtn.ts
Executable file
@@ -0,0 +1,37 @@
|
||||
import { tools } from '../../store/Modules/tools'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CCopyBtn',
|
||||
props: {
|
||||
texttocopy: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
setup(props) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
function copytoclip() {
|
||||
tools.copyStringToClipboard(props.texttocopy, true)
|
||||
}
|
||||
|
||||
return {
|
||||
copytoclip,
|
||||
tools,
|
||||
}
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user