Blame view

local/routers/radio.vue 2.04 KB
7fa943eb   梁灏   init
1
2
  <template>
      <div>
49306c7a   梁灏   add Collapse comp...
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
          <Collapse active-key="2">
              <Panel key="1">
                  Header1
                  <Collapse active-key="2" slot="content">
                      <Panel key="1">
                          inHeader1
                          <p slot="content">inContent1</p>
                      </Panel>
                      <Panel key="2">
                          inHeader2
                          <p slot="content">inContent2</p>
                      </Panel>
                      <Panel key="3">
                          inHeader3
                          <p slot="content">inContent3</p>
                      </Panel>
                  </Collapse>
              </Panel>
              <Panel key="2">
                  Header2
                  <p slot="content">A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
              </Panel>
              <Panel key="3">
                  Header3
                  <p slot="content">A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
              </Panel>
          </Collapse>
          <Button @click="activeKey = '2'">换</Button>
7fa943eb   梁灏   init
31
32
33
      </div>
  </template>
  <script>
49306c7a   梁灏   add Collapse comp...
34
      import { Radio, Alert, Icon, Collapse, Button } from 'iview';
7fa943eb   梁灏   init
35
36
  
      const RadioGroup = Radio.Group;
49306c7a   梁灏   add Collapse comp...
37
      const Panel = Collapse.Panel;
7fa943eb   梁灏   init
38
39
40
41
  
      export default {
          components: {
              Radio,
9d69bab6   梁灏   add Alert component
42
43
              RadioGroup,
              Alert,
49306c7a   梁灏   add Collapse comp...
44
45
46
47
              Icon,
              Collapse,
              Panel,
              Button
7fa943eb   梁灏   init
48
49
50
51
52
53
54
          },
          props: {
          
          },
          data () {
              return {
                  radio: true,
49306c7a   梁灏   add Collapse comp...
55
56
                  radioGroup: '段模',
                  activeKey: [1,2]
7fa943eb   梁灏   init
57
58
59
60
61
62
63
64
              }
          },
          computed: {
          
          },
          methods: {
              changeGroup (data) {
                  console.log(data);
9d69bab6   梁灏   add Alert component
65
66
67
              },
              closed (data) {
                  console.log(data)
7fa943eb   梁灏   init
68
69
70
71
              }
          }
      }
  </script>