Cannot be obtained using jQuery.data () after updating the data- attribute of a DOM element with v-bind

I encountered a thorny problem when working on a project. I used vue"s v-bind to bind the data- attribute of the DOM element, as follows

<a v-else class="js-fancybox" href="javascript:"
   @click="updateGallery(idx)"
   :data-fancybox=""gallery"+activeWork"
   :data-src="content.data"
   :data-caption="workList[activeWork].title + " - image -sharp" + idx"
   data-speed="700">
    <img :src="content.data" class="img-fluid w-100 mb-2">
</a>

originally expected to be very simple, that is, the data- property changes with the change of the vue object data, but there is a problem in the operation. After modifying the data of the vue, the dataset property of the dom object can be changed accordingly, while the update of the data- property cannot be obtained by using the data () method of jQuery, as shown in figure

.

before updating :

data-src,data-caption,data-fancybox ):

you can find that the native dataset property of dom has changed, but the data () method of jQuery still gets the original value.

solve! Is there a way to get the updated data- property with data ()? Because the plug-in used uses the data () method to get element attributes, modifying the plug-in may result in more bug.


Vue.nextTick(function () {
  // DOM 
})

write it in here and see


all use vue. What's the meaning of using Jquery

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-1b2b960-2baa3.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-1b2b960-2baa3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?