Giter Site home page Giter Site logo

panjiachen / vue-element-admin Goto Github PK

View Code? Open in Web Editor NEW
86.4K 86.4K 30.3K 15.07 MB

:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin

License: MIT License

JavaScript 26.02% HTML 0.10% Vue 69.49% CSS 0.16% Handlebars 0.16% SCSS 4.08%
admin admin-dashboard admin-template axios dashboard desktop element element-ui i18n management-system mock tinymce vue vue-admin vue-cli vuex webpack webpack4 xlsx

vue-element-admin's Introduction

vue element-ui Build Status license GitHub release gitter donate

English | 简体中文 | 日本語 | Spanish

SPONSORED BY

Introduction

vue-element-admin is a production-ready front-end solution for admin interfaces. It is based on vue and uses the UI Toolkit element-ui.

vue-element-admin is based on the newest development stack of vue and it has a built-in i18n solution, typical templates for enterprise applications, and lots of awesome features. It helps you build large and complex Single-Page Applications. I believe whatever your needs are, this project will help you.

After the v4.1.0+ version, the default master branch will not support i18n. Please use i18n Branch, it will keep up with the master update

The current version is v4.0+ build on vue-cli. If you find a problem, please put issue. If you want to use the old version , you can switch branch to tag/3.11.0, it does not rely on vue-cli

This project does not support low version browsers (e.g. IE). Please add polyfill by yourself.

Preparation

You need to install node and git locally. The project is based on ES2015+, vue, vuex, vue-router, vue-cli , axios and element-ui, all request data is simulated using Mock.js. Understanding and learning this knowledge in advance will greatly help the use of this project.

Edit on CodeSandbox

Sponsors

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]

Akveo

Get Java backend for Vue admin with 20% discount for 39$ use coupon code SWB0RAZPZR1M

Flatlogic

Admin Dashboard Templates made with Vue, React and Angular.

Features

- Login / Logout

- Permission Authentication
  - Page permission
  - Directive permission
  - Permission configuration page
  - Two-step login

- Multi-environment build
  - Develop (dev)
  - sit
  - Stage Test (stage)
  - Production (prod)

- Global Features
  - I18n
  - Multiple dynamic themes
  - Dynamic sidebar (supports multi-level routing)
  - Dynamic breadcrumb
  - Tags-view (Tab page Support right-click operation)
  - Svg Sprite
  - Mock data
  - Screenfull
  - Responsive Sidebar

- Editor
  - Rich Text Editor
  - Markdown Editor
  - JSON Editor

- Excel
  - Export Excel
  - Upload Excel
  - Visualization Excel
  - Export zip

- Table
  - Dynamic Table
  - Drag And Drop Table
  - Inline Edit Table

- Error Page
  - 401
  - 404

- Components
  - Avatar Upload
  - Back To Top
  - Drag Dialog
  - Drag Select
  - Drag Kanban
  - Drag List
  - SplitPane
  - Dropzone
  - Sticky
  - CountTo

- Advanced Example
- Error Log
- Dashboard
- Guide Page
- ECharts
- Clipboard
- Markdown to html

Getting started

# clone the project
git clone https://github.com/PanJiaChen/vue-element-admin.git

# enter the project directory
cd vue-element-admin

# install dependency
npm install

# develop
npm run dev

This will automatically open http://localhost:9527

Build

# build for test environment
npm run build:stage

# build for production environment
npm run build:prod

Advanced

# preview the release environment effect
npm run preview

# preview the release environment effect + static resource analysis
npm run preview -- --report

# code format check
npm run lint

# code format check and auto fix
npm run lint -- --fix

Refer to Documentation for more information

Changelog

Detailed changes for each release are documented in the release notes.

Online Demo

Preview

Donate

If you find this project useful, you can buy author a glass of juice 🍹

donate

Paypal Me

Buy me a coffee

Browsers support

Modern browsers and Internet Explorer 10+.

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
IE10, IE11, Edge last 2 versions last 2 versions last 2 versions

License

MIT

Copyright (c) 2017-present PanJiaChen

vue-element-admin's People

Contributors

aisen60 avatar ansonhorse avatar cat7373 avatar dongsuo avatar echofly avatar frank10000 avatar godotg avatar happystory avatar itsccn avatar jiuwuxiaohun avatar leij1ang avatar liugq5713 avatar marxangels avatar mayunhai avatar mimimile avatar monkeycf avatar painnick avatar panjiachen avatar reuwi avatar ruochuan12 avatar spiritree avatar sunchenguang avatar tmpbook avatar tuandm avatar wyudong avatar xqbumu avatar yamelsenih avatar yugasun avatar yuntao1997 avatar zyszys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-element-admin's Issues

有一个小bug

左边收缩的时候,右边直接变为收缩后的大小,由于左边还有动画时间,会有突兀的感觉

node-sass 下载失败 解决方案

下载项目的时候run install时,node-sass下载失败后来我在项目根目录下添加了一个.npmrc

sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
registry=https://registry.npm.taobao.org

把node-sass的路径修改成淘宝的npm,就很顺利的可以在国内的网络环境下载了

readme in English?

Hi!

I so interested for this project, but I don't know Chinese languadge :(

Can you write the readme in English?
It would be great for whole Vue's community!

Regard, Alex.

401 unauthorized 情况下想刷新 token,再发起相同的请求,这样是否好?

我想改写 utils/fetch.js,让网路请求返回 401(unauthorized) 时,也就是用户 token 过期时,自动请求刷新 token,然后以新 token 发起上一次的请求。这样做是为了即延续 token 的有效性,又不让用户重新登录。但我不清楚这样做是否可行?刷新 token 之后发起相同的请求,怎样写不至于显得啰嗦?希望能得到指点,谢谢。

export default function _fetch(options) {
    return new Promise((resolve, reject) => {
        const instance = axios.create({
            baseURL: process.env.BASE_API,
            headers: {
                'X-Ivanka-Token': store.getters.token
            }
        });
        instance(options).then(response => {
            const res = response.data;

            // 401 unauthorized
            if (res.code === 401) {
                refreshToken().then(response => {
                    // 得到新 token
                    const token = response.data.token;

                    //
                    // 接下去如何以新 token 发起上一次的请求?
                    //
                }).catch(error => {
                    reject(error);
                })
                reject(res);
            }

            // everything's fine
            resolve(res);
        }).catch(error => {
            reject(error);
        });
    });
}

导出文件

如果后台返回的是文件流,应该如何做

路由配置页面index.js 中constantRouterMap 对象dashboard加入name配置报错

感谢作者提供这么好的一个例子,
请教一下,
我在src/router/index.js中的constantRouterMap 对象中 dashboard配置项,加入name属性,如下:

{
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    name: '首页',
    hidden: true,
    children: [{ path: 'dashboard',name:'dashboard ', component: dashboard }]
  }

不管name:xxx配置成什么值,都报错。
错误信息如下:

vue-router.esm.js:1304Uncaught (in promise) TypeError: Cannot assign to read only property 'path' of object '#<Object>'(…)

堆栈信息显示vue-router.esm.js,在下面代码报错

if (record) {
        location.path = fillParams(record.path, location.params, ("named route \"" + name + "\""));
        return _createRoute(record, location, redirectedFrom)
      }

我看其他的配置项有的都有name配置,百度,谷歌也不知道是哪里有问题?希望作者帮忙解答一下,谢谢。

windows 运行建议

依赖都安装了,node是7.9版本,执行npm run build:prod命令时,报错NODE_ENV不是内部或外部命令,sit同理。执行npm run dev的时候也报错,不支持es6...扩展符,看了下babelrc配置,好像也没啥问题,试了n次,去babel官网查了下也没有,这个问题有没有遇到过的~~(windows7系统)

bug提交

Sidebar.vue侧边导航栏收取时,移动鼠标到Sidebar上面sticky页面的蓝色导航条会在Sidebar菜单上面,阻挡了Sidebar显示,需要修改

//Layout.vue
.sidebar-wrapper {
            width: 180px;
            position: fixed;
            top: 0;
            bottom: 0;
            left: 0;
            z-index: 2; // 改成 z-index: 1001;
            overflow-x: hidden;
            transition: all .28s ease-out;
            @include scrollBar;
        }

建议弄一个vue-cli模板

如果直接上手开发的话要删除现有的页面,路由和vuex相关的东西,有点无从下手,希望弄个纯净点的模板工程.

cnpm run dev 时报错,跪求原因

> juicy@1.0.0 dev C:\Users\WY\vue-element-admin-master
> node build/dev-server.js

(node:4880) DeprecationWarning: loaderUtils.parseQuery() received a non-string v
alue which can be problematic, see https://github.com/webpack/loader-utils/issue
s/56
parseQuery() will be replaced with getOptions() in the next major version of loa
der-utils.

npm ERR! Windows_NT 6.1.7600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\WY\\AppData\\Roa
ming\\npm\\node_modules\\cnpm\\node_modules\\npm\\bin\\npm-cli.js" "--userconfig
=C:\\Users\\WY\\.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--regi
stry=https://registry.npm.taobao.org" "run" "dev"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! juicy@1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 3221225501
npm ERR!
npm ERR! Failed at the juicy@1.0.0 dev script 'node build/dev-server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the juicy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs juicy
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls juicy
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\WY\vue-element-admin-master\npm-debug.log

有问题请看这里!

  • 遇到问题首先在issue里面找找有没有类似的问题
  • 如果没有去查阅 文档wiki
  • 善用自己的搜索问题能力,去google搜搜有没有解决方案
  • 再没有你可以自己新建一个issue

windows平台运行npm install的依赖问题

你好。我把项目fork下来,然后在我的windows机器上运行npm install,发现如下错误:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

发现这个是platform相关依赖,这种依赖是否能有解决办法呢?能否通过config文件来配置platform环境?

侧边来收缩

收缩功能 用户体验不怎好,感觉固定方式比较好,展出方式有点别扭,个人看法。。。。

发布命令报错,提示 'NODE_ENV' 不是内部或外部命令,也不是可运行的程序

我这边安装成功之后,npm run dev没有任何问题。但在输入发布命令时报错,不论是npm run build:sit-preview还是npm run build:prod,都提示同一个错误:

'NODE_ENV' 不是内部或外部命令,也不是可运行的程序。

想问问这个是要需要在那里设置一下这个NODE_ENV吗?

平台是windows,node安装在c盘根目录,版本7.9。
注:windows下面,需要把.eslintrc.js下面的

'linebreak-style': 'error',

修改为

'linebreak-style': ['error','windows'],

否则run dev也会报错,会提示一堆如" Expected linebreaks to be 'LF' but found 'CRLF'"之类的错误。

background-image引用路径找不到

我在npm run dev的运行环境下,当我编写代码如下时:

...
<img src="../../assets/404.png" alt="404">
<div style="background-image: url(../../assets/404.png);"></div>
...

实际网页的代码为:

...
<img src="/static/img/404.a57b6f3.png" alt="404">
<div style="background-image: url(../../assets/404.png);"></div>
...

所以,img的图片路径可以显示图片,而div那个图片路径找不到。我猜这应该是webpack的问题,请问如何修改配置?谢谢。

markdown 编辑器页面有点小问题

markdown 编辑器页面有点小问题

刚刚在测试线上demo的时候,markdown的z-index 小于menu-nav的z-index,导致markdown一部分被menu-nav遮盖了

cnpm run dev 报错

! Failed at the [email protected] dev script 'node build/dev-server.js'.
! Make sure you have the latest version of node.js and npm installed.
! If you do, this is most likely a problem with the juicy package,
! not with npm itself.
! Tell the author that this fails on your system:
! node build/dev-server.js
! You can get information on how to open an issue for this project with:
! npm bugs juicy
! Or if that isn't available, you can get their info via:
! npm owner ls juicy
! There is likely additional logging output above.

! Please include the following file with any support request:
! D:\vue\vue-element-admin-master\npm-debug.log
cnpm run dev报了这个错误 ,我的npm和node是最新版本

账号登录和注销问题

在浏览器中,同时打开两个 tab,均登录到网站中。此时,在其中一个 tab 中注销登录,而另一个 tab 中可以正常切换路由,除非刷新页面才会自动退出到登录页面。

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.