App.vue 1.13 KB
<template>
  <div id="app">
    <el-tabs v-model="activeName">
      <el-tab-pane
        label="传入接口(getListApi)"
        name="autoTabel"
      >
        <h1>自动调用接口,并刷新表格</h1>
        <auto-table></auto-table>
      </el-tab-pane>
      <el-tab-pane
        label="不传入接口(getListApi)"
        name="table"
      >
        <h1>手动调用接口,并刷新表格</h1>
        <manual-table></manual-table>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import autoTable from './view/autoTable'
import manualTable from './view/manualTable'
export default {
  name: 'app',
  data() {
    return {
      activeName: 'autoTabel'
    }
  },

  components: {
    autoTable,
    manualTable
  }

}
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  /* margin-top: 60px; */
}

h1,
h2 {
  font-weight: normal;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  display: inline-block;
  margin: 0 10px;
}

a {
  color: #42b983;
}
</style>