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

54 lines
949 B
TypeScript
Executable File

import type { PropType} from 'vue';
import { defineComponent, ref, computed, toRef } from 'vue'
import type { IOperators } from 'model'
export default defineComponent({
name: 'CBook',
props: {
tab: {
type: String,
required: true,
},
op: {
type: Object as PropType<IOperators>,
required: true,
},
},
setup(props, { emit }) {
const mytab = toRef(props, 'tab')
function clicca() {
mytab.value = 'two'
}
function myop() {
if (!!props.op) {
return props.op
} else {
return {
index: 0,
tab: '',
name: '',
qualification: '',
sub2: '',
certifications: '',
img: '',
cell: '',
email: '',
paginaweb: '',
paginafb: '',
intro: '',
info: ''
}
}
}
return {
myop,
clicca,
mytab,
}
}
})