Commit dee03ef3a19d956490a956dff0f889bc315c948d
1 parent
309912df
update Poptip demo
Showing
1 changed file
with
20 additions
and
13 deletions
Show diff stats
examples/routers/poptip.vue
1 | 1 | <template> |
2 | - <div style="margin: 200px;"> | |
3 | - <Poptip title="提示标题" transfer> | |
4 | - <div slot="content" style="padding: 50px"> | |
5 | - <Button>click me</Button> | |
6 | - </div> | |
7 | - <Button>click 激活</Button> | |
8 | - </Poptip> | |
2 | + <div style="margin: 200px"> | |
3 | + <Tabs value="name1"> | |
4 | + <TabPane label="标签一" name="name1"> | |
5 | + <div style="overflow: auto;width: 200px;height:300px"> | |
6 | + <Poptip title="提示标题" content="标签一的内容" placement="right" transfer :options="options"> | |
7 | + <Button id="aaa">右边</Button> | |
8 | + </Poptip> | |
9 | + </div> | |
10 | + </TabPane> | |
11 | + <TabPane label="标签二" name="name2">标签二的内容</TabPane> | |
12 | + </Tabs> | |
9 | 13 | </div> |
10 | 14 | </template> |
11 | 15 | <script> |
12 | 16 | export default { |
13 | - methods: { | |
14 | - ok () { | |
15 | - this.$Message.info('点击了确定'); | |
16 | - }, | |
17 | - cancel () { | |
18 | - this.$Message.info('点击了取消'); | |
17 | + data () { | |
18 | + return { | |
19 | + options: { | |
20 | + modifiers: { | |
21 | + preventOverflow: { | |
22 | + boundariesElement: 'body', | |
23 | + } | |
24 | + } | |
25 | + } | |
19 | 26 | } |
20 | 27 | } |
21 | 28 | } |
... | ... |