Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ubrorg/confirm

Package Overview
Dependencies
Maintainers
10
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ubrorg/confirm

confirm

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
10
Weekly downloads
 
Created
Source

confirm

confirm

使用

在页面的 page.json 中配置:

{
  "usingComponents": {
    "confirm": "@ubrorg/confirm/lib/index"
  }
}

在页面的 page.axml 中直接使用:

<confirm />

给页面中的按钮添加事件如:

<!-- html -->
<button onTap="buttonConfirm">点击按钮</button>

<!-- js -->
import { confirm } from '@ubrorg/toast/lib/confirm';

 buttonConfirm() {
    confirm({
      content: '您本月的账单已出',
      buttonText: '我知道了',
      confirm: () => { console.log('点击了确认按钮') },
      cancel: () => { console.log('点击了取消按钮') },
      complete: () => { console.log('调用成功') },
    });
  }

配置

属性是否必传默认值解释类型
contentN' '弹窗的文本,content为提示文字string
confirmButtonTextN'确认'确认按钮上的提示文字string
cancelButtonTextN'取消'取消按钮上的提示文字string
completeN调用结束的回调函数function
confirmN点击确认按钮后的回调函数function
cancelN点击取消按钮后的回调函数function

开发

  1. yarn 或者 ayarn阿里内网)安装依赖
  2. 小程序 IDE 打开组件(下载地址

更多命令

  • miapp newbranch: 新建分支
  • miapp push: 提交代码
  • miapp prepub: 预发(发布 beta 版本)
  • miapp publish: 正式发布

FAQs

Package last updated on 20 Oct 2020

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