All Projects → helicopters → Wc Messagebox

helicopters / Wc Messagebox

基于 Vue 2.0 开发的 Alert, Toast, Confirm 插件, UI仿照 iOS 原生

Projects that are alternatives of or similar to Wc Messagebox

Sweetalert2
A beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies.
Stars: ✭ 13,929 (+6761.58%)
Mutual labels:  dialog, alert, toast, confirm
React Native Alert Pro
The Pro Version of React Native Alert (Android & iOS)
Stars: ✭ 69 (-66.01%)
Mutual labels:  dialog, modal, alert, confirm
Alertifyjs
A javascript framework for developing pretty browser dialogs and notifications.
Stars: ✭ 1,922 (+846.8%)
Mutual labels:  dialog, modal, alert, confirm
react-st-modal
Simple and flexible modal dialog component for React JS
Stars: ✭ 41 (-79.8%)
Mutual labels:  alert, modal, dialog, confirm
Jbox
jBox is a jQuery plugin that makes it easy to create customizable tooltips, modal windows, image galleries and more.
Stars: ✭ 1,251 (+516.26%)
Mutual labels:  dialog, modal, alert, confirm
vue2-dialog
A mobile Vue plugin for VueDialog
Stars: ✭ 21 (-89.66%)
Mutual labels:  alert, dialog, toast, confirm
Jh flutter demo
a flutter demo
Stars: ✭ 229 (+12.81%)
Mutual labels:  wechat, dialog, alert, toast
jquery.dialog.js
A lightweight replacement for the browser's default dialog boxes.
Stars: ✭ 17 (-91.63%)
Mutual labels:  alert, modal, dialog, confirm
Razor.SweetAlert2
A Razor class library for interacting with SweetAlert2
Stars: ✭ 98 (-51.72%)
Mutual labels:  alert, dialog, toast, confirm
Jquery Confirm
A multipurpose plugin for alert, confirm & dialog, with extended features.
Stars: ✭ 1,776 (+774.88%)
Mutual labels:  dialog, alert, confirm
Popmodal
jquery plugin for showing tooltips, titles, modal dialogs and etc
Stars: ✭ 149 (-26.6%)
Mutual labels:  dialog, modal, confirm
Alerttoast
Create Apple-like alerts & toasts using SwiftUI
Stars: ✭ 151 (-25.62%)
Mutual labels:  dialog, alert, toast
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+2939.41%)
Mutual labels:  alert, toast, confirm
Sweetalert
A beautiful replacement for JavaScript's "alert"
Stars: ✭ 21,871 (+10673.89%)
Mutual labels:  dialog, modal, alert
Ngx Sweetalert2
Declarative, reactive, and template-driven SweetAlert2 integration for Angular
Stars: ✭ 503 (+147.78%)
Mutual labels:  dialog, modal, alert
Notiflix
Notiflix is a JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
Stars: ✭ 172 (-15.27%)
Mutual labels:  alert, toast, confirm
React Cool Portal
😎 🍒 React hook for Portals, which renders modals, dropdowns, tooltips etc. to <body> or else.
Stars: ✭ 458 (+125.62%)
Mutual labels:  dialog, modal, toast
Layer
丰富多样的 Web 弹出层组件,可轻松实现 Alert/Confirm/Prompt/ 普通提示/页面区块/iframe/tips等等几乎所有的弹出交互。目前已成为最多人使用的弹层解决方案
Stars: ✭ 8,202 (+3940.39%)
Mutual labels:  dialog, alert, confirm
Smalltalk
Promise-based Alert, Confirm and Prompt replacement
Stars: ✭ 76 (-62.56%)
Mutual labels:  modal, alert, confirm
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (-50.74%)
Mutual labels:  dialog, modal, alert

wc-messagebox

  • 基于 vue 2.x 开发的弹窗插件
  • 包含 Alert, Confirm, Toast
  • 支持用户自定义 Alert, Confirm 组件.
  • iOS样式来源: (MUI)

说明

  • 新版和旧版在参数传递上面有所区别. 如果是因为升级出现问题可以尝试回退到旧版, 详见旧版文档.

效果

效果

Install

npm i wc-messagebox --save

Quick Start

import {Alert, Confirm, Toast, Loading} from 'wc-messagebox'
import 'wc-messagebox/style.css'
Vue.use(Alert)
Vue.use(Confirm)
Vue.use(Toast, duration)
Vue.use(Loading)

Usage

// alert
this.$alert('这里是内容')  // 如果传递一个字符串给 this.$alert, 则 标题默认为 '提示', 按钮默认为 '确定'

如果参数为对象, 则可接受如下配置选项:
title: '这里是标题',
content: '这里是内容',
btnText: '这里是按钮',
component: Component // 用于用户自行指明 Alert 组件

比如:
this.$alert({
  title: '我是标题',
  content: '我是内容'
})


// confirm
this.$confirm('这里是内容');

如果参数为对象, 则可接受如下配置选项:
title: '这里是标题',
content: '这里是内容',
yesStyle: {}, // 设置左边按钮样式
yesText: '',  // 左边按钮文本,
noStyle: {},  // 设置右边按钮样式,
noText: '',   // 设置右边按钮文本
component: Component // 可不设置, 适用于用户自定义组件.

比如:
this.$confirm({
  title: '我是标题',
  content: '我是内容',
  yesText: '你好'
})

// toast
this.$toast(text, {
    durtaion: 200,
    location: 'bottom|center|top' // 默认在中间
});

// toast 的图文混合模式
this.$toast(text, {
  path: path,
  location: 'center',
  toastStyle: {
    height: '100px',
    width: '100px'
  },
  imgStyle: {
    width: '40px',
    marginBottom: '15px'
  }
})


// loading
this.$loading.show('自定义文字'); //显示
this.$loading.hide(); //隐藏

用户自定义弹窗样式

经常一些情况下, iOS的弹窗样式可能满足不了你. 比如你需要微信的弹窗样式. 更一些时候, 可能用户需要自定义弹窗样式, 比如设计师给出了一套符合项目的弹窗样式. 此时如何操作?

  1. 引入下面语句
import D from 'wc-messagebox';
Vue.use(D);
  1. 将根目录下面的 wechat-messagebox 拷贝到本地.

  2. 引入 wechat-messagebox

import wxAlert from 'yourpath/wechat-messagebox/Alert'
import wxConfirm from 'yourpath/wechat-messagebox/Confirm'
  1. 配置
Vue.use(Alert, {
  component: wxAlert
});

Vue.use(Confirm, {
  component: wxConfirm
})
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].