Giter VIP home page Giter VIP logo

qduld / el-table-next Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jackluson/el-table-next

0.0 0.0 0.0 2.18 MB

A Simple and Friendly Vue Table Component based on el-table of Element Plus(基于 Element-plus Table 封装的易用, 一致, 友好的 Vue Table 组件)

Home Page: https://el-table-next.vercel.app/

License: MIT License

Shell 0.41% JavaScript 1.14% TypeScript 20.35% CSS 8.70% HTML 0.34% Vue 69.05%

el-table-next's Introduction

ElTableNext

A Simple and Friendly Vue Table Component based on el-table of Element Plus(基于 Element-plus Table 封装的易用, 一致, 友好的 Vue Table 组件)

Why

Developers who have used Element UI Table know that el-table-column needs to be configured when using the Table component. It is mixed with template of html. If there are many columns, you need to write the configuration one by one, otherwise you need to use a for loop , such an experience is extremely unfriendly to developers. If it is a dynamic el-table-column, the experience is even worse, so El-Table-Next is encapsulated to configure the column structure based on JSON, and ElTableNext has more friendly code intellisense features. (用过 Element UI Table 的朋友都知道用 Table 组件时需要用到el-table-column,它是和 html 混写在一起的, 如果很多列的话,就需要一个个写配置, 否则需要用循环, 这样的体验对开发者极为不友好。 如果是动态的el-table-column的话体验就更差了, 因此封装了El-Table-Next基于 JSON 去配置列结构, 此外 ElTableNext 还有更加友好的代码提示特点。)

Basic Usage
<template>
  <el-table-next :column="column" :data="tableData" />
</template>
<script setup lang="ts">
import type { ElTableColumnProps } from 'el-table-next';
/* 引入ElTableColumnProps定义column可获得类型提示 */
const column: ElTableColumnProps[] = [
  {
    type: 'index',
    width: '60px',
    label: '序号',
  },
  {
    prop: 'name',
    label: '名字',
  },
  {
    prop: 'date',
    label: '日期',
  },
  {
    prop: 'address',
    label: '地址',
  },
];
const tableData = [
  {
    date: '2016-05-02',
    name: '佘太君',
    address: '上海市普陀区金沙江路 1516 弄',
  },
  {
    date: '2016-05-04',
    name: '王小虎',
    address: '上海市普陀区金沙江路 1517 弄',
  },
  {
    date: '2016-05-01',
    name: '王小帅',
    address: '上海市普陀区金沙江路 1519 弄',
  },
  {
    date: '2016-05-03',
    name: '王小呆',
    address: '上海市普陀区金沙江路 1516 弄',
  },
];
</script>
More Friendly Code IntelliSense

Installation

$ npm install el-table-next --save
$ yarn add el-table-next

Documentation

See: https://el-table-next.vercel.app/

Thanks

Thanks you star

el-table-next's People

Contributors

jackluson avatar renovate-bot 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.