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

min-vue

v1.0.7

Published

### 1.0.7

Downloads

2

Readme

学习vue原理编写的基础功能

1.0.7

  • 新增checkbox支持
  • 新增:class 语法的支持

.color{
    color: red
}
.bc{
    background: blue
}

<span :class='{colorKey:"color", bcKey:"bc"}'>css</span>

colorKey:true,
bcKey:true

1.0.4

  • @click 支持参数传递
  • 取消默认接收event
  • 目前只能传递一个字符串类型参数
<span @click="onClick($event,'11')">计算</span>
1.0
  • 需要绑定的数据请挂载到 data
  • html 绑定到 v-value
  • input 绑定使用 v-module
  • 支持@click事件
  • 支持v-if

安装

浏览器导入

<script src='./minVue.min.js'></script>
npm || yarn
npm install minVue  
yarn minVue

使用

import minVue from 'min-vue'

const minVue = require('min-vue')
<ul id="app">
    <li class="product">
        单价
        <input type="number" class="number" v-module='num'>
        <span v-value='num'></span>
        数量
        <input type="number" class="number" v-module='num1'>
        <span v-value='num1'></span>
        单品总价
        <span class="total-price" v-value='num3'></span>
        <span @click="onClick">计算</span>
    </li>
    <li>
        <span v-if='li1'>1</span>
        <span @click='onChangeli1'>切换显示1</span>
    </li>
    <li>
        <span v-if='li2'>2</span>
        <span @click='onChangeli2'>切换显示2</span>
    </li>
</ul>

new minVue({
    el:'#app',
    data:function(){
        return {
            num:'',
            num1:'',
            num3:'',
            li1:true,
            li2:true
        }
    },
    created:function(){
        // console.log('初始化完成')
    },

    methods:{
        onClick:function(){
            this.data.num3 = this.data.num * this.data.num1
        },
        onChangeli1:function(){
            this.data.li1 = !this.data.li1
        },
        onChangeli2:function(){
            this.data.li2 = !this.data.li2
        }
    }
})