uniapp e. currentTarget.dataset Pay attention

There is a problem with uniapp. When you compile to H5, you can get the data, but you can’t get the data in the WeChat applet
As shown in figure:

Then, at the prompt, add console.log to the relevant code to see the output
It turns out that there was an error adding a label to the element

Look at both sides of the console to find the reason:
H5:

WeChat applet:

The WeChat applet converts uppercase letters to lowercase
Fix: Change the data-trailerID in HBuilderX to all lowercase

Read More: