Home >Backend Development >PHP Tutorial >How to solve the problem that the mui-silder plug-in in vue+mui is invalid and cannot be dragged and dropped
This article mainly introduces how to solve the problem that the mui-silder plug-in in vue mui is invalid and cannot be dragged. It has a certain reference value. Now I share it with you. Friends in need can refer to it
When writing tab sliding. Or the pictures placed in this sliding menu become a carousel
Sometimes the mui (".mui-slider") is used. slider({interval: 3000}); written in ajax to obtain data can be effective. But sometimes it doesn't work.
Some people recommend this.$nextTick(()=>{ mui(".mui-slider").slider();}), but it is not as good as the one below. .
The best solution is
Write the sliding operation in the updated hook function
updated() { var sliderMuiObj = mui(".mui-slider");//滑动科目 sliderMuiObj.slider({ interval: 3000 //如果你想自动3000ms滑动一下就写上这个。 如果是拖拽才滑动就不写这个。就直接写sliderMuiObj.slider(); }); },
The above is the entire content of this article, I hope it will be helpful to everyone's learning For help, please pay attention to the PHP Chinese website for more related content!
Related recommendations:
webpack imports css and various loaders
Introduction to PureComponent of React
The above is the detailed content of How to solve the problem that the mui-silder plug-in in vue+mui is invalid and cannot be dragged and dropped. For more information, please follow other related articles on the PHP Chinese website!