2022-02-24 23:36:27 +01:00
|
|
|
import { defineComponent, ref, toRef, watch } from 'vue'
|
|
|
|
|
import { tools } from '@src/store/Modules/tools'
|
|
|
|
|
|
2025-03-01 14:14:43 +01:00
|
|
|
import { useQuasar } from 'quasar'
|
|
|
|
|
import { useI18n } from 'vue-i18n'
|
2022-02-24 23:36:27 +01:00
|
|
|
import { toolsext } from '@store/Modules/toolsext'
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
name: 'CLabel',
|
|
|
|
|
props: {
|
|
|
|
|
value: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: false,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
|
|
|
|
label: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: true,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
2025-02-10 22:48:53 +01:00
|
|
|
color: {
|
|
|
|
|
type: String,
|
|
|
|
|
required: false,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
|
|
|
|
class_text: {
|
2025-04-04 18:15:14 +02:00
|
|
|
type: [String, Object],
|
2025-02-10 22:48:53 +01:00
|
|
|
required: false,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
2022-02-25 17:24:15 +01:00
|
|
|
copy: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
required: false,
|
|
|
|
|
default: false,
|
2025-04-04 18:15:14 +02:00
|
|
|
},
|
|
|
|
|
dense: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
required: false,
|
|
|
|
|
default: false,
|
|
|
|
|
},
|
2022-02-24 23:36:27 +01:00
|
|
|
},
|
|
|
|
|
components: {},
|
|
|
|
|
setup(props, { emit }) {
|
|
|
|
|
const $q = useQuasar()
|
|
|
|
|
const { t } = useI18n();
|
|
|
|
|
|
|
|
|
|
function copytoclip() {
|
|
|
|
|
tools.copyStringToClipboard($q, props.value, true)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
tools,
|
|
|
|
|
toolsext,
|
|
|
|
|
copytoclip,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
})
|