• Stars
    star
    116
  • Rank 303,894 (Top 6 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

a clean and simple notification component by vue.js

vue-yummy-notie

a clean and simple notification component for vue.js. Deeply inspired by Notie.js. Demo

preview

Upgrade to Vue 2.3+

I changed those files (build folder and config folder) related to the new vue-cli template, and Notification.vue、main.js、index.html files changed related to the Upgrade Guide, see Migration from Vue 1.x.

How to use

Components are one of the most powerful features of Vue.js. Yummy notie is a component which can help you to alert users. Since it is a component instead of a plugin, all you need to do is import the module and pass options with props or vuex.

Installation

The sample was set up by vue-cli's webpack template. You need to import Notification.vue in the component folder into your project. Then you can regist it and use it in the HTML template.

<template>
  <notification
  :options.sync="options"
  :show.sync="showNotification"></notification>
</template>

<script>
import Notification from './components/Notification'

export default {
  components: { Notification },
  data () {
    return {
      showNotification: false,
      options: {}
    }
  }
}
</script>

Make a notice

We need to pass two data into Notification.vue with props or vuex. Data 'show' controls the display of the notice. You need to set show = trueto init a notice, and also pass the content you want to show by setting 'options'.

options

options: {
  autoClose: true,
  backgroundColor: '#769FCD',
  barColor: '#415f77',
  countdownBar: true,
  content: 'The content of the notification.',
  showTime: 5000,
  textColor: '#fff'
}

More Repositories

1

dewhale

GitHub-Powered AI for effortless development. Start as an open-source alternative to v0.dev.
JavaScript
1,222
star
2

syncit

a privacy-first co-browsing tool
CSS
319
star
3

vue-type-check

a type checker for typescript written Vue components
TypeScript
96
star
4

relia

Find the Best LLM for Your Needs through E2E Testing
TypeScript
76
star
5

vue-loadmore-demo

inspired by lavalamp.js and rebuild in vue.js
JavaScript
74
star
6

koala-oss-app

Koala 聊开源频道 App
TypeScript
55
star
7

hackathons

代码 Hackathon、赛事、活动信息收集
48
star
8

vue-examples

vue-examples-collections
Vue
47
star
9

icomoon-cli

Unoffical automatic tool for your icomoon project
JavaScript
21
star
10

picojs-rust-wasm

This project is a Rust webassembly implementation of picojs.
Rust
20
star
11

agora-interviewer

JavaScript
7
star
12

vuelize

vue.js visualization modules
JavaScript
4
star
13

smart-cache

Cache invalidation tools for apollo-client's in-memory-cache.
TypeScript
3
star
14

sunmao-ui-threejs-runtime

TypeScript
3
star
15

cloudtower-go-sdk

generated from operation API
2
star
16

project-r

TypeScript
2
star
17

terraform-provider-cloudtower

Go
1
star
18

Hire

Find and hire talent programmer on Github.
CSS
1
star
19

lobe-chat-mindmap-plugin

TypeScript
1
star
20

markmap-renderer

TypeScript
1
star
21

Legion-Artifact-Calculator

Inspired by wowdb
JavaScript
1
star
22

web-ui-test-book

1
star
23

storyteller-website

storyteller website repo
HTML
1
star
24

blog

HTML
1
star
25

FunUI

A light UI library contains some popular UI functions.
HTML
1
star
26

dot-game-mobile

html5 game for blizzcon
CSS
1
star
27

warcraft-movie

just wow!
JavaScript
1
star
28

SVG-Maker

svg+wechat
HTML
1
star