Blame view

examples/routers/menu.vue 3.65 KB
e05d7289   梁灏   update Menu
1
  <template>
fd1582c5   梁灏   support Menu & La...
2
      <div>
3bc262e9   zhigang.li   udpate
3
          <Menu :theme="theme1"  active-name="1" accordion @on-select="handleSelect" @on-open-change="handleOpen" :open-names="openArr">
c708835c   梁灏   update Menu to su...
4
5
              <Menu-item name="1">
                  <Icon type="ios-paper"></Icon>
4bce7645   zhigang.li   make menu support...
6
                  一级1
c708835c   梁灏   update Menu to su...
7
8
9
              </Menu-item>
              <Menu-item name="2">
                  <Icon type="ios-people"></Icon>
4bce7645   zhigang.li   make menu support...
10
                  一级2
c708835c   梁灏   update Menu to su...
11
12
13
              </Menu-item>
              <Submenu name="3">
                  <template slot="title">
4bce7645   zhigang.li   make menu support...
14
15
                      <Icon type="ios-people"></Icon>
                      一级3
c708835c   梁灏   update Menu to su...
16
                  </template>
4bce7645   zhigang.li   make menu support...
17
18
                  <Menu-item name="3-1">二级1</Menu-item>
                  <Menu-item name="3-2">二级2</Menu-item>
3bc262e9   zhigang.li   udpate
19
                  <Submenu name="3-3">
4bce7645   zhigang.li   make menu support...
20
21
22
23
24
25
26
27
28
29
30
31
32
                      <template slot="title">
                          <Icon type="stats-bars"></Icon>
                          二级3
                      </template>
                      <Menu-item name="3-3-1">三级1</Menu-item>
                      <Menu-item name="3-3-2">三级2</Menu-item>
                      <Submenu name="3-3-3">
                          <template slot="title">
                              <Icon type="stats-bars"></Icon>
                              三级3
                          </template>
                          <Menu-item name="3-3-3-1">四级1</Menu-item>
                          <Menu-item name="3-3-3-2">四级2</Menu-item>
3e3fba0e   zhigang.li   add style for men...
33
34
35
36
37
38
39
40
41
42
                          <MenuGroup title="Menu-Group">
                              <MenuItem name="3-3-3-3-1">
                                  <Icon type="document-text"></Icon>
                                  Group-item1
                              </MenuItem>
                              <MenuItem name="3-3-3-3-2">
                                  <Icon type="chatbubbles"></Icon>
                                  Group-item2
                              </MenuItem>
                          </MenuGroup>
4bce7645   zhigang.li   make menu support...
43
                      </Submenu>
a163daa0   zhigang.li   Add logical treat...
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
                      <Submenu name="3-3-4">
                          <template slot="title">
                              <Icon type="stats-bars"></Icon>
                              三级4
                          </template>
                          <Menu-item name="3-3-4-1">四级1</Menu-item>
                          <Menu-item name="3-3-4-2">四级2</Menu-item>
                      </Submenu>
                  </Submenu>
                  <Submenu name="3-4">
                      <template slot="title">
                          <Icon type="stats-bars"></Icon>
                          二级4
                      </template>
                      <Menu-item name="3-4-1">三级1</Menu-item>
                      <Menu-item name="3-4-2">三级2</Menu-item>
3bc262e9   zhigang.li   udpate
60
                  </Submenu>
c708835c   梁灏   update Menu to su...
61
62
63
              </Submenu>
              <Menu-item name="4">
                  <Icon type="settings"></Icon>
4bce7645   zhigang.li   make menu support...
64
                  一级4
c708835c   梁灏   update Menu to su...
65
              </Menu-item>
a8a03995   Aresn   update #1102
66
          </Menu>
c0478e27   Aresn   update Menu style
67
68
          <br>
          <p>切换主题</p>
c708835c   梁灏   update Menu to su...
69
          <Radio-group v-model="theme1">
c0478e27   Aresn   update Menu style
70
71
              <Radio label="light"></Radio>
              <Radio label="dark"></Radio>
c708835c   梁灏   update Menu to su...
72
              <Radio label="primary"></Radio>
c0478e27   Aresn   update Menu style
73
          </Radio-group>
75873f90   梁灏   fixed #823
74
          <Input v-model="value4" icon="ios-clock-outline" placeholder="请输入..." style="width: 200px"></Input>
fd1582c5   梁灏   support Menu & La...
75
      </div>
e05d7289   梁灏   update Menu
76
77
78
  </template>
  <script>
      export default {
e05d7289   梁灏   update Menu
79
80
          data () {
              return {
4bce7645   zhigang.li   make menu support...
81
82
83
84
85
86
87
88
89
90
91
92
93
                  theme1: 'dark',
                  value4: '',
                  openArr: ['3', '3-3', '3-3-3']
              };
          },
          methods: {
              handleSelect (name) {
                  // console.log(name);
                  return name;
              },
              handleOpen (openArr) {
                  // console.log(openArr);
                  return openArr;
a8a03995   Aresn   update #1102
94
              }
e05d7289   梁灏   update Menu
95
          }
4bce7645   zhigang.li   make menu support...
96
      };
fc3ffbe0   梁灏   publish 0.9.10-rc-2
97
  </script>