# bz-tooltip 文本提示

# 基本用法

常用于展示文本的提示信息, 也可以自定义 tooltip 元素(v-slot:content

扫码预览
用BoosHi扫码或PC端点击
<template>
    <view class="demo-content">
        <view class="demo-title">bz-tooltip 文字提示</view>
        <demo-cell title="默认用法-上下">
            <view class="demo-flex-between">
                <bz-tooltip
                    :content="params.content"
                    placement="topLeft"
                    ><bz-button>topLeft</bz-button></bz-tooltip
                >
                <bz-tooltip
                    :content="params.content"
                    placement="top"
                    ><bz-button>top</bz-button></bz-tooltip
                >
                <bz-tooltip
                    :content="params.content"
                    placement="topRight"
                    ><bz-button>topRight</bz-button></bz-tooltip
                >
            </view>
            <br />
            <view class="demo-flex-between">
                <bz-tooltip
                    :content="params.content"
                    placement="bottomLeft"
                    ><bz-button>bottomLeft</bz-button></bz-tooltip
                >
                <bz-tooltip
                    :content="params.content"
                    placement="bottom"
                    ><bz-button>bottom</bz-button></bz-tooltip
                >
                <bz-tooltip
                    :content="params.content"
                    placement="bottomRight"
                    ><bz-button>bottomRight</bz-button></bz-tooltip
                >
            </view>
        </demo-cell>
        <demo-cell title="默认用法-左右">
            <view class="demo-flex-between">
                <bz-tooltip
                    placement="rightTop"
                    :content="params.content"
                >
                    <bz-button>rightTop</bz-button>
                </bz-tooltip>
                <bz-tooltip
                    placement="leftTop"
                    :content="params.content"
                >
                    <bz-button>leftTop</bz-button>
                </bz-tooltip>
            </view>
            <br />
            <view class="demo-flex-between">
                <bz-tooltip
                    placement="right"
                    :content="params.content"
                >
                    <bz-button>right</bz-button>
                </bz-tooltip>
                <bz-tooltip
                    placement="left"
                    :content="params.content"
                >
                    <bz-button>left</bz-button>
                </bz-tooltip>
            </view>
            <br />
            <view class="demo-flex-between">
                <bz-tooltip
                    placement="rightBottom"
                    :content="params.content"
                >
                    <bz-button>rightBottom</bz-button>
                </bz-tooltip>
                <bz-tooltip
                    placement="leftBottom"
                    :content="params.content"
                >
                    <bz-button>leftBottom</bz-button>
                </bz-tooltip>
            </view>
        </demo-cell>
    </view>
</template>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
展开 刷新 关闭

# 属性说明

属性名 类型 默认值 说明
content String - 提示文本
placement 详见下方 'bottom' 出现位置
borderRadius 1.0.1 string 4px 自定义边框圆角
maxWidth 1.0.1 Boolean 200px 弹出框最大宽度
disabled 1.0.1 Boolean false 禁用
  • placement 取值
版本 类型
1.0.1 及以上版本 top, topLeft, topRight, bottom, bottomLeft, bottomRight, left, leftTop, leftBottom, right, rightTop, rightBottom
1.0.1-7 及以下版本 bottom
最后更新于 : 5/25/2023, 10:25:15 AM