Blame view

examples/routers/poptip.vue 3.18 KB
40f8606f   梁灏   add Notice component
1
  <template>
dee03ef3   梁灏   update Poptip demo
2
3
4
      <div style="margin: 200px">
          <Tabs value="name1">
              <TabPane label="标签一" name="name1">
f0116c03   huanghong   update poptip con...
5
                  <!-- <div style="width: 200px;height:300px;overflow: auto;">
81f88959   梁灏   update Poptip opt...
6
                      <Poptip title="提示标题" content="标签一的内容" placement="left" transfer >
e8139eac   huanghong   update popper
7
8
                          <Button id="aaa">左边</Button>
                      </Poptip>
81f88959   梁灏   update Poptip opt...
9
                      <Poptip title="提示标题" content="标签一的内容" placement="right" transfer>
dee03ef3   梁灏   update Poptip demo
10
11
                          <Button id="aaa">右边</Button>
                      </Poptip>
81f88959   梁灏   update Poptip opt...
12
                      <Poptip title="提示标题" content="标签一的内容" placement="top" transfer>
e8139eac   huanghong   update popper
13
14
                          <Button id="aaa">上边</Button>
                      </Poptip>
81f88959   梁灏   update Poptip opt...
15
                      <Poptip title="提示标题" content="标签一的内容" placement="bottom" transfer>
e8139eac   huanghong   update popper
16
17
                          <Button id="aaa">下边</Button>
                      </Poptip>
f0116c03   huanghong   update poptip con...
18
19
                  </div> -->
                  <div>
d54c9795   梁灏   Poptip support gl...
20
                      <Poptip title="提示标题" content="标签一的内容">
f0116c03   huanghong   update poptip con...
21
22
23
24
25
26
27
28
29
30
                          <Button id="aaa">点击显示</Button>
                          <div slot="content">
                              <Button @click='loadData(15)'>15条数据</Button>
                              <Button @click='loadData(10)'>10条数据</Button>
                              <Button @click='loadData(5)'>5条数据</Button>
                              <Button @click='loadData(3)'>3条数据</Button>
                              <Table :columns='columns1' :data='data1'>
                              </Table>
                          </div>
                      </Poptip>
dee03ef3   梁灏   update Poptip demo
31
32
33
34
                  </div>
              </TabPane>
              <TabPane label="标签二" name="name2">标签二的内容</TabPane>
          </Tabs>
bf962a69   梁灏   remove Row css - ...
35
      </div>
40f8606f   梁灏   add Notice component
36
37
  </template>
  <script>
40f8606f   梁灏   add Notice component
38
      export default {
dee03ef3   梁灏   update Poptip demo
39
40
41
          data () {
              return {
                  options: {
81f88959   梁灏   update Poptip opt...
42
  
f0116c03   huanghong   update poptip con...
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
                  },
                  columns1:[
                      {
                          title: 'Data1',
                          key: 'data1',
                          width: 100,
                      },
                      {
                          title: 'Data2',
                          key: 'data2',
                          width: 100
                      },
                      {
                          title: 'Data3',
                          key: 'data3',
                          width: 100
                      },
                      {
                          title: 'Data4',
                          key: 'data4',
                          width: 100
                      }
                  ],
                  data1:[],
2c5faf30   梁灏   init Avatar compo...
67
              }
f0116c03   huanghong   update poptip con...
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
          },
          created(){
              this.loadData(5);
          },
          methods:{
              loadData(num){
                  let data = [];
                  for (let i=0; i<num; i++) {
                      data.push({
                          data1:Math.random()*1000000,
                          data2:Math.random()*100000000,
                          data3:Math.random()*10000000000,
                          data4:Math.random()*1000000000000,
                      })
                  }
                  this.data1 = data
              },
2c5faf30   梁灏   init Avatar compo...
85
          }
40f8606f   梁灏   add Notice component
86
      }
d6342fe1   jingsam   fixed ie bug
87
  </script>