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

mouse-vue-module

v0.1.5

Published

1.install SDK using npm ``` npm install mouse-vue-module --save ``` 2.for example: ```js //main.js 执行 import install from 'mouse-vue-module' Vue.use(install); ``` ```js //列表 搜索、列表、分页封装 //搜索组件 input、select、date searchLst = [ { label:'名称:',//form

Downloads

4

Readme

Basic usage

1.install SDK using npm

npm install mouse-vue-module --save

2.for example:

//main.js 执行
import install  from 'mouse-vue-module'
Vue.use(install);
//列表 搜索、列表、分页封装
//搜索组件 input、select、date
searchLst = [
    {
      label:'名称:',//form表单 label参数
      model:'id',//v-model 参数
      type:'select',//搜索类型 'input','select','date'
      lst:[],//select 类型 必传
      name:'id',//搜索对应字段
      style:'',//搜索样式
      clearable:false,//清除
    },
    {
      label:'时间:',//form表单 label参数
      model: [startTime, endTime],//日期 默认时间
      type:'date',//日期类型
      name:'updateTimeList',//搜索对应字段
      style:'',//搜索样式
      clearable:false,//清除
    }
]
//搜索按钮 
searchBtns = [
  {
    isShow:true,//是否显示 权限配置
    name:'查 询',//按钮名称
    loading:false,//按钮loading
    style:'',//样式
    type:'search',//类型
    api:page,//接口 函数
  },
  {
    isShow:true,//是否显示 权限配置
    name:'导 出',//按钮名称
    loading:false,//按钮loading
    style:'',//样式
    type:'export',//类型
    api:exportFile //接口 函数
  },
],//搜索按钮
  //接口搜索条件
param = {
  id:1,
  updateTimeList:[startTime, endTime],
}
//按钮点击的回调 res 接口返回数据 o 哪一个按钮点击
btnClick(res,o){
  console.log(res,o);
}
//搜索框值、分页值改变
handleChange(val,attribute){
  this.param[attribute] = val;
}
<mouse-search
  :searchLst="searchLst"
  :btns="searchBtns"
  :param="param"
  @click="btnClick"
  ref="mouseSearch"
  @handleChange="handleChange" 
></mouse-search>
//table 分页
//table表头
tableHeader:[
  {
    type:'index',
    width:'50',
    label:'序号',
    prop:'',
    showOverflowTooltip:true,
  },
  {
    width:'150',
    label:'日期',
    prop:'date',
    showOverflowTooltip:true,
  },
  {
    width:'100',
    label:'操作',
    fixed:'right',
    operate:[
      {
        type: 'primary',
        underline: false,
        name: '查看',
        style: '',
        click: (row) => {
          console.log(row);
        }
      },
      {
        type: 'primary',
        underline: false,
        name: '查看',
        style: '',
        click: (row) => {
          console.log(row);
        }
      }
    ]
  },
  //搜索框值、分页值改变
  handleChange(val,attribute){
    this.param[attribute] = val;
  }

<mouse-table
    :loading="searchBtns[0].loading"//loading 搜索数据 searchBtns里搜索的值
    :headerCellStyle="{background:'#f5f8ff',color:'#333333'}"//headerCellStyle table 头部样式
    :height="height"//table高度
    :tableHeader="tableHeader"//table表头
    :tableList="tableList"//table数据
    :param="param"//搜索条件
    :totalPage="totalPage"//table数据总数
    @handleChange="handleChange">
</mouse-table>