013-配置mint-ui库

本文不讲解如何使用全局引入与按需引入mint-ui,因为这最其官网已经很详细,

故:主要介绍,全局引入的mint-ui如何进行配置,以懒加载为例:

查看本文之前可以看下

mint-ui的源码 https://github.com/ElemeFE/mint-ui/blob/master/src/index.js#L70-L73 。

有暴露相关的配置参数,具体参数的配置还是需要看下https://github.com/hilongjw/vue-lazyload

main.js 文件中:

import MintUI from 'mint-ui';
Vue.use(MintUI, {
  lazyload: {
    preLoad: 1.3,
    error: '',
    loading: '',
    attempt: 1,
    filter: {
      webp(listener, options) {

      },
    },
  },
});

猜你喜欢

转载自blog.csdn.net/liguanjie8/article/details/80049464