rt-sim-training-client/src/views/scriptManage/index.vue

60 lines
1.5 KiB
Vue
Raw Normal View History

2019-08-15 09:04:17 +08:00
<template>
<div class="app-wrapper">
<el-scrollbar wrap-class="scrollbar-wrapper">
<div v-show="treeShow" class="list" :style="{width: widthLeft+'px'}">
2019-08-15 14:06:53 +08:00
<script-tree ref="scriptTree" :height="height" />
2019-08-15 09:04:17 +08:00
</div>
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
<transition>
2019-08-15 14:06:53 +08:00
<router-view @refresh="refresh"/>
2019-08-15 09:04:17 +08:00
</transition>
</el-scrollbar>
</div>
</template>
<script>
import ScriptTree from './category/tree';
import drapLeft from '@/views/components/drapLeft/index';
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
export default {
name: 'Script',
components: {
ScriptTree,
drapLeft
},
mixins: [WindowResizeHandler],
data() {
return {
height: 0,
treeShow: true,
widthLeft: 450
};
},
methods: {
resizeHandler() {
this.height = this._clientHeight - 50;
},
drapWidth(width) {
this.widthLeft = Number(width);
},
2019-08-29 17:16:33 +08:00
refresh(data) {
this.$refs.scriptTree.refresh(data);
2019-08-15 14:06:53 +08:00
}
},
2019-08-15 09:04:17 +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;
}
.list {
float: left;
}
</style>