<template>
<div style="width: 200px; margin:100px auto;">
<a-tooltip title="导出excel" :getPopupContainer="getPopupContainer">
<a-button type="primary">导出excel</a-button>
</a-tooltip>
</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {
getPopupContainer(triggerNode){
return triggerNode.parentNode;
}
}
}
</script>
<style scoped>
/* 提示框 */
/deep/ .ant-tooltip-inner {
background-color:red;
}
/* 小箭头 */
/deep/ .ant-tooltip-arrow::before {
background-color:red;
}
</style>
原文链接::https://blog.csdn.net/lilycheng1986/article/details/124125301