Why is the VueLazyload default graph not displayed?

the main.js file is as follows. There is no problem with the loaded image path

import Vue from "vue"
import App from "./App"
import ElementUI from "element-ui";
import VueLazyload from "vue-lazyload"
import Vuex from "./vuex/store"
import "./global.css"
import "element-ui/lib/theme-chalk/index.css";
import {createRouter} from "./router";
import "./assets/iconfont/iconfont.css"
import "babel-polyfill"
import  VueQuillEditor from "vue-quill-editor"
// require styles 
import {get,post,postUp,postLogin,patch,del,postdel,put,posttree,posttree1} from "./utils/https"
import {setCookie,delCookie,getCookie} from "./utils/cookie"
import md5 from "js-md5";
Vue.prototype.$md5 = md5;
Vue.prototype.$get = get

import "quill/dist/quill.core.css"
import "quill/dist/quill.snow.css"
import "quill/dist/quill.bubble.css"

Vue.use(VueQuillEditor)
Vue.use(VueLazyload)

const router = createRouter()

Vue.use(Vuex)

Vue.config.productionTip = false


Vue.use(ElementUI);
Vue.use(VueLazyload, {
  // preLoad: 1.3,   //
  // error: "dist/error.png",//

  loading: "./assets/mo.png",//
  // loading:require("./assets/mo.png"),

  // attempt: 1,
  listenEvents:["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"], //vue
})
/* eslint-disable no-new */
new Vue({
  el: "-sharpapp",
  router,
  components: { App },
  template: "<App/>"
})

when using Vue.use vue-lazyload, you should put it before Element-ui to display the default image.


try this

import def_lazy_img from './assets/mo.png'
Vue.use(VueLazyLoad,{
  loading: def_lazy_img
})
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-1b315fd-2bda1.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-1b315fd-2bda1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?