MyGit

ElemeFE/element-react

Fork: 442 Star: 2838 (更新于 2024-11-04 08:52:01)

license: MIT

Language: JavaScript .

Element UI

最后发布版本: 1.4.33 ( 2019-03-02 12:11:14)

官方网址 GitHub网址

Element React

Element was initially written in Vue, which has many elegant UI components, but we also love React, so we forked it for the React community.

Getting Started

Install

npm install element-react --save

Before the building, you need a style theme, here we recommend you to pick up element-theme-default.

npm install element-theme-default --save

Usage

We are die hard fans of ECMAScript 6, so we recommend you writing code in modern javascript.

import { Button } from 'element-react';

Also we provide an advanced way to tree shaking the code with Rollup.js and Webpack 2

import { Button } from 'element-react/next';

Config

With webpack, you need additional loaders to build with element-react.

const webpack = require('webpack');

module.exports = {
  entry: {
    src: 'path/to/src'
  },
  output: {
    path: 'path/to/output'
    publicPath: '/public',
    chunkFilename: '[chunkhash:12].js',
    filename: '[chunkhash:12].js'
  },
  plugins: [
    new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }),
    new webpack.optimize.UglifyJsPlugin({
      output: {
        comments: false
      }
    })
  ],
  resolve: {
    extensions: ['.js', '.jsx']
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        loader: 'babel-loader',
        include: ['path/to/src']
      },
      {
        test: /\.css$/,
        loaders: ['style-loader', 'css-loader']
      },
      {
        test: /\.(ttf|eot|svg|woff|woff2)(\?.+)?$/,
        loader: 'file-loader?name=[hash:12].[ext]'
      }
    ]
  }
}

Contributing

Please make sure to read the Contributing Guide before making a pull request.

Acknowledgments

  • @doxiaodong for adding typescript ambient declarations.
  • @cuining for building the live code editor.

Credits

  • Element Desktop UI elements for Vue.js 2.0.

License

MIT

最近版本更新:(数据更新于 2024-09-15 08:39:50)

2019-03-02 12:11:14 1.4.33

2019-01-30 11:43:36 1.4.30

2018-12-20 12:50:54 1.4.26

2018-12-13 15:17:59 1.4.25

2018-10-29 14:35:17 1.4.24

2018-08-28 20:15:19 1.4.21

2018-06-25 16:50:45 1.4.20

2018-04-23 11:59:38 1.4.16

2018-04-09 16:14:17 1.4.12

2018-03-22 16:17:50 1.4.10

主题(topics):

css, element-ui, javascript, react, react-components, ui-design

ElemeFE/element-react同语言 JavaScript最近更新仓库

2024-11-21 23:03:24 bia-pain-bache/BPB-Worker-Panel

2024-11-21 22:46:48 MHSanaei/3x-ui

2024-11-21 07:00:59 nodejs/node

2024-11-21 00:49:46 FortAwesome/Font-Awesome

2024-11-18 14:26:02 projectdiscovery/nuclei-templates

2024-11-17 14:42:23 koodo-reader/koodo-reader