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-el-table-api

v1.0.4

Published

基于element或常用api封装

Downloads

13

Readme

VUE elementUI table 常用API

安装:

npm i vue-el-table-api

由于部分方法使用到axios
请安装axios
    npm install axios

使用:

import { utility, requestUtility } from 'vue-el-table-api'
例子:utility.checkAll(arr,['id']).id

API方法:

utility对象:

checkAll 全选后数据提取
  // 封装elementUi table全选后数据提取
  /*
    params 需要操作的数组
    keyArr 需要转换的字段 ['id','memberNumber']
    symbol 需要切换的字符 默认为,号
    使用 checkAll(arr,['id','memberNumber']).id     结果1,2,3,4
   */
   使用例子:let obj = utility.checkAll(arr,['id','name'],',')
            obj.id   结果'1,2,3,4'
            obj.name  结果'陈,王,李,林'
            
monthPackaging 自定义时间选择,一般用于elementUI月份选择
   /*
     status:0或1
        0代表当前时间的前面
        1代表当前时间的后面
     day: 7  默认为30
     例子:monthPackaging(0, 7)   意思为7天前
     例子:monthPackaging(1, 7)   意思为7天后
   */
   
kilobitTransition 单个值千位符转换
   /*
     level:为数据值 如30000或'300000'
     status:1  1代表是带两位小数点,其它即是不带小数点
     例子:kilobitTransition(30000, 1)   结果¥30,000.00
   */
   
multiKilobitTransition 转换数据中有多个值的,如1000,2000
   /*
     level:为数据值 如1000,2000
     例子:multiKilobitTransition('1000,2000')   结果¥1,000.00,¥2,000.00
   */
   
infoDesensitization 信息脱敏
   /*
     支持数据:身份证、手机号码、银行卡号
     例子:infoDesensitization('15360458815')   结果153****8815
   */
   
持续更新...

requestUtility对象:

batchPostExport  数据批量导出 - post
   /*
     参数:
     params:{
               url:'', //导出请求链接
               obj:{}, //导出请求参数
               fileName: '会员列表'  //导出文件名
             }
     suffix:文件后缀  默认为'xlsx'
     例子:batchPostExport(params,'xls')
   */
如需帮助 vx:czl630964