All Projects → lxljl → wx-tool

lxljl / wx-tool

Licence: MIT license
微信小程序工具类

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to wx-tool

Stdlib
✨ Standard library for JavaScript and Node.js. ✨
Stars: ✭ 2,749 (+8767.74%)
Mutual labels:  utils
lancet
A comprehensive, efficient, and reusable util function library of go.
Stars: ✭ 2,228 (+7087.1%)
Mutual labels:  utils
fileutils
Golang file system utils such as copy files and directories
Stars: ✭ 19 (-38.71%)
Mutual labels:  utils
Flutter commonapp
打造一款通用的AppUI结构,包括登录、注册等通用 UI 界面及各工具类和公共部分。
Stars: ✭ 227 (+632.26%)
Mutual labels:  utils
dt-utils
前端常用工具函数
Stars: ✭ 23 (-25.81%)
Mutual labels:  utils
fat ecto
Query mechanism for Ecto
Stars: ✭ 20 (-35.48%)
Mutual labels:  utils
Jsonapi Utils
Build JSON API-compliant APIs on Rails with no (or less) learning curve.
Stars: ✭ 191 (+516.13%)
Mutual labels:  utils
GoGPUtils
Enhance productivity and avoid to reinvent the wheel every time that you start a Go project
Stars: ✭ 29 (-6.45%)
Mutual labels:  utils
wxEditor
微信编辑器,微信排版,微信公众号编辑器, 微信素材,前后端已搭建完整,原UEditor(百度编辑器,PHP1.4.3版) 二次开发 (微信编辑器,微信公众号,图文发布在线编辑器) 。
Stars: ✭ 86 (+177.42%)
Mutual labels:  wx
PowerUp
⚡ Decompilation Tools and High Productivity Utilities ⚡
Stars: ✭ 1,526 (+4822.58%)
Mutual labels:  utils
Prosemirror Utils
⚒ Utils library for ProseMirror
Stars: ✭ 241 (+677.42%)
Mutual labels:  utils
Pandora
潘多拉的魔盒了解一下。
Stars: ✭ 248 (+700%)
Mutual labels:  utils
mina-touch
mina-touch,一个方便、轻量的小程序手势事件监听库
Stars: ✭ 112 (+261.29%)
Mutual labels:  wx
Bbo
bbo is a utility library of zero dependencies for javascript. 🍖🌭🍔
Stars: ✭ 227 (+632.26%)
Mutual labels:  utils
XinFramework
Android 快速开发框架 总结以往开发结合三方项目 不断更新
Stars: ✭ 21 (-32.26%)
Mutual labels:  utils
Goutil
💪 Helper Utils For The Go: string, array/slice, map, format, cli, env, filesystem, test and more. Go 的一些工具函数,格式化,特殊处理,常用信息获取等等
Stars: ✭ 205 (+561.29%)
Mutual labels:  utils
BaseToolsLibrary
Android通用适配器和常用的工具类
Stars: ✭ 24 (-22.58%)
Mutual labels:  utils
ramdu
Small utils set built around Ramda
Stars: ✭ 18 (-41.94%)
Mutual labels:  utils
relay-helpers
Helpers to simplify and enhance Relay (https://facebook.github.io/relay/)
Stars: ✭ 19 (-38.71%)
Mutual labels:  utils
face-login-wx
人脸识别登录微信小程序
Stars: ✭ 77 (+148.39%)
Mutual labels:  wx

wx-tool

微信小程序工具类集合,有效提高开发时间和效率!

另推荐云函数合集模板

重要:版本要求

  1. 小程序基础库版本 2.2.3 或以上
  2. 开发者工具 1.02.1808300 或以上开始,小程序支持使用 npm 安装第三方包。

使用微信开发者工具打开此项目,然后在项目根目录下运行:

npm install --production

安装好依赖包之后,点击工具顶部菜单栏的详情:

image

勾选“使用 npm 模块”选项:

image

最后点击开发者工具中的菜单栏:工具 --> 构建 npm 即可运行。

image

1.快速开始

    $ npm i wx-tool --save

2.按需引入

    var {
        showModal
    } = require('wx-tool')

3.使用例子

属性 类型 默认值 必填 说明
title string 提示的标题
content string 提示的内容
showCancel string true 是否显示取消按钮
cancelText string 取消 取消按钮的文字,默认为"取消",最多 4 个字符
cancelColor string #000000 取消按钮的文字颜色,默认为"#000000"
confirmText string 确定 确定按钮的文字,默认为"确定",最多 4 个字符
confirmColor string #00aaff 确定按钮的文字颜色,默认为"#00aaff"
    // 等同于 wx.showModal
    // 返回Promise
    showModal({
        title: `提示`,
        content: '支付成功',
        showCancel: false
    }).then((res)=>{
        console.log(res)
    })


    // 也可以使用 async/await
    async test(){
        try {
            let {
                confirm
            } = await showModal({
                title: '提示',
                content: `是否确认收货?`
            })
            if(confirm) {
                // 用户点击确认


                //你的代码....
            }
        } catch (error) {
            console.log(error)
        }
    }

API

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].