All Projects → FEMessage → El Data Table

FEMessage / El Data Table

Licence: mit
🥘Base on element-ui, makes crud easily

Projects that are alternatives of or similar to El Data Table

Vuetify Admin Dashboard
A Crud Admin panel made from Vue js and Vuetify
Stars: ✭ 481 (+34.36%)
Mutual labels:  crud, table
Avue
Avue.js2.0是基于现有的element-ui库进行的二次封装,简化一些繁琐的操作,核心理念为数据驱动视图,主要的组件库针对table表格和form表单场景,同时衍生出更多企业常用的组件,达到高复用,容易维护和扩展的框架,同时内置了丰富了数据展示组件,让开发变得更加容易
Stars: ✭ 1,789 (+399.72%)
Mutual labels:  crud, element-ui
Egrid
对 element-ui table 组件的封装
Stars: ✭ 175 (-51.12%)
Mutual labels:  table, element-ui
agel-table
element-ui table 的二次封装,保持灵活性,极简的思想,更少的代码,更多的功能,更快速的开发 ⬆⬆⬆
Stars: ✭ 26 (-92.74%)
Mutual labels:  table, element-ui
vue-willtable
An editable table component for Vue.js 2.0
Stars: ✭ 119 (-66.76%)
Mutual labels:  table, element-ui
element-table
An extended table to integration with bootstrap-table and element-ui.
Stars: ✭ 18 (-94.97%)
Mutual labels:  table, element-ui
Cool Admin Vue
cool-admin一个很酷的后台权限管理框架,模块化、插件化、CRUD极速开发,永久开源免费,基于midway.js 2.0、typeorm、mysql、jwt、element-ui、vuex、vue-router、vue等构建
Stars: ✭ 73 (-79.61%)
Mutual labels:  crud, element-ui
E-Table
基于ElementUI table组件修改,数据化表格结构,添加实用功能,快速生成表格
Stars: ✭ 65 (-81.84%)
Mutual labels:  table, element-ui
vue-elementui-freedomen
elementui 应用级框架
Stars: ✭ 27 (-92.46%)
Mutual labels:  table, element-ui
hoc-element-table
📦 A Vue 3.x Table Component built on Webpack 5
Stars: ✭ 26 (-92.74%)
Mutual labels:  table, element-ui
Grid.blazor
Grid component with CRUD for Blazor (client-side and server-side) and ASP.NET Core MVC
Stars: ✭ 335 (-6.42%)
Mutual labels:  crud, table
Youlai Mall
youlai-mall 是基于Spring Boot 2.4、Spring Cloud 2020 & Alibaba、Vue、element-ui、uni-app快速构建的一套全栈开源商城平台,包括系统权限管理、微服务应用、微信小程序及APP应用
Stars: ✭ 331 (-7.54%)
Mutual labels:  element-ui
Vue Form Builder
Build powerful vue form with JSON schema and composition api.
Stars: ✭ 325 (-9.22%)
Mutual labels:  element-ui
Graphback
Graphback - Out of the box GraphQL server and client
Stars: ✭ 323 (-9.78%)
Mutual labels:  crud
Sc Crud Sample
Sample real-time CRUD inventory tracking app built with SocketCluster
Stars: ✭ 323 (-9.78%)
Mutual labels:  crud
Reactable
Interactive data tables for R
Stars: ✭ 345 (-3.63%)
Mutual labels:  table
Ui
Low-code Framework for Web Apps in PHP
Stars: ✭ 335 (-6.42%)
Mutual labels:  crud
Nuxt Ssr
✨vue+nuxt+sass+node+express+MongoDB 实现的SSR项目。
Stars: ✭ 323 (-9.78%)
Mutual labels:  element-ui
Flask Appbuilder
Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
Stars: ✭ 3,603 (+906.42%)
Mutual labels:  crud
Vue Store
基于Vue+Vue-Router+Vuex+Element-ui+axios,参考小米商城,实现的电商项目。
Stars: ✭ 308 (-13.97%)
Mutual labels:  element-ui

el-data-table

Build Status NPM Download NPM Version NPM License PRs Welcome Automated Release Notes by gren

Auto requesting by axios, supports pagination, tree data structure, custom search, custom operation column, which makes rest api easily👏

The table uses @femessage/el-form-renderer to render form.

中文文档

Table of Contents

Introduction

CRUD

el-data-table is created to solve business problems, so CRUD logic is set inside.
For example, to develop user api, suppose its relative path like this:

/api/v1/users

The restful CRUD api should be:

  • Retrieve
GET /api/v1/users?page=1&size=10

default data structure

{
  "code":0,
  "msg":"ok",
  "payload":{
    "content":[], // dataPath
    "totalElements":2, // totalPath
  }
}

You can customize dataPath/totalPath.

If hasPagination=false, default dataPath is payload

  • Create
POST / api / v1 / users
  • Update
PUT /api/v1/users/:id
  • Delete
DELETE /api/v1/users/:id

Then only need to use the following code to complete CRUD functions

<template>
  <el-data-table v-bind="tableConfig"></el-data-table>
</template>
<script>
export default {
  data() {
    return {
      tableConfig: {
        url: '/example/users',
        columns: [
          {
            prop: 'name',
            label: '用户名'
          }
        ],
        searchForm: [
          {
            type: 'input',
            id: 'name',
            label: '用户名',
            el: {
              placeholder: '请输入'
            }
          }
        ],
        form: [
          {
            type: 'input',
            id: 'name',
            label: '用户名',
            el: {
              placeholder: '请输入'
            },
            rules: [
              {
                required: true,
                message: '请输入用户名',
                trigger: 'blur'
              }
            ]
          }
        ]
      }
    }
  }
}
</script>

The results are as follows:

  • Retrieve

  • Create

  • Update

  • Delete

⬆Back to Top

Data Driven

Moving the content of the template to the script means that the template can be reduced and js can be extracted to another file to reuse. At the same time, the data in js is actually a piece of json, this means code generation tool can help.



9.jpeg

⬆Back to Top

Why

Why do you create el-data-table based on el-table of element-ui?

I often hear the following sounds:

  1. el-table can cover most scenarios without extended requirements
  2. wrap up so many things, it's heavy and high coupling
  3. bound with too many business logic, it's not flexible; business logic should handle by developers

First of all, I have to say, el-table is really flexible, but when implementing paging requests, only el-table is not enough, and the el-pagination component needs to be combined. Most of the content of paging processing is repeated. Without a high level business component, we get duplicate code everywhere.

In fact, in the admin or dashboard web app, there are many CRUD operations, using restful API. It is possible to use only one url to make a component to complete CRUD functions.

Secondly, many experienced developers think that components are the more flexible the better.

However, for the "newbees" who lack of experience, they are not familiar with common business scenarios. Some basic operations, like form validation, space filtering, adding loading, exception handling, they may forget, which result in bugs.

For front-line business developers, in the face of endless developing task, in fact, they don't want to deal with repeated business logic. they just want to free their hands and get off work early.

In such situation, el-data-table was born.

⬆Back to Top

Feature

  • Use configuration to call restful api to complete CRUD functions
  • Support table display tree structure data
  • Bound with pagination logic
  • Support custom column buttons, and custom operation functions
  • Support saving query on url, which can resotre search status after history.go(-1) or location.reload()

⬆Back to Top

Links

⬆ Back to Top

Install

Encourage using Yarn to install

yarn add @femessage/el-data-table

⬆Back to Top

Quick Start

Global Register Component

This is for minification reason: in this way building your app, webpack or other bundler just bundle the dependencies into one vendor for all pages which using this component, instead of one vendor for one page

import Vue from 'vue'
// register component and loading directive
import ElDataTable from '@femessage/el-data-table'
import ElFormRenderer from '@femessage/el-form-renderer'
import {
  Button,
  Dialog,
  Form,
  FormItem,
  Loading,
  Pagination,
  Table,
  TableColumn,
  Message,
  MessageBox
} from 'element-ui'
Vue.use(Button)
Vue.use(Dialog)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Loading.directive)
Vue.use(Pagination)
Vue.use(Table)
Vue.use(TableColumn)
Vue.component('el-form-renderer', ElFormRenderer)
Vue.component('el-data-table', ElDataTable)
// to show confirm before delete
Vue.prototype.$confirm = MessageBox.confirm
// show tips
Vue.prototype.$message = Message
// if the table component cannot access `this.$axios`, it cannot send request
import axios from 'axios'
Vue.prototype.$axios = axios

Template

<template>
  <el-data-table></el-data-table>
</template>

⬆Back to Top

Reference

⬆Back to Top

Contributing

For those who are interested in contributing to this project, such as:

  • report a bug
  • request new feature
  • fix a bug
  • implement a new feature

Please refer to our contributing guide.

⬆ Back to Top

Contributors

Thanks goes to these wonderful people (emoji key):


levy

💻 👀 📖 🚇 🤔

Donald Shen

💻 ⚠️ 📖

MiffyCooper

💻 📖

Huanfeng Chen

💻

EVILLT

💻 🐛

Alvin

💻 🐛

Han

💻 🐛 📖

kunzhijia

💻 🔧 💡

Edgar

💻 🐛

Barretem

💻

阿禹。

📖

lujunwei

💻

cjf

🐛 💻

Jack-rainbow

🐛

ColMugX

💻

snowlocked

💻 📖

Sponge

🐛 💻

4Ark

💻 📖

Htongbing

💻

PPPenny

💻

PopupDialog

🐛

Jogiter

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

⬆Back to Top

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].