Commit eb6d11502fa71dc32d359020f83b16852e972ec3

Authored by liuqimichale
1 parent 7e22e0a3

title 总计 简单封装

index.html
... ... @@ -2,7 +2,8 @@
2 2 <html>
3 3 <head>
4 4 <meta charset="utf-8">
5   - <meta name="viewport" content="width=device-width,initial-scale=1.0">
  5 + <!--<meta name="viewport" content="width=device-width,initial-scale=1.0">-->
  6 + <meta name="viewport" content="width=1200">
6 7 <title>监控</title>
7 8 </head>
8 9 <body>
... ...
src/components/titlesection.vue 0 → 100644
  1 +<template>
  2 + <div class="title">
  3 + title
  4 + </div>
  5 +</template>
  6 +
  7 +<script>
  8 +export default {
  9 + name: 'titlesection'
  10 +}
  11 +</script>
  12 +
  13 +<style scoped>
  14 + .title{
  15 + height: 30px;
  16 + line-height: 30px;
  17 + background: #f0f;
  18 + }
  19 +</style>
... ...
src/components/total.vue 0 → 100644
  1 +<template>
  2 + <div class="totalwrap">
  3 + 总计:123213
  4 + </div>
  5 +</template>
  6 +
  7 +<script>
  8 +export default {
  9 + name: 'total'
  10 +}
  11 +</script>
  12 +
  13 +<style scoped>
  14 +.totalwrap{
  15 + height: 40px;
  16 + background: #00f;
  17 +}
  18 +</style>
... ...
src/styles/reset.css
... ... @@ -90,4 +90,8 @@ table {
90 90 .margin12-0 {
91 91 margin: 12px 0;
92 92 }
  93 +.flexfm{
  94 + flex: 1;
  95 + background: #ff0;
  96 +}
93 97  
... ...
src/views/mainContainer.vue
... ... @@ -2,7 +2,7 @@
2 2 <div class="maincontainer">
3 3 <ul class="containerwrap clearfix">
4 4 <li>
5   - <div class="heightsmall"></div>
  5 + <pdasection class="heightsmall"></pdasection>
6 6 <div class="heightsmall margin12-0"></div>
7 7 <div class="heightsmall"></div>
8 8 </li>
... ... @@ -22,10 +22,13 @@
22 22  
23 23 <script>
24 24 import loadinggif from '../components/loading'
25   -
  25 +import pdasection from '../views/pdasection'
26 26 export default {
27 27 name: 'mainContainer',
28   - components: {loadinggif},
  28 + components: {
  29 + loadinggif,
  30 + pdasection
  31 + },
29 32 data() {
30 33 return {
31 34 showLoaddingGif: false
... ... @@ -58,6 +61,8 @@ export default {
58 61 .heightsmall {
59 62 flex: 1;
60 63 background: #f00;
  64 + display: flex;
  65 + flex-direction: column;
61 66 }
62 67  
63 68 .containerwrap > li:nth-of-type(2) {
... ...
src/views/pdasection.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 + <titlesection></titlesection>
  4 + <totalsection></totalsection>
  5 + <div class="flexfm"></div>
  6 + </div>
  7 +</template>
  8 +
  9 +<script>
  10 +import titlesection from '../components/titlesection'
  11 +import totalsection from '../components/total'
  12 +export default {
  13 + name: 'pdasection',
  14 + components: {
  15 + titlesection,
  16 + totalsection
  17 + }
  18 +}
  19 +</script>
  20 +
  21 +<style scoped>
  22 +
  23 +</style>
... ...