The code of the Vue cli + mui area rolling instance, climui
Use vue cli + mui together to achieve the effect of region rolling. The method is as follows:
Step 1 introduce mui css js
@import url("/static/mui.min.css");
JS
import mui from '../../../static/mui.min.js';
Step 2
The area rolling structure of the write mui is like this.
<Div class = "mui-scroll-wrapper"> <div class = "mui-scroll"> * write the content to be rolled </div>
Paste a part of my code below
<Div class = "goods_foods mui-scroll-wrapper"> <div class = "mui-scroll"> <ul class = "mui-table-view"> <li v- = "item in goods">
Write JS below
<Script> import mui from '.. /.. /.. /static/mui. min. js 'const odd_ OK = 0; export default {props: {seller: {type: Object }}, data () {return {goods: [] }}, created () {this. $ http. get ("/api/goods "). then (response) => {response = response. body; if (response. errno === odd_ OK) {this. goods = response. data; this. $ nextTick () => {mui ('. mui-scroll-wrapper '). scroll ({deceleration: 0.0005 // flick deceleration Coefficient. The larger the coefficient, the slower the rolling speed and the smaller the rolling distance. The default value is 0.0006 });})}});},}; </script>
In this way, the vue cli + mui area is rolled.
The above example code of the Vue cli + mui area rolling is all the content that I have shared with you. I hope to give you a reference and support for the customer's house.