Giter Club home page Giter Club logo

tip's Introduction

Tip 基础提示框


spm package 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点钟的箭头位置
    });
});

其他用法请参见演示

tip's People

Contributors

afc163 avatar lizzie avatar popomore avatar sorrycc avatar lepture avatar lianqin7 avatar

Watchers

honger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.