refactor: track home 页面样式调整

This commit is contained in:
Captain.B 2020-08-31 14:06:19 +08:00
parent e851aa2311
commit 336020322d
2 changed files with 35 additions and 42 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<ms-container> <ms-container>
<ms-main-container> <ms-main-container>
<el-row> <el-row :gutter="20">
<el-col :span="15"> <el-col :span="15">
<related-test-plan-list ref="relatedTestPlanList"/> <related-test-plan-list ref="relatedTestPlanList"/>
</el-col> </el-col>
@ -14,33 +14,34 @@
</template> </template>
<script> <script>
import RelatedTestPlanList from "./components/RelatedTestPlanList"; import RelatedTestPlanList from "./components/RelatedTestPlanList";
import TestCaseSideList from "./components/TestCaseSideList"; import TestCaseSideList from "./components/TestCaseSideList";
import MsContainer from "../../common/components/MsContainer"; import MsContainer from "../../common/components/MsContainer";
import MsMainContainer from "../../common/components/MsMainContainer"; import MsMainContainer from "../../common/components/MsMainContainer";
export default {
name: "TrackHome", export default {
components: {MsMainContainer, MsContainer, TestCaseSideList, RelatedTestPlanList}, name: "TrackHome",
watch: { components: {MsMainContainer, MsContainer, TestCaseSideList, RelatedTestPlanList},
'$route'(to,from) { watch: {
if (to.path.indexOf('/track/home') > -1) { '$route'(to, from) {
this.innitData(); if (to.path.indexOf('/track/home') > -1) {
} this.innitData();
}
},
methods: {
innitData() {
this.$refs.relatedTestPlanList.initTableData();
this.$refs.testCaseRecentList.initTableData();
}
} }
} }
},
methods: {
innitData() {
this.$refs.relatedTestPlanList.initTableData();
this.$refs.testCaseRecentList.initTableData();
}
}
}
</script> </script>
<style scoped> <style scoped>
.ms-main-container >>> .el-table { .ms-main-container >>> .el-table {
cursor:pointer; cursor: pointer;
} }
</style> </style>

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="track-home-component"> <div>
<el-card> <el-card>
<template v-slot:header> <template v-slot:header>
<span class="title">{{title}}</span> <span class="title">{{ title }}</span>
</template> </template>
<slot></slot> <slot></slot>
</el-card> </el-card>
@ -10,27 +10,19 @@
</template> </template>
<script> <script>
export default { export default {
name: "HomeBaseComponent", name: "HomeBaseComponent",
props: { props: {
title: { title: {
type: String, type: String,
default() { default() {
this.$t('commons.title') this.$t('commons.title')
}
}
} }
} }
}
}
</script> </script>
<style scoped> <style scoped>
.el-card {
padding: 15px;
}
.track-home-component {
padding: 0 15px 15px;
}
</style> </style>