Blame view

examples/routers/tabs.vue 651 Bytes
17f52abf   梁灏   update Tabs
1
  <template>
087ad37d   梁灏   update Tabs
2
3
4
5
6
      <Tabs type="card" closable @on-tab-remove="handleTagRemove">
          <Tab-pane label="标签一" v-if="tab0">标签一的内容</Tab-pane>
          <Tab-pane label="标签二" v-if="tab1">标签二的内容</Tab-pane>
          <Tab-pane label="标签三" v-if="tab2">标签三的内容</Tab-pane>
      </Tabs>
17f52abf   梁灏   update Tabs
7
8
9
  </template>
  <script>
      export default {
087ad37d   梁灏   update Tabs
10
11
12
13
14
15
16
17
18
19
20
21
          data () {
              return {
                  tab0: true,
                  tab1: true,
                  tab2: true
              }
          },
          methods: {
              handleTagRemove (name) {
                  this['tab' + name] = false;
              }
          }
17f52abf   梁灏   update Tabs
22
      }
8778b343   梁灏   init Menu components
23
  </script>