Giter VIP home page Giter VIP logo

iview-filter-table's Introduction

iview-filter-table

一个基于iView Table 的带搜索过滤的Table组件, 支持 Input输入框 和 Select下拉框两种表格筛选方式.

filterTable.gif

使用

模板

    <filter-table @load="loadData" //过滤触发事件
                  :data="users"
                  :columns="tableColumns"
                  :search="search" //过滤的条件
                  >
    </filter-table>

列描述数据对象

        tableColumns: [
          {
            title: '用户名',
            key: 'username',
            filter: {
              type: 'Input' //输入框过滤
            }
          },
          {
            title: '状态',
            key: 'status',
            filter: {
              type: 'Select',//下拉框过滤
              option: userStatus //下拉框选项数据对象
            }
        ]

下拉框选项数据格式

  const userStatus = {
    0: {
      value: 0,
      name: '全部'
    },
    1: {
      value: 1,
      name: '已锁定',
      color: 'red'
    },
    2: {
      value: 2,
      name: '正常',
      color: 'green'
    },
  };

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

Github源码地址

iview-filter-table's People

Contributors

azhengyongqin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.