New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

arale-tip

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arale-tip

提示框组件,专注于带箭头的气泡框显示、隐藏、动画等交互功能。

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Tip 基础提示框


Build Status Coverage Status

提示框组件,专注于带箭头的气泡框显示、隐藏、动画等交互功能。 模块内部集成了模板和样式,无须单独引用样式,可以很方便地直接使用。

注:1.2.0 版本后 Tip 模块被原来的子模块 Atip 模块所替换。


Tip 模块继承自 popup,可使用包括 overlaywidgetbaseclasseventsattributeaspect 的属性和方法。

配置说明

trigger selector

触发点元素。

triggerType string

触发方式,[hover|click|focus]。

content string

提示内容,支持字符和 html 结构。

arrowPosition number

箭头位置,按钟表点位置,目前支持1、2、5、7、10、11点位置,默认 7 点钟。

图示

theme string

配色主题,内置黄色、蓝色和白色三种提示框样式 [yellow|blue|white],默认为 yellow

inViewport boolean

当弹出层显示在屏幕外时,是否自动转换浮层位置,默认为 false。

align object

参照 Overlay 的 align 配置, 指定此定位参数时,认为开发者要自定义提示框位置,此时 arrowPosition 属性失效。


最佳实践

seajs.use(['arale/tip/{{版本号}}/tip'], function(Tip) {
    new Tip({
        trigger: '#test',       // 触发器
        content: '我是内容',    // 提示框显示的内容
        arrowPosition: 11       // 11点钟的箭头位置
    });
});

其他用法请参见演示

Keywords

FAQs

Package last updated on 23 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc