修改自定义页面
parent
2e38cc36e5
commit
080a883d72
@ -1,2 +1,149 @@
|
|||||||
<template></template>
|
<template>
|
||||||
<script></script>
|
<div>
|
||||||
|
<div class="title">
|
||||||
|
<span contenteditable="true" @blur="edit('title', $event)">
|
||||||
|
{{ data.title }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="subTitle">
|
||||||
|
<span contenteditable="true" @blur="edit('subTitle', $event)">
|
||||||
|
{{ data.subTitle }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="list">
|
||||||
|
<div class="item" v-for="(i,k) in data.list">
|
||||||
|
<i class="del el-icon-circle-close" @click="data.list.splice(k, 1);"></i>
|
||||||
|
<div class="icon">
|
||||||
|
<UploadEl :data="i"/>
|
||||||
|
</div>
|
||||||
|
<div class="itemTitle" contenteditable="true" @blur="edit1('title', k,$event)">{{ i.title }}</div>
|
||||||
|
<div class="itemInfo" contenteditable="true" @blur="edit1('value', k,$event)">{{ i.value }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div style="width:100%;height:100%;" @click="data.list.push({title:'请输入',value:'请输入', icon: ''})">
|
||||||
|
<i class="el-icon-circle-plus" style="font-size: 3vw; line-height: 18vw"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import UploadEl from "@/components/editEl/uploadEl.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PlatformFeatures',
|
||||||
|
props: ['data'],
|
||||||
|
components: {UploadEl},
|
||||||
|
computed: {},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
edit(key, e) {
|
||||||
|
this.$props.data[key] = e.target.innerText
|
||||||
|
},
|
||||||
|
edit1(key, index, e) {
|
||||||
|
this.$props.data.list[index][key] = e.target.innerText
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
@import "~@/style.less";
|
||||||
|
|
||||||
|
.title {
|
||||||
|
padding-top: 4.2vw;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 2.5vw;
|
||||||
|
letter-spacing: 4px;
|
||||||
|
color: #0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subTitle {
|
||||||
|
padding-top: 0.4vw;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.9vw;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
width: 65vw;
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 3.8vw;
|
||||||
|
margin-bottom: 2.8vw;
|
||||||
|
box-shadow: 0 0 3px #0002;
|
||||||
|
|
||||||
|
|
||||||
|
.del {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
width: calc(100% / 3 - 2px);
|
||||||
|
height: 18vw;
|
||||||
|
border: 1px solid #3332;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
float: left;
|
||||||
|
transition: all 0.2s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: @standard-color;
|
||||||
|
|
||||||
|
.itemTitle {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemInfo {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 10vw;
|
||||||
|
height: 10vw;
|
||||||
|
position: absolute;
|
||||||
|
top: 5vw;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemTitle {
|
||||||
|
top: 11vw;
|
||||||
|
left: 50%;
|
||||||
|
position: absolute;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
font-size: 1.1vw;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemInfo {
|
||||||
|
top: 12vw;
|
||||||
|
left: 9.6%;
|
||||||
|
position: absolute;
|
||||||
|
font-size: 0.8vw;
|
||||||
|
line-height: 1.5vw;
|
||||||
|
color: #666;
|
||||||
|
letter-spacing: 2.5px;
|
||||||
|
text-align: left;
|
||||||
|
width: 80%;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|||||||
@ -1,2 +1,131 @@
|
|||||||
<template></template>
|
<template>
|
||||||
<script></script>
|
<div>
|
||||||
|
<div class="title">
|
||||||
|
<span>
|
||||||
|
{{ data.title }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="subTitle">
|
||||||
|
<span>
|
||||||
|
{{ data.subTitle }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="list">
|
||||||
|
<div class="item" v-for="(i,k) in data.list">
|
||||||
|
<div class="icon">
|
||||||
|
<el-image
|
||||||
|
fit="contain"
|
||||||
|
style="width: 100%;height: 100%"
|
||||||
|
:src="i.icon"
|
||||||
|
></el-image>
|
||||||
|
</div>
|
||||||
|
<div class="itemTitle">{{ i.title }}</div>
|
||||||
|
<div class="itemInfo">{{ i.value }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PlatformFeatures',
|
||||||
|
props: ['data'],
|
||||||
|
computed: {},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
@import "~@/style.less";
|
||||||
|
|
||||||
|
.title {
|
||||||
|
padding-top: 4.2vw;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 2.5vw;
|
||||||
|
letter-spacing: 4px;
|
||||||
|
color: #0003;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subTitle {
|
||||||
|
padding-top: 0.4vw;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.9vw;
|
||||||
|
letter-spacing: 2px;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
width: 65vw;
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 3.8vw;
|
||||||
|
margin-bottom: 2.8vw;
|
||||||
|
box-shadow: 0 0 3px #0002;
|
||||||
|
|
||||||
|
|
||||||
|
.item {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
width: calc(100% / 3 - 2px);
|
||||||
|
height: 18vw;
|
||||||
|
border: 1px solid #3332;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
float: left;
|
||||||
|
transition: all 0.2s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: @standard-color;
|
||||||
|
|
||||||
|
.itemTitle {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemInfo {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 10vw;
|
||||||
|
height: 10vw;
|
||||||
|
position: absolute;
|
||||||
|
top: 5vw;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemTitle {
|
||||||
|
top: 11vw;
|
||||||
|
left: 50%;
|
||||||
|
position: absolute;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
font-size: 1.1vw;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemInfo {
|
||||||
|
top: 12vw;
|
||||||
|
left: 9.6%;
|
||||||
|
position: absolute;
|
||||||
|
font-size: 0.8vw;
|
||||||
|
line-height: 1.5vw;
|
||||||
|
color: #666;
|
||||||
|
letter-spacing: 2.5px;
|
||||||
|
text-align: left;
|
||||||
|
width: 80%;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue