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

How to solve the problem that the mui-silder plug-in in vue+mui is invalid and cannot be dragged and dropped

不言
Release: 2023-04-02 22:44:02
Original
3292 people have browsed it

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();
                });
            },
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template