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

@arni/vue-layernative

v1.0.4

Published

vue-layernative

Downloads

7

Readme

layernative

简单的vue弹框插件

npm包名: @arni/vue-layernative

demo地址:<https://sherrywanna.github.io/layernative/examples/index.html

简单使用:
安装: 根目录下执行 npm install
环境: npm run server (开发环境)
webpack没有打开open开关所以不会自动打开浏览器,具体页面访问本地服务器http://localhost:8080/examples/index.html。
使用语法:
interface BtnItem {
	word: string,           	// 按钮文字
    callback(): void;       	// Function 点击按钮回调函数
    callbackHidden: boolean     // boolean 点击按钮后弹框是否会消失
}

interface Render {
  	title: string,            // 弹框标题
    content: string,          // 弹框内容
    btn: BtnItem[]            // Array 按钮数组
}

/**
 * @param {string} className 给弹框最外层div添加的class属性
 */
this.$layernative.alert(render: Render, className: string);
例子:
var Vue = require('vue');
import layernative from '@arni/vue-layernative';
Vue.use(layernative);

// eg.普通弹窗
this.$layernative.alert({
    title: '标题',
    content: '内容',
    btn: [{
        word: '按钮文字',
        callback: () => {
            console.log('回调函数');
        },
        callbackHidden: ture
    }]
}, 'layer-tips');

// eg.toast
this.$layernative.toast('toast');

// eg.tips
this.$layernative.tips('tips')

兼容

兼容至es2015

版本更新

  • 1.0.4
    • 添加 toast 方法和 tips 方法
    • 添加 scoped 控制样式
  • 1.0.3 - deprecate
    • "Unable to use, dist generated is a test version"
  • 1.0.2
    • webpack导出umd格式
    • 添加uglify压缩js
  • 1.0.1
    • 添加弹框内content滑动事件,阻止除了content以外的弹框内容滑动事件
    • 添加content内的插槽
  • 1.0.0