tiny-vue/examples/docs/resources/pc/demo/tooltip/tooltip-content.vue

48 lines
1002 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<tiny-tooltip placement="top">
<template #content>
<div class="h50">通过 <span class="red">slot = "content" </span>自定义提示内容</div>
</template>
<button class="tiny-button tiny-button--primary">插槽的使用</button>
</tiny-tooltip>
<tiny-tooltip placement="top" effect="light">
<template #content>
<div><Icon-operationfaild class="red" /> 该网段不可用可用网段163</div>
</template>
<button class="tiny-button tiny-button--primary">校验错误</button>
</tiny-tooltip>
</div>
</template>
<script lang="jsx">
import { Tooltip } from '@opentiny/vue'
import { iconOperationfaild } from '@opentiny/vue-icon'
export default {
components: {
TinyTooltip: Tooltip,
IconOperationfaild: iconOperationfaild()
},
data() {
return {}
}
}
</script>
<style scoped>
.h50 {
height: 50px;
}
.mr9 {
margin-right: 9px;
}
.red {
color: #f23030;
fill: #f23030;
}
</style>