Commit e2c60830 authored by liziwl's avatar liziwl
Browse files

add tab view

parent 2665e838
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
import { defineClientConfig } from '@vuepress/client'
import BusTable from "./components/BusTable.vue";
import TabView from "./components/TabView.vue";
import Realtimemap from './components/Realtime-map.vue'
import WeatherSpan from './components/weather-span.vue'
import BusChartVue from './components/BusChartVue.vue'
@@ -8,6 +9,7 @@ import BusChartVue from './components/BusChartVue.vue'
export default defineClientConfig({
  enhance({ app }) {
    app.component("BusTable", BusTable)
    app.component("TabView", TabView)
    app.component("Realtimemap", Realtimemap)
    app.component("WeatherSpan", WeatherSpan)
    app.component("BusChartVue", BusChartVue)
+31 −0
Original line number Diff line number Diff line
<template>
  <div>
    <a-tabs type="card" size="large">
      <a-tab-pane key="tab1" tab="车辆位置 Bus Realtime Loaction">
        位置每5秒自动刷新。Location refreshes automatically every 5 seconds
        <Realtimemap/>
        <BusChartVue/>
      </a-tab-pane>
      <a-tab-pane key="tab2" tab="时间表 Timetable">
        <BusTable></BusTable>
      </a-tab-pane>
    </a-tabs>
  </div>
</template>

<script>
import { Tabs } from 'ant-design-vue';

export default {
  name: 'TabView',
  components: {
    ATabs: Tabs,
    ATabPane: Tabs.TabPane,
  }
};
</script>

<style>
@import 'ant-design-vue/es/tabs/style';

</style>
+3 −0
Original line number Diff line number Diff line
@@ -15,3 +15,6 @@
## 时间表 Timetable

<BusTable></BusTable>


<TabView></TabView>
+1 −0