Merge pull request '添加懒加载与首页公司荣誉背景调成白色' (#6) from Branch_csl into master
Reviewed-on: http://120.46.37.243:3000/cms/feiyang-web/pulls/6
This commit is contained in:
commit
3b2fce0afb
11
package-lock.json
generated
11
package-lock.json
generated
@ -15,6 +15,7 @@
|
|||||||
"swiper": "^5.4.5",
|
"swiper": "^5.4.5",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
"vue-awesome-swiper": "^3.1.3",
|
"vue-awesome-swiper": "^3.1.3",
|
||||||
|
"vue-lazyload": "^1.3.5",
|
||||||
"vue-router": "^3.5.1",
|
"vue-router": "^3.5.1",
|
||||||
"vuex": "^3.6.2"
|
"vuex": "^3.6.2"
|
||||||
},
|
},
|
||||||
@ -10255,6 +10256,11 @@
|
|||||||
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
|
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/vue-lazyload": {
|
||||||
|
"version": "1.3.5",
|
||||||
|
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.3.5.tgz",
|
||||||
|
"integrity": "sha512-SCO/LWgCCbjaregHO4wg2buzITBdPBZRlIS104vERGpT88uxXsK26veuzZpgGAXMR8WpkaR+JDqz80OedpaLiA=="
|
||||||
|
},
|
||||||
"node_modules/vue-loader": {
|
"node_modules/vue-loader": {
|
||||||
"version": "17.4.2",
|
"version": "17.4.2",
|
||||||
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.4.2.tgz",
|
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.4.2.tgz",
|
||||||
@ -19039,6 +19045,11 @@
|
|||||||
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
|
"integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"vue-lazyload": {
|
||||||
|
"version": "1.3.5",
|
||||||
|
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.3.5.tgz",
|
||||||
|
"integrity": "sha512-SCO/LWgCCbjaregHO4wg2buzITBdPBZRlIS104vERGpT88uxXsK26veuzZpgGAXMR8WpkaR+JDqz80OedpaLiA=="
|
||||||
|
},
|
||||||
"vue-loader": {
|
"vue-loader": {
|
||||||
"version": "17.4.2",
|
"version": "17.4.2",
|
||||||
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.4.2.tgz",
|
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.4.2.tgz",
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
"swiper": "^5.4.5",
|
"swiper": "^5.4.5",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
"vue-awesome-swiper": "^3.1.3",
|
"vue-awesome-swiper": "^3.1.3",
|
||||||
|
"vue-lazyload": "^1.3.5",
|
||||||
"vue-router": "^3.5.1",
|
"vue-router": "^3.5.1",
|
||||||
"vuex": "^3.6.2"
|
"vuex": "^3.6.2"
|
||||||
},
|
},
|
||||||
|
10
src/main.js
10
src/main.js
@ -10,6 +10,16 @@ import './assets/ReactQuilll.less'
|
|||||||
import 'react-quill/dist/quill.core.css'
|
import 'react-quill/dist/quill.core.css'
|
||||||
import 'react-quill/dist/quill.snow.css'
|
import 'react-quill/dist/quill.snow.css'
|
||||||
import 'react-quill/dist/quill.bubble.css'
|
import 'react-quill/dist/quill.bubble.css'
|
||||||
|
|
||||||
|
import lazyload from 'vue-lazyload'
|
||||||
|
// 全局使用插件
|
||||||
|
Vue.use(lazyload, {
|
||||||
|
preload: 1, // preload配置项用来设置预加载的高度(默认值为1.3)
|
||||||
|
loading: '', // loading配置项用来配置加载时显示的图片路径
|
||||||
|
error: '', // error配置项用来配置加载错误时的显示的图片路径
|
||||||
|
attemp: 3 // attemp配置项用来设置加载错误时的重传次数
|
||||||
|
});
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.use(ElementUI);
|
Vue.use(ElementUI);
|
||||||
new Vue({
|
new Vue({
|
||||||
|
@ -5,8 +5,9 @@
|
|||||||
<div class="bd" style="height: 581px;position: relative;">
|
<div class="bd" style="height: 581px;position: relative;">
|
||||||
<div class="swiper-container swiper5">
|
<div class="swiper-container swiper5">
|
||||||
<div class="swiper-wrapper">
|
<div class="swiper-wrapper">
|
||||||
<div class="swiper-slide" v-for="item in imgarr" :key="item.id"><img :src="item.url"
|
<div class="swiper-slide" v-for="item in imgarr" :key="item.id">
|
||||||
style="width: 100%;height:100%;"></div>
|
<img :src="item.url" style="width: 100%;height:100%;">
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="swiper-pagination"></div>
|
<div class="swiper-pagination"></div>
|
||||||
@ -90,7 +91,7 @@
|
|||||||
<div class="swiper-container swiper6">
|
<div class="swiper-container swiper6">
|
||||||
<div class="swiper-wrapper">
|
<div class="swiper-wrapper">
|
||||||
<div class="swiper-slide yanshi" v-for="item in indexinfo" :key="item.id"><img
|
<div class="swiper-slide yanshi" v-for="item in indexinfo" :key="item.id"><img
|
||||||
:src="item.pic" style="width: 100%;height:320px;cursor: pointer;"
|
v-lazy="item.pic" style="width: 100%;height:320px;cursor: pointer;"
|
||||||
@click="routerTo(item.id)"></div>
|
@click="routerTo(item.id)"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -132,7 +133,7 @@
|
|||||||
<div class="swiper-slide" style="cursor: pointer;height: 316px;"
|
<div class="swiper-slide" style="cursor: pointer;height: 316px;"
|
||||||
v-for="item in smallPicturearr" :key="item.id" v-if="item.state=='true'"
|
v-for="item in smallPicturearr" :key="item.id" v-if="item.state=='true'"
|
||||||
@click="projecto(item.id)">
|
@click="projecto(item.id)">
|
||||||
<img :src="item.picture"
|
<img v-lazy="item.picture"
|
||||||
style=" width: 100%;height:100%;margin: auto;border-radius: 5%;">
|
style=" width: 100%;height:100%;margin: auto;border-radius: 5%;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -179,8 +180,8 @@
|
|||||||
<div class="swiper-wrapper swiper9">
|
<div class="swiper-wrapper swiper9">
|
||||||
<div class="swiper-slide" v-for="item in achievementarr" :key="item.id"
|
<div class="swiper-slide" v-for="item in achievementarr" :key="item.id"
|
||||||
v-if="item.state=='true'" @click="honorto(item.id)"
|
v-if="item.state=='true'" @click="honorto(item.id)"
|
||||||
style="background-color: rgb(240,246,250);border-radius: 10px;padding: 20px;box-sizing: border-box;cursor: pointer;">
|
style="background-color: white;border-radius: 10px;padding: 20px;box-sizing: border-box;cursor: pointer;">
|
||||||
<img :src="item.picture" style=" height:239px ;margin: auto;display: block;">
|
<img v-lazy="item.picture" style=" height:239px ;margin: auto;display: block;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="swiper-pagination1" style="text-align: center;"></div>
|
<div class="swiper-pagination1" style="text-align: center;"></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user