<template>
|
<div class="diy-index" @mouseup="handleClick">
|
<el-container>
|
<el-aside width="375px" class="el_aside">
|
<div id="diy-aside" class="diy-aside">
|
<page ref="diy-page"></page>
|
</div>
|
<el-button class="preview_btn" type="success" size="mini" @click="preClick">手机端预览</el-button>
|
</el-aside>
|
<el-main class="diy-main">
|
<slot name="hotContent"></slot>
|
</el-main>
|
</el-container>
|
<preview ref="preview"></preview>
|
</div>
|
</template>
|
<script>
|
import page from '../../views/diy-form/page/index.vue'
|
import { mapState, mapMutations } from 'vuex'
|
import preview from '../../views/diy-form/components/preview.vue'
|
|
export default {
|
name: 'diy-index',
|
components: {
|
page,
|
preview
|
},
|
data () {
|
return {
|
diyDes: null
|
}
|
},
|
computed: {
|
...mapState(['diyList'])
|
},
|
methods: {
|
...mapMutations(['resetDiy']),
|
handleClick () {
|
document.onmousemove = null
|
this.$refs['diy-page'].onmouseup()
|
},
|
async preClick () {
|
this.$emit('handle-preview')
|
}
|
},
|
destroyed () {
|
this.resetDiy()
|
}
|
}
|
</script>
|
<style scoped lang="scss">
|
.diy-index{
|
background: #F2F2F2;
|
.diy-main{
|
background-color: #ffffff;
|
margin-left: 20px;
|
margin-right: 20px;
|
}
|
}
|
/* 设置滚动条的样式 */
|
.diy-aside::-webkit-scrollbar {
|
display: none;
|
width: 0;
|
}
|
|
.diy-aside {
|
overflow: hidden;
|
border: 1px solid #1F1C1C;
|
height: 667px;
|
overflow-y: auto;
|
-ms-overflow-style:none;
|
overflow:-moz-scrollbars-none;
|
scrollbar-width: none;
|
}
|
.el_aside {
|
text-align: center;
|
}
|
.preview_btn {
|
margin-top: 10px;
|
width: 375px;
|
height: 50px;
|
background-color: #C2A16C;
|
border: none;
|
&:hover,&:active,&:focus{
|
background-color: #8f744a;
|
}
|
}
|
</style>
|