mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-16 01:41:15 +08:00
67 lines
1.4 KiB
Vue
67 lines
1.4 KiB
Vue
<template>
|
||
<div>
|
||
<tool-tip
|
||
placement="bottom"
|
||
:title="showText">
|
||
<h1 @click="boom" style="display: inline-block">This is just a test, put your cursor here</h1>
|
||
</tool-tip>
|
||
<ant-button>2223</ant-button>
|
||
<div class="box">
|
||
<table>
|
||
<tr v-for="(tr, index) in table" :key="index">
|
||
<td v-for="(td, i) in tr" :key="i">
|
||
<tool-tip v-if="td" :placement="td" :title="td"><AntButton type="primary">{{td}}</AntButton></tool-tip>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import { ToolTip, Button } from '../../../components'
|
||
import '../../../components/button/style'
|
||
export default {
|
||
name: 'tooltip-basic',
|
||
data() {
|
||
return {
|
||
show: true,
|
||
showText: '你好啊,233',
|
||
table: [
|
||
['', 'topLeft', 'top', 'topRight', ''],
|
||
['leftTop', '', '', '', 'rightTop'],
|
||
['left', '', '', '', 'right'],
|
||
['leftBottom', '', '', '', 'rightBottom'],
|
||
['', 'bottomLeft', 'bottom', 'bottomRight', ''],
|
||
]
|
||
}
|
||
},
|
||
methods: {
|
||
boom() {
|
||
this.showText += '3'
|
||
}
|
||
},
|
||
components: {
|
||
ToolTip,
|
||
AntButton: Button,
|
||
},
|
||
beforeUpdate() {
|
||
console.info(90909090)
|
||
}
|
||
}
|
||
</script>
|
||
<style scoped lang="less">
|
||
.box {
|
||
margin: 100px;
|
||
}
|
||
table {
|
||
td {
|
||
padding: 20px;
|
||
}
|
||
p {
|
||
text-align: center;
|
||
vertical-align: middle;
|
||
}
|
||
}
|
||
</style>
|