Files
myprojplanet_vite/src/components/CCard/CCard.ts
Surya Paolo bc960d38a1 PASSAGGIO A VITE !
AGG. 1.1.23
2025-03-01 14:14:43 +01:00

60 lines
1.0 KiB
TypeScript
Executable File

import type { PropType} from 'vue';
import { computed, defineComponent, ref } from 'vue'
import type { IOperators } from '@model'
import { tools } from '@tools'
export default defineComponent({
name: 'CCard',
props: {
tab: {
type: String,
required: true,
default: 'one',
},
op: {
type: Object as PropType<IOperators>,
required: true,
},
},
setup(props) {
const mytab = ref(props.tab)
function clicca() {
mytab.value = 'two'
}
const myop = computed(() => {
if (!!props.op) {
return props.op
} else {
return {
tab: '',
username: '',
name: '',
surname: '',
qualification: '',
usertelegram: '',
disciplines: '',
certifications: '',
img: '',
cell: '',
email: '',
paginaweb: '',
paginafb: '',
intro: '',
info: '',
}
}
})
return {
mytab,
myop,
tools,
clicca,
}
},
})