2016-09-20 09:30:35 +08:00
|
|
|
<template>
|
2018-04-10 12:16:05 +08:00
|
|
|
<div style="margin: 200px">
|
|
|
|
<Tabs value="name1">
|
|
|
|
<TabPane label="标签一" name="name1">
|
2018-04-16 19:27:34 +08:00
|
|
|
<!-- <div style="width: 200px;height:300px;overflow: auto;">
|
2018-04-10 15:59:08 +08:00
|
|
|
<Poptip title="提示标题" content="标签一的内容" placement="left" transfer >
|
2018-04-10 12:50:19 +08:00
|
|
|
<Button id="aaa">左边</Button>
|
|
|
|
</Poptip>
|
2018-04-10 15:59:08 +08:00
|
|
|
<Poptip title="提示标题" content="标签一的内容" placement="right" transfer>
|
2018-04-10 12:16:05 +08:00
|
|
|
<Button id="aaa">右边</Button>
|
|
|
|
</Poptip>
|
2018-04-10 15:59:08 +08:00
|
|
|
<Poptip title="提示标题" content="标签一的内容" placement="top" transfer>
|
2018-04-10 12:50:19 +08:00
|
|
|
<Button id="aaa">上边</Button>
|
|
|
|
</Poptip>
|
2018-04-10 15:59:08 +08:00
|
|
|
<Poptip title="提示标题" content="标签一的内容" placement="bottom" transfer>
|
2018-04-10 12:50:19 +08:00
|
|
|
<Button id="aaa">下边</Button>
|
|
|
|
</Poptip>
|
2018-04-16 19:27:34 +08:00
|
|
|
</div> -->
|
|
|
|
<div>
|
|
|
|
<Poptip title="提示标题" content="标签一的内容" transfer>
|
|
|
|
<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>
|
2018-04-10 12:16:05 +08:00
|
|
|
</div>
|
|
|
|
</TabPane>
|
|
|
|
<TabPane label="标签二" name="name2">标签二的内容</TabPane>
|
|
|
|
</Tabs>
|
2016-10-26 12:04:40 +08:00
|
|
|
</div>
|
2016-09-20 09:30:35 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-04-10 12:16:05 +08:00
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
options: {
|
2018-04-10 15:59:08 +08:00
|
|
|
|
2018-04-16 19:27:34 +08:00
|
|
|
},
|
|
|
|
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:[],
|
2017-08-15 10:07:15 +08:00
|
|
|
}
|
2018-04-16 19:27:34 +08:00
|
|
|
},
|
|
|
|
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
|
|
|
|
},
|
2017-08-15 10:07:15 +08:00
|
|
|
}
|
2016-09-20 09:30:35 +08:00
|
|
|
}
|
2016-10-28 17:24:52 +08:00
|
|
|
</script>
|