All Projects → bajian → vue-toast

bajian / vue-toast

Licence: other
vue.js toast tips 提示文本 Vue1.0&2.0

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
Vue
7211 projects
HTML
75241 projects

Projects that are alternatives of or similar to vue-toast

vue-message
A prompt component based on vue2.0
Stars: ✭ 37 (+117.65%)
Mutual labels:  toast, vue-toast
mosha-vue-toastify
A light weight and fun Vue 3 toast or notification or snack bar or however you wanna call it library.
Stars: ✭ 185 (+988.24%)
Mutual labels:  toast, vue-toast
Vue Easy Toast
A Toast widget for Vue 1 & 2
Stars: ✭ 112 (+558.82%)
Mutual labels:  toast, vue2
vue2-dialog
A mobile Vue plugin for VueDialog
Stars: ✭ 21 (+23.53%)
Mutual labels:  toast, vue2
Vue Snotify
Vuejs 2 Notification Center
Stars: ✭ 755 (+4341.18%)
Mutual labels:  toast, vue2
Vue Toastr
Vuejs Toast : Plugin and Component Capability.
Stars: ✭ 93 (+447.06%)
Mutual labels:  toast, vue2
V Dialogs
A simple and clean instructional dialog plugin for Vue2, dialog type including Modal, Alert, Mask and Toast
Stars: ✭ 121 (+611.76%)
Mutual labels:  toast, vue2
Jh flutter demo
a flutter demo
Stars: ✭ 229 (+1247.06%)
Mutual labels:  toast
toaststrap
A simple, lightweight JavaScript library for showing Bootstrap 5 toast popups.
Stars: ✭ 16 (-5.88%)
Mutual labels:  toast
Toast Swift
Toast view using swift.
Stars: ✭ 228 (+1241.18%)
Mutual labels:  toast
Snackbar
A tiny browser library for showing a brief message at the bottom of the screen (1kB gzipped).
Stars: ✭ 224 (+1217.65%)
Mutual labels:  toast
Toasted Notes
simple, flexible toast notifications for react
Stars: ✭ 241 (+1317.65%)
Mutual labels:  toast
toppy
Overlay library for Angular 7+
Stars: ✭ 81 (+376.47%)
Mutual labels:  toast
Overlay support
a flutter toast and notification library
Stars: ✭ 232 (+1264.71%)
Mutual labels:  toast
flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 1,021 (+5905.88%)
Mutual labels:  toast
Toast
A go package for Windows 10 toast notifications
Stars: ✭ 225 (+1223.53%)
Mutual labels:  toast
fusion
An Easy-to-use Kotlin based Customizable Modules Collection with Material Layouts by BlackBeared.
Stars: ✭ 39 (+129.41%)
Mutual labels:  toast
toaster-android
A simple library to add custom toast to android applications.
Stars: ✭ 22 (+29.41%)
Mutual labels:  toast
simple-notify
Pure javascript toast notifications.
Stars: ✭ 108 (+535.29%)
Mutual labels:  toast
react-native-toastboard
Toast feedback messages for React Native
Stars: ✭ 24 (+41.18%)
Mutual labels:  toast

vue-toast

demo

live-demo

github

A Vue.js project

DEMO Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

How to install from code source

import Toast from './components/toast'

//change any config u like refer to the `toastDefaultOptions`,such as this one below:(可以在初始化的时候修改参数,参照下面的例子:)
// Toast.config({
//  // position:'top'
// })

Vue.use(Toast)

How to install from NPM

npm install vue-bajiantoast --save

install into Vue:
import Toast from 'vue-bajiantoast'
import 'vue-bajiantoast/dist/vue-bajiantoast.min.css'

Vue.use(Toast)

How to use

  methods:{
    success(){
      this.$toast.success('我是标题','大家好,我是内容O(∩_∩)O~~')
    },
    title(){
      this.$toast.success('我是标题')
    },
    config(){
      //1、这种形式只能修改一次,如果想修改参数用config()
      // this.$toast.show({
      //   icon:null,
      //   // title:'我是标题123',
      //   text:"我是内容 我没有左边的图标,我不能被关闭",
      //   showCloseBtn:false
      // })
      //2、 config():
      this.$toast.config({
        icon:null,
        showCloseBtn:false,
        position:'top'
      })
      this.$toast.error('我是标题','大家好,我是内容O(∩_∩)O~~')
      this.$toast.text('我是标题','大家好,我是内容O(∩_∩)O~~')
    },
    error(){
      this.$toast.error('我是标题','大家好,我是内容O(∩_∩)O~~')
    },
    info(){
      this.$toast.info('我是标题','大家好,我是内容O(∩_∩)O~~')
    },
    warn(){
      this.$toast.warn('我是标题','大家好,我是内容O(∩_∩)O~~')
    },
    text(){
      this.$toast.text('我是标题','大家好,我是内容O(∩_∩)O~~')
    },
  }

####options

//this is the dafault options (这是默认的参数) 
// var toastDefaultOptions = {
//     duration: 5000,
//     position: 'bottom',//top,bottom,center + left,right,center.such as 'top right' or 'bottom left'
//     type: 'default',
//     //filter of the same toast (避免重复提示)
//     distinct: false,
//     mobile: isMobile,
//     icon: toastDefaultIcon,
//     showCloseBtn: !isMobile,
//     //toast gap (toast的间距)
//     gap: 5
// };

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

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].