Coder Social home page Coder Social logo

wxa-tooltip's Introduction

WXA-ToolTip

微信小程序-ToolTip信息提示组件

toolTip

导入

将ToolTip文件夹复制到pages文件夹内

使用

  • 在需要使用ToolTip的页面对应的.wxml文件中添加:
<import src="../ToolTip/toolTip.wxml"/>

<!-- 引入toolTip模板 -->
<template is="toolTip" data="{{_toolTip_}}"/>
  • 在需要使用ToolTip的页面对应的.wxss文件顶部添加:
@import "./ToolTip/toolTip.wxss";
  • 在.js中调用:
// 在顶部引入toolTip.js
var toolTip = require('../ToolTip/toolTip.js');

// 在onLoad中初始化toolTip
toolTip.init(this);

// 调用showToolTip显示提示信息,参数:
// type:类型包含'success'|'info'|'warn'|'error', 
// text:内容
// delay:延迟消失时间,不填不自动消失,只有success|info类型会自动消失
toolTip.showToolTip('success', '显示success提示', 2000);

wxa-tooltip's People

Contributors

v5kf avatar weizuichunsun avatar chyrain avatar

Watchers

James Cloos 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.