npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-message-yanxing

v0.1.2

Published

这是颜星写的基于vue的消息插件

Downloads

2

Readme

m-message

颜星做的基于 Vue 的信息提示插件。

import Vue from 'vue'
import App from './App.vue'
import Message from 'vue-message-yanxing'
import 'vue-message-yanxing/lib/vue-message-yanxing.css'

// will mount `Vue.prototype.$message`
Vue.use(Message) 
// or
// will mount `Vue.prototype.$msg`
// Vue.use(Message, { name: 'msg' }) 

// 在vue实例中使用
const app = new Vue({
  render: h => h(App),
  data () {
    return {
     
    }
  },
  mounted () {
    setTimeout(() => {
      this.$message({
        title: 'Hi !',
        message: 'Welcome to use this plug-in !',
        iconImg: 'https://img1.baidu.com/it/u=2251659035,1886525937&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=1000',
        duration: -1
      })
    }, 2000)
  }
}).$mount('#app')

window.app = app

Message API

  • Message(options) 显示信息
  • Message.info(msg | options) 普通信息
  • Message.success(msg | options) 成功信息
  • Message.error(msg | options) 错误信息
  • Message.warning(msg | options) 警告信息
  • Message.loading(msg | options) 加载信息
  • Message.closeAll() 清空所有消息
  • Message.globals.options[key] = [value] 全局默认设置,请看 options

options

| 参数 | 说明 | 类型 | 可选值 | 默认值 | |---------- |-------- |---------- |------------- |-------- | | options | 消息配置对象 | object | — | — | | options.type | 消息类型 | string | 'info', 'success', 'error', 'warning', 'loading' | info | | options.title | 消息标题 | string | — | '' | | options.message | 消息内容 | string | — | '' | | options.collapsable | 是否可折叠 | boolean | — | true | | options.isCollapsed | 是否折叠消息内容 | boolean | — | false | | options.width | 消息块宽度,默认自动宽 | string | — | '' | | options.showClose | 显示close按钮 | boolean | false/true | false | | options.className | 消息块类名 | string | — | — | | options.wrapperClassName | 包裹层类名 | string | — | — | | options.supportHTML | 消息内容是否支持html | boolean | — | false | | options.onClose | 关闭回调 | function | — | — | | options.duration | 消息显示时长,单位ms;-1时不会自定关闭 | number | — | 3000 | | options.zIndex | 堆叠顺序 | number | — | 1010 | | options.iconImg | 图片图标url | string | — | — | | options.hasMask | 是否含有遮罩层 | boolean | — | false | | options.position | 消息展示位置 | string | 'top-left', 'top-center', 'top-right', 'center', 'bottom-left', 'bottom-center', 'bottom-right' |