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

yf-element

v1.0.0

Published

A Vue.js project

Downloads

5

Readme

zhihuijingqu-web

A Vue.js project

文档


> 先 npm 下载插件

  npm i yf-element

> 然后你可以像使用普通组件一样使用 v-el-search

# 搜索框
<v-el-search :dataList="dataList" inline @submit="findBtn">
    <el-button slot="right" @click="addActivity">
        <span>+</span>
        添加活动
    </el-button>
</v-el-search>

文档

| 序号 | 参数 | 说明 | 类型 | 必填 | 可选值 | 默认值 | 补充 | | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | 1 | dataList | 数组 | Array | true | - | - | -| | 2 | reset | 是否有重置按钮 | Boolean | false | - | - | - | | 3 | loading | 加载状态 | Boolean | false | - | - | -| | 4 | btnRight | 查询按钮左浮动还是右浮动 | Boolean | false | - | - | - | | 5 | inline | 是否横向排练 | Boolean | false | - | - | - | | 6 | size | 按钮样式 | String | false | - | 'medium' | - | | 7 | @submit | 查询回调 | function | - | - | - | - | | 8 | @resetSub | 重置回调 | function | - | - | - | - |


| 序号 | 名字 | 说明 | 可选值 | | ---- | ---- | ---- | ---- | | 1 | type | 类型 | 'input、picker-date、picker-daterange、picker-daterange-two、select'| | 2 | label | - | - | | 3 | key | 返回给你的key | - | | 4 | value | value | - | | 5 | placeholder | - | - | | 6 | width | 宽度 | 如 200px | | 7 | options | 配置 | - |

dataList

dataList:[
{
    type: 'input',
    label: '订单号',
    key: 'orderNum',
    placeholder:'请输入订单号',
    value: ''
},
{
    type: 'picker-date',
    label: '开始日期',
    width:'300',
    key: 'createStartTime',
    value: '',
    options:{
        disabledDate: (time) => {
            return time.getTime() < Date.now() - 8.64e7*366;
        }
    }
},
{
    type: 'picker-date',
    label: '结束日期',
    width:'300',
    hidden:true,
    key: 'createEndTime',
    value: '',
    options:{
        disabledDate: (time) => {
            let startDateObj = new Date(this.form.createStartTime);
            return time.getTime() < startDateObj.getTime()  || time.getTime() < Date.now() - 8.64e7*366;
        }
    }
},
{
  type: 'picker-daterange-two',
  label: '时间段',
  key: 'daterange',
  value: '',
  options: {
      onPick: (obj) => {
          this.pickerMinDate = new Date(obj.minDate).getTime();
          if (obj.maxDate){
              this.pickerMinDate=null;
          }
      },
      disabledDate:(time)=> {
          if (this.pickerMinDate) {
              return time.getTime() < new Date(this.pickerMinDate).getTime() - 8.64e7 || time.getTime() < this.pickerMinDate ;
          }
      }
  }
},
{
    type: 'select',
    label: '分账状态',
    key: 'profitStatus',
    value: '',
    options:[{
        value: '',
        label: '全部'
        }, {
        value: 'success',
        label: '成功'
        }, {
        value: 'fail',
        label: '失败'
        }, {
        value: 'watting',
        label: '等待分账'
    }]
},
]


# 报表
<v-el-table :tableData="tableData" :tableColumn="tableColumn"></v-el-table>
     
tableData: [
  {
    id: '12987122',
    name: '王小虎0',
    amount1: '234',
    amount2: '3.2',
    amount3: 10
  }, {
    id: '12987123',
    name: '王小虎1',
    amount1: '165',
    amount2: '4.43',
    amount3: 12
  },
],
tableColumn:[
  {
    props:'id',
    label:'姓名',
    width:''
  },
  {
    props:'name',
    label:'数值',
    width:''
  }
],