62 lines
1.3 KiB
TypeScript
Executable File
62 lines
1.3 KiB
TypeScript
Executable File
import {
|
|
PropType,
|
|
computed,
|
|
defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRef, toRefs, watch,
|
|
} from 'vue'
|
|
|
|
import { tools } from '@store/Modules/tools'
|
|
import { ICatalogo, IMyScheda, IProduct, ISchedaSingola, IText } from '@src/model'
|
|
|
|
import { useProducts } from '@store/Products'
|
|
import { useGlobalStore } from '@src/store/globalStore'
|
|
|
|
import { costanti } from '@costanti'
|
|
|
|
export default defineComponent({
|
|
name: 'CText',
|
|
props: {
|
|
rectext: {
|
|
type: Object as PropType<IText>,
|
|
required: true,
|
|
},
|
|
myproduct: {
|
|
type: Object as PropType<IProduct>,
|
|
required: true,
|
|
},
|
|
optcatalogo: {
|
|
type: Object as PropType<ICatalogo>,
|
|
required: true,
|
|
},
|
|
scheda: {
|
|
type: Object as PropType<IMyScheda>,
|
|
required: true,
|
|
},
|
|
show_at_right: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: false,
|
|
},
|
|
},
|
|
|
|
setup(props, { attrs, slots, emit }) {
|
|
|
|
const globalStore = useGlobalStore()
|
|
const products = useProducts()
|
|
|
|
const getTesto = computed(() => {
|
|
return products.replaceKeyWordsByProduct(
|
|
props.optcatalogo,
|
|
props.myproduct,
|
|
props.rectext,
|
|
)
|
|
})
|
|
|
|
return {
|
|
tools,
|
|
getTesto,
|
|
globalStore,
|
|
costanti,
|
|
}
|
|
},
|
|
})
|