Просмотр исходного кода

提交代码~修改相关

master
王饶冀 2 лет назад
Родитель
Сommit
8ed011d1fd

+ 1
- 0
digital-park-web/digital-park/src/components/Header.vue Просмотреть файл

background: transparent; background: transparent;
@include flex(row, center, center, wrap); @include flex(row, center, center, wrap);
@include border-box; @include border-box;
background: rgba($color: #000000, $alpha: .3)
} }
.wrap { .wrap {
@include size($wrapWidth, 100%); @include size($wrapWidth, 100%);

+ 22
- 8
digital-park-web/digital-park/src/views/index/Banner.vue Просмотреть файл

<section class="nav"> <section class="nav">
<Nav :areaName="areaName"></Nav> <Nav :areaName="areaName"></Nav>
</section> </section>
<!-- <el-carousel height="600px">
<el-carousel-item v-for="item in 1" :key="item">
<img :src="item" alt="" />
<el-carousel height="600px">
<el-carousel-item v-for="item in photo" :key="item">
<img class="img-carousel" :src="formatImg(item)" alt="园区图片" />
</el-carousel-item> </el-carousel-item>
</el-carousel>-->
</el-carousel>
</div> </div>
</template> </template>


//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等) //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》'; //例如:import 《组件名称》 from '《组件路径》';
import Nav from "@components/Header.vue"; import Nav from "@components/Header.vue";
import { formatImg } from "@/utils/common.js";
export default { export default {
props: { props: {
areaName: { areaName: {
require: true, require: true,
default: "", default: "",
}, },
photo: {
type: Array,
require: true,
default: ()=>[],
},

}, },
//import引入的组件需要注入到对象中才能使用 //import引入的组件需要注入到对象中才能使用
components: { Nav }, components: { Nav },
//监控data中的数据变化 //监控data中的数据变化
watch: {}, watch: {},
//方法集合 //方法集合
methods: {},
methods: {
formatImg,
},
//生命周期 - 创建完成(可以访问当前this实例) //生命周期 - 创建完成(可以访问当前this实例)
created() {}, created() {},
//生命周期 - 挂载完成(可以访问DOM元素) //生命周期 - 挂载完成(可以访问DOM元素)
//@import url(); 引入公共css类 //@import url(); 引入公共css类
.banner { .banner {
@include size(100%, 600px); @include size(100%, 600px);
background: url("~@assets/image/index/banner.png") no-repeat;
background-size: 100% 100%;
// background: url("~@assets/image/index/banner.png") no-repeat;
// background-size: 100% 100%;
position: relative; position: relative;
.img-carousel {
width: 100%;
height: 100%;
}
.nav { .nav {
z-index: 100; z-index: 100;
position: absolute; position: absolute;

+ 5
- 1
digital-park-web/digital-park/src/views/index/Index.vue Просмотреть файл

<template> <template>
<div class="home"> <div class="home">
<Banner :areaName="areaName"></Banner>
<Banner :areaName="areaName" :photo="photo"></Banner>
<div> <div>
<park-introduce :navLists="indexTab" :parkInfo="parkInfo" :areaName="areaName"></park-introduce> <park-introduce :navLists="indexTab" :parkInfo="parkInfo" :areaName="areaName"></park-introduce>
<!-- 产业导向和发展方向 --> <!-- 产业导向和发展方向 -->
navShow:false, navShow:false,
// 园区名称 // 园区名称
areaName:"", areaName:"",
// 园区图片
photo:[],
}; };
}, },
computed: {}, computed: {},
this.parkInfo.surroundingFacilities; this.parkInfo.surroundingFacilities;
this.navShow = true; this.navShow = true;
this.areaName = this.parkInfo.areaName; this.areaName = this.parkInfo.areaName;
this.photo = this.parkInfo.photo || [];
} else { } else {
this.$message.error(`获取数据失败,请刷新重试!`); this.$message.error(`获取数据失败,请刷新重试!`);
} }

+ 2
- 2
digital-park-web/digital-park/src/views/index/park-introduce/Introduce.vue Просмотреть файл

:options="playerOptions" :options="playerOptions"
></video-player> ></video-player>
</el-carousel-item> </el-carousel-item>
<el-carousel-item v-for="(item, index) in parkInfo.photo" :key="index">
<!-- <el-carousel-item v-for="(item, index) in parkInfo.photo" :key="index">
<img :src="formatImg(item)" alt="园区图片" /> <img :src="formatImg(item)" alt="园区图片" />
</el-carousel-item>
</el-carousel-item> -->
</el-carousel> </el-carousel>
</div> </div>



Загрузка…
Отмена
Сохранить