WeChat Mini Programs checkbox cycle

clipboard.png

how to get the data-index= "{{index}}" used by the index, of the corresponding checkbox in the function bound by bindchange. It is not easy to put the data-index= "{{index}}" in the standard red. The dataset obtained is empty, and the index= "{{index}}" is also empty

.
Mar.20,2021

is that how you got it in the bindchange function? event.currentTarget.dataset

Menu