2018-03-22 10:19:12 +00:00
|
|
|
<cn>
|
|
|
|
#### 位置
|
|
|
|
位置有 12 个方向。
|
|
|
|
</cn>
|
|
|
|
|
|
|
|
<us>
|
|
|
|
#### Placement
|
|
|
|
The ToolTip has 12 placements choice.
|
|
|
|
</us>
|
|
|
|
|
|
|
|
```html
|
|
|
|
<template>
|
|
|
|
<div id="components-a-tooltip-demo-placement">
|
|
|
|
<div :style="{ marginLeft: `${buttonWidth}px`, whiteSpace: 'nowrap' }">
|
2018-03-25 14:24:57 +00:00
|
|
|
<a-tooltip placement="topLeft" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>TL</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
|
|
|
<a-tooltip placement="top" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>Top</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
|
|
|
<a-tooltip placement="topRight" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>TR</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
2018-03-22 10:19:12 +00:00
|
|
|
</div>
|
|
|
|
<div :style="{ width: `${buttonWidth}px`, float: 'left' }">
|
2018-03-25 14:24:57 +00:00
|
|
|
<a-tooltip placement="leftTop" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>LT</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
|
|
|
<a-tooltip placement="left" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>Left</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
|
|
|
<a-tooltip placement="leftBottom" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>LB</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
2018-03-22 10:19:12 +00:00
|
|
|
</div>
|
|
|
|
<div :style="{ width: `${buttonWidth}px`, marginLeft: `${buttonWidth * 4 + 24 }px`}">
|
2018-03-25 14:24:57 +00:00
|
|
|
<a-tooltip placement="rightTop" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>RT</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
|
|
|
<a-tooltip placement="right" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>Right</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
|
|
|
<a-tooltip placement="rightBottom" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>RB</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
2018-03-22 10:19:12 +00:00
|
|
|
</div>
|
|
|
|
<div :style="{ marginLeft: `${buttonWidth}px`, clear: 'both', whiteSpace: 'nowrap' }">
|
2018-03-25 14:24:57 +00:00
|
|
|
<a-tooltip placement="bottomLeft" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>BL</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
|
|
|
<a-tooltip placement="bottom" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>Bottom</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
|
|
|
<a-tooltip placement="bottomRight" >
|
2018-03-22 10:19:12 +00:00
|
|
|
<template slot="title">
|
|
|
|
<span>prompt text</span>
|
|
|
|
</template>
|
|
|
|
<a-button>BR</a-button>
|
2018-03-25 14:24:57 +00:00
|
|
|
</a-tooltip>
|
2018-03-22 10:19:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
buttonWidth: 70,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
#components-a-tooltip-demo-placement .ant-btn {
|
|
|
|
width: 70px;
|
|
|
|
text-align: center;
|
|
|
|
padding: 0;
|
|
|
|
margin-right: 8px;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
```
|
|
|
|
|