2019-07-26 13:32:43 +08:00
|
|
|
<template>
|
2019-08-08 10:16:14 +08:00
|
|
|
<div class="app-wrapper">
|
|
|
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
|
|
<div v-show="listShow" class="examList" :style="{width: widthLeft+'px'}">
|
|
|
|
<demon-list ref="demonList" :height="height" />
|
|
|
|
</div>
|
|
|
|
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
|
|
|
<transition>
|
|
|
|
<router-view :product-list="productList" />
|
|
|
|
</transition>
|
|
|
|
</el-scrollbar>
|
|
|
|
</div>
|
2019-07-26 13:32:43 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-08-08 10:16:14 +08:00
|
|
|
import { mapGetters } from 'vuex';
|
|
|
|
import demonList from './list/demonList';
|
|
|
|
import drapLeft from '@/views/components/drapLeft/index';
|
|
|
|
import localStore from 'storejs';
|
2019-07-26 13:32:43 +08:00
|
|
|
|
2019-08-08 10:16:14 +08:00
|
|
|
export default {
|
|
|
|
name: 'Exam',
|
|
|
|
components: {
|
|
|
|
demonList,
|
|
|
|
drapLeft
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
listShow: true,
|
|
|
|
widthLeft: 450,
|
|
|
|
productList: []
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapGetters([
|
|
|
|
'lessonbar'
|
2019-09-02 15:37:57 +08:00
|
|
|
]),
|
|
|
|
height() {
|
|
|
|
return this.$store.state.app.height - 50;
|
|
|
|
}
|
2019-08-08 10:16:14 +08:00
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
'lessonbar.opened': function (val) {
|
|
|
|
this.listShow = val;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.widthLeft = Number(localStore.get('LeftWidth'));
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
refresh() {
|
|
|
|
this.$refs && this.$refs.demonList && this.$refs.demonList.refresh();
|
|
|
|
},
|
|
|
|
drapWidth(width) {
|
|
|
|
this.widthLeft = Number(width);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2019-07-26 13:32:43 +08:00
|
|
|
</script>
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
|
|
|
|
.app-wrapper {
|
|
|
|
@include clearfix;
|
|
|
|
position: relative;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.examList {
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
</style>
|