This commit is contained in:
梁灏 2017-11-07 18:09:01 +08:00
parent 9f5a643a16
commit cd92d87821
2 changed files with 19 additions and 4 deletions

View file

@ -1,15 +1,25 @@
<template> <template>
<div> <div>
<Tooltip always placement="top" transfer content="Tooltip 文字提示" :delay="1000"> <Tooltip always placement="top" transfer :content="text" :delay="1000">
<Button @click="disabled = true">延时1秒显示</Button> <Button @click="disabled = true">延时1秒显示</Button>
</Tooltip> </Tooltip>
<Tooltip placement="top" transfer content="Tooltip 文字提示"> <Tooltip placement="top" transfer :content="text">
<Button @click="disabled = true">延时1秒显示</Button> <Button @click="handleChange">change</Button>
</Tooltip> </Tooltip>
<Button @click="handleChange">change</Button>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () {
return {
text: 'Tooltip 文字提示'
};
},
methods: {
handleChange () {
this.text = '提示'
}
}
} }
</script> </script>

View file

@ -68,6 +68,11 @@
prefixCls: prefixCls prefixCls: prefixCls
}; };
}, },
watch: {
content () {
this.updatePopper();
}
},
methods: { methods: {
handleShowPopper() { handleShowPopper() {
if (this.timeout) clearTimeout(this.timeout); if (this.timeout) clearTimeout(this.timeout);