Skip to content
官方QQ交流群
pc端ui:468705115   点此加入
移动端ui:468217742   点此加入
技术交流1:87208295   点此加入
技术交流2:787747122   点此加入
官网
云控制台
开放平台
关注微信公众号
代码仓库: 码云

Tooltip 长按提示

Tooltip组件主要用于长按操作,类似微信的长按气泡

平台差异说明

App(vue)App(nvue)H5小程序

基本使用.

说明

由于安卓nvue下,overflow属性不支持visible值,故此组件暂不支持安卓nvue环境。

html
<template>
    <up-tooltip text="复制" overlay></up-tooltip>
</template>

下方显示

html
<template>
    <up-tooltip text="下方显示" direction="bottom"></up-tooltip>
</template>

扩展按钮

html
<template>
    <up-tooltip text="扩展显示" :buttons="['扩展']"></up-tooltip>
</template>

高亮选中文本背景色

html
<template>
    <up-tooltip text="高亮选中文本背景色" :buttons="['扩展']" bgColor="#e3e4e6"></up-tooltip>
</template>

此页面源代码地址

页面源码地址


 github  gitee

API

Tooltip Props

参数说明类型默认值可选值
text需要显示的提示文字String/Number--
copyText点击复制按钮时,复制的文本,为空则使用text值String/Number--
size文本大小String/Number14-
color字体颜色String#606266-
bgColor弹出提示框时,文本的背景色Stringtransparent-
direction弹出提示的方向,top-上方,bottom-下方Stringtopbottom
zIndex弹出提示的z-index,nvue无效String/Number10071-
showCopy是否显示复制按钮Booleantruefalse
buttons扩展的按钮组Array--
overlay是否显示透明遮罩以防止触摸穿透Booleantruefalse
showToast是否显示复制成功或者失败的toastBooleantruefalse

Tooltip Events

事件名说明回调参数
click点击触发事件index,被点击按钮的索引

Copyright © 2017 10yun.com | 十云提供计算服务-IPV6 | ctocode组开发