Files
salvato.newfreeplanet/src/components/CCardCarousel/CCardCarousel.ts

38 lines
739 B
TypeScript
Raw Normal View History

2021-09-04 15:05:34 +02:00
import { defineComponent, ref } from 'vue'
import { CCardDiscipline } from '../CCardDiscipline'
import { useGlobalStore } from '@store/globalStore'
import { tools } from '@store/Modules/tools'
2021-09-04 15:05:34 +02:00
export default defineComponent({
name: 'CCardCarousel',
components: { CCardDiscipline },
props: {
myarr: {
type: Array,
required: true,
},
directory: {
type: String,
required: false,
default: '',
}
2021-09-04 15:05:34 +02:00
},
setup(props, { emit }) {
2021-09-04 15:05:34 +02:00
const globalStore = useGlobalStore()
const slidedisc = ref(0)
function getimgdisc(disc: any) {
return props.directory + tools.getimgev(disc)
}
2021-09-04 15:05:34 +02:00
return {
slidedisc,
globalStore,
tools,
getimgdisc,
2021-09-04 15:05:34 +02:00
}
},
})