How to pass the value of props to data? in vue2

The platitudes of

have been searched for N many times and tried many methods, but they still haven"t solved
nonsense, which is mainly the value obtained dynamically by props. Change the initial value of initialSlide in swiper4
code screenshot is as follows:
this is the parent screenshot:

clipboard.png

clipboard.png

clipboard.png

clipboard.png

:

clipboard.png

clipboard.png

clipboard.png

:

clipboard.png

clipboard.png


clipboard.png

clipboard.png

is here, the value of gallaryindex is dynamic, but it cannot be transmitted to initialSlide here, that is, the picture I clicked will not show that I clicked on the
that I have been tossing about for a long time, but I still can"t solve it. I really hope that the boss can give us some advice, and it"s best to put on the code!

Mar.09,2021

you can only set the initial value when you set it in data , so if you want to change gallaryindex , you can change it watch , and then update it in watch .

subcomponents

data () {
    return {
        swiperOption: {
            ...,
            initialSlide: this.gallaryindex,
            ...
        }
    }
},

watch: {
    gallaryindex (val) {
        this.swiperOption.initialSlide = val
    }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2be56-2bad6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2be56-2bad6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?