A vue2.0 minimal admin template

Overview

vue-admin-template

English | 简体中文

A minimal vue admin template with Element UI & axios & iconfont & permission control & lint

Live demo: http://panjiachen.github.io/vue-admin-template

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

Build Setup

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

# enter the project directory
cd vue-admin-template

# install dependency
npm install

# develop
npm run dev

This will automatically open http://localhost:9528

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

Demo

demo

Extra

If you want router permission && generate menu by user roles , you can use this branch permission-control

For typescript version, you can use vue-typescript-admin-template (Credits: @Armour)

Related Project

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 license.

Copyright (c) 2017-present PanJiaChen

Comments
  • 重新整理一下4.0版本使用正式API无效问题

    重新整理一下4.0版本使用正式API无效问题

    最近做了一个新项目,页面和API都搞定了,但是联合调试的时候出现了问题,已经用2天时间去查询各种资料,包括基本读取本项目所有issues关于API的问题,发现目前并不特例,而回答方面并没有一个是正确的。

    1、在mian.js里持续注释掉的代码

    这个代码注释掉对项目有影响 所以直接注释掉进行开发 image

    2、在vue.config.js更换代理地址 无效 无论怎么配置

    image

    3、注释掉vue.config.js的本地 mock代码 在.env文件中修改请求地址

    image

    3号问题发送option请求以后会报错 image

    看调试没有继续发送post请求,没有找到前端什么地方给拦截了 和提问的开头说的一样,同样的接口,使用以前版本的项目直接登录成功,跨域配置很完善,所以问题应该是出在前端。

    要么是我配置错了,要么就是我配置了,要么就是我配置错了 。

    要么就是我技术差劲,所以有知道正确配置方式的大佬麻烦请告知一下新手。

    我真的尽力了,所以找不到正确解决方案也请见谅。

    我没有做一个伸手党,努力解决问题了,但是没有找到办法。

    opened by vueadmin 31
  • You may have an infinite update loop in a component render function.

    You may have an infinite update loop in a component render function.

    当我设置多层路由时, 设置 hidden: true 出现下面的报错

      {
        path: '/nested',
        component: Layout,
        redirect: '/nested/menu1',
        name: 'Nested',
        meta: {
          title: 'Nested',
          icon: 'nested'
        },
        children: [
          {
            path: 'menu1',
            hidden: true,  // 设置 hidden: true 就会报错
            component: () => import('@/views/nested/menu1/index'), // Parent router-view
            name: 'Menu1',
            meta: { title: 'Menu1' }
          }
        ]
      },
    
    vue.runtime.esm.js:587 [Vue warn]: You may have an infinite update loop in a component render function.
    
    found in
    
    ---> <SidebarItem> at src/views/layout/components/Sidebar/SidebarItem.vue
           <ElMenu>
             <ElScrollbar>
               <Sidebar> at src/views/layout/components/Sidebar/index.vue
                 <Layout> at src/views/layout/Layout.vue
                   <App> at src/App.vue
                     <Root>
    

    但是我在 vue-admin-template demo 上模拟不出该报错, 当我拷贝项目到自己的工程时出现该情况

    opened by ZengTianShengZ 14
  • 访问后台API接口问题

    访问后台API接口问题

    你好,看了一下你写的文档介绍,目前修改如下: config/index.js文件 proxyTable: { '/api': { target: 'http://localhost:8000', pathRewrite: {'^/api' : ''} } }

    config/dev.env.js文件 module.exports = merge(prodEnv, { NODE_ENV: '"development"', BASE_API: '"https://127.0.0.1:8000"', // BASE_API: '"https://easy-mock.com/mock/5950a2419adc231f356a6636/vue-admin"', })

    api请求文件 export function fetchList(query) { return request({ url: '/deeplearning/test', method: 'get', params: query }) }

    前端请求时,浏览器debug调试显示请求地址为 https://127.0.0.1:8000/api/deeplearning/test, 状态为:(failed),现在主要有两个疑问: 1.config/dev.env.js设置的BASE_API 与config/index.js中代理设置的目标路径会有冲突吗? 2.怎样才能走到config/index.js中代理,目前看来貌似代理没有生效呢?

    看了很多相关issue也没有找到争取的解决方法,也花了很多功夫,所以特来请教一下,感谢

    opened by movesan 9
  • 关于post请求与tinymce上传图片问题

    关于post请求与tinymce上传图片问题

    您好,以下是我不懂的两个问题,特向您请教。 1.为什么我发送post请求,还会将参数加在url后面呢? 请求头 如图所见,我用了文章的那个解决方案,发送请求时文章内容过长就会Re quset header is too large,我想了解为什么我用的post请求还会将参数拼到url后面呢?

    2.tinymce编写文章时,右上角有个蓝色上传文件按钮,此按钮上传的文件上传到哪里了呢?我发现它上传后返回的图片地址是data:image/jpeg;base64,开头的,这种地址除了我的机器外,别的机器是否能访问到呢?

    opened by immarktube 7
  • $route.matched获取的路由记录,使用filter时,容易出错

    $route.matched获取的路由记录,使用filter时,容易出错

    在src/components/Breadcrumb/index.vue组件中 第38行: this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)

    其中item.meta.breadcrumb 即最后一个判断条件,如果将其更改为item.meta.anyname都会判断为真 将38行更改为 this.levelList = matched.filter(item => item.meta && item.meta.title && false !== false) 则判断为假

    need repro 
    opened by webpdr 6
  • 大佬能把4.0的基础模板cli 升级到3.3吗 现在还是默认3.0的。发现有些配置项已经弃用了。

    大佬能把4.0的基础模板cli 升级到3.3吗 现在还是默认3.0的。发现有些配置项已经弃用了。

    baseUrl 从 Vue CLI 3.3 起已弃用,请使用publicPath。

    publicPath

    Type: string

    Default: '/'

    部署应用包时的基本 URL。用法和 webpack 本身的 output.publicPath 一致,但是 Vue CLI 在一些其他地方也需要用到这个值,所以请始终使用 publicPath 而不要直接修改 webpack 的 output.publicPath。

    默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上,例如 https://www.my-app.com/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.my-app.com/my-app/,则设置 publicPath 为 /my-app/。

    这个值也可以被设置为空字符串 ('') 或是相对路径 ('./'),这样所有的资源都会被链接为相对路径,这样打出来的包可以被部署在任意路径,也可以用在类似 Cordova hybrid 应用的文件系统中。

    之前这个配置项好像有个在特定情况下有BUG 所以好像弃用了。

    什么时候用空能把包里面的插件改成3.3版本的 我怕自己改可能改出BUG了。

    enhancement feature 
    opened by chenweibo 6
  • 关于请求发送与拦截

    关于请求发送与拦截

    前辈您好,我目前建了一个项目是基于template的,在引用了原项目的请求插件后,发现无法发送正常的post请求,原因是模板里的拦截器全部拦截到了,请问我该怎么做才能让请求正常发送?附上项目地址https://github.com/VonJane/jane-sys-vue 对了我要发送请求的页面是在form文件夹下面。

    opened by immarktube 6
  • mac环境 npm install error

    mac环境 npm install error

    npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: EACCES: permission denied, rmdir '/Users/jianjian/Library/Caches/node-gyp/18.12.1' npm ERR! gyp ERR! System Darwin 21.6.0 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /Users/jianjian/Desktop/VueProjects/jj-system-front/system-front/node_modules/deasync npm ERR! gyp ERR! node -v v18.12.1 npm ERR! gyp ERR! node-gyp -v v9.1.0 npm ERR! gyp ERR! not ok npm ERR! Build failed


    rmdir没权限是啥情况

    opened by GeminiJJ 0
  • npm install error

    npm install error

    npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
    npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
    npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
    npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
    npm WARN deprecated [email protected]: this library is no longer supported
    npm WARN deprecated [email protected]: This loader has been deprecated. Please use eslint-webpack-plugin
    npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
    npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
    npm WARN deprecated [email protected]: use String.prototype.padStart()
    npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
    npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
    npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
    npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
    npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
    npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
    npm WARN deprecated [email protected]: 3.x is no longer supported
    npm WARN deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
    npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
    npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
    npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
    npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
    npm WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
    npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
    npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
    npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
    npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
    npm ERR! code 1
    npm ERR! path /Users/sunchaser/workspace/vue-admin-template/node_modules/deasync
    npm ERR! command failed
    npm ERR! command sh -c node ./build.js
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using [email protected]
    npm ERR! gyp info using [email protected] | darwin | arm64
    npm ERR! gyp info find Python using Python version 3.9.10 found at "/opt/homebrew/opt/[email protected]/bin/python3.9"
    npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.9
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
    npm ERR! gyp info spawn args   'binding.gyp',
    npm ERR! gyp info spawn args   '-f',
    npm ERR! gyp info spawn args   'make',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   '/Users/sunchaser/workspace/vue-admin-template/node_modules/deasync/build/config.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   '/Users/sunchaser/Library/Caches/node-gyp/16.14.0/include/node/common.gypi',
    npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
    npm ERR! gyp info spawn args   '-Dvisibility=default',
    npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/sunchaser/Library/Caches/node-gyp/16.14.0',
    npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
    npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/sunchaser/Library/Caches/node-gyp/16.14.0/<(target_arch)/node.lib',
    npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/sunchaser/workspace/vue-admin-template/node_modules/deasync',
    npm ERR! gyp info spawn args   '-Dnode_engine=v8',
    npm ERR! gyp info spawn args   '--depth=.',
    npm ERR! gyp info spawn args   '--no-parallel',
    npm ERR! gyp info spawn args   '--generator-output',
    npm ERR! gyp info spawn args   'build',
    npm ERR! gyp info spawn args   '-Goutput_dir=.'
    npm ERR! gyp info spawn args ]
    npm ERR! gyp info spawn make
    npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    npm ERR! xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    npm ERR! gyp ERR! build error
    npm ERR! gyp ERR! stack Error: `make` failed with exit code: 1
    npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
    npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:520:28)
    npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
    npm ERR! gyp ERR! System Darwin 21.6.0
    npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    npm ERR! gyp ERR! cwd /Users/sunchaser/workspace/vue-admin-template/node_modules/deasync
    npm ERR! gyp ERR! node -v v16.14.0
    npm ERR! gyp ERR! node-gyp -v v8.4.1
    npm ERR! gyp ERR! not ok
    npm ERR! Build failed
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/sunchaser/.npm/_logs/2022-11-02T02_57_48_188Z-debug-0.log
    

    Environment

    MacBook Pro M1
    node -v: v16.14.0
    npm -v: 8.3.1
    python3 --version: Python 3.9.10
    
    opened by llnancy 0
  • SidebarItem.vue 组件中的 onlyOneChild 属性为什么没有放置到data函数的返回值中作为响应式数据?

    SidebarItem.vue 组件中的 onlyOneChild 属性为什么没有放置到data函数的返回值中作为响应式数据?

    https://github.com/PanJiaChen/vue-admin-template/blob/4c18a3f47bdb417ad8a25f09910f848cb574dee2/src/layout/components/Sidebar/SidebarItem.vue#L56

    为什么不是这么写?

     return {
          onlyOneChild:null
        };
    

    我看 先前的提交版本 5bfadbc118e5a3e4a038549ca6dd94ae5c27cc15 中 是放置到了 return的返回值中,后来就移走了

    opened by ZJRui 0
Releases(4.4.0)
  • 4.4.0(Jun 21, 2020)

    在新版本中将原来的 vue-cli@3 升级为 vue-cli@4。 主要是为了解决:

    • npm run dev 会自动开两个 tab https://github.com/PanJiaChen/vue-element-admin/issues/2944
    • npm run build:prod 页面白屏的问题 https://github.com/PanJiaChen/vue-element-admin/issues/3271

    vue-cli 升级也非常简单,基本无需自己操作说明, 可参照 https://cli.vuejs.org/migrating-from-v3/

    1. 安装 最新版本@vue/cli
    npm install -g @vue/cli
    # OR
    yarn global add @vue/cli
    
    1. 然后执行
    vue upgrade
    

    脚本就会自动帮你进行升级

    :warning: Breaking Changes

    有一点需要额外注意,在新版本中废弃了通过VUE_CLI_BABEL_TRANSPILE_MODULES来控制懒加载

    废弃原因

    vue-cli@3时代,使用VUE_CLI_BABEL_TRANSPILE_MODULES是 ok 的,但其实也是脆弱的,就比如在vue-cli@4时,vue-cli 引入babel-plugin-dynamic-import-node的逻辑就发生了变化,需要VUE_CLI_BABEL_TRANSPILE_MODULESVUE_CLI_BABEL_TARGET_NODE同时为 true 时才会生效,所以只要 vue-cli 的判断逻辑发生了变化,我们都需要做相对应的改动,或非常被动和耦合。所以我们在vue-cli@4版本中,不再通过VUE_CLI_BABEL_TRANSPILE_MODULES:true来设置,而是通过手动引入'babel-plugin-dynamic-import-node'的方式,具体见下一部分。

    vue-cli@4

    1. .env.development文件中不在需要配置VUE_CLI_BABEL_TRANSPILE_MODULES = true,删除即可。

    2. 在命令行执行 npm install babel-plugin-dynamic-import-node -S -D

    3. babel.config.js 中添加插件

    module.exports = {
      presets: ['@vue/cli-plugin-babel/preset'],
      env: {
        development: {
          plugins: ['dynamic-import-node']
        }
      }
    }
    

    具体 commit:https://github.com/PanJiaChen/vue-element-admin/pull/3028/commits/2ea998f91d889480821468de86df9bf8defbb5f0


    Upgrade the original vue-cli @ 3 to vue-cli @ 4 in the new version. Mainly to solve:

    -npm run dev will automatically open two tags https://github.com/PanJiaChen/vue-element-admin/issues/2944 -npm run build: white screen issue on prod page https://github.com/PanJiaChen/vue-element-admin/issues/3271

    The upgrade of vue-cli is also very simple, basically you don’t need to operate your own instructions, you can refer to https://cli.vuejs.org/migrating-from-v3/

    1. Install the latest version @vue/cli
    npm install -g @vue/cli
    # OR
    yarn global add @vue/cli
    
    1. Then execute
    vue upgrade
    

    The script will automatically upgrade for you

    :warning: Breaking Changes

    One thing needs extra attention. In the new version, the control of lazy loading via VUE_CLI_BABEL_TRANSPILE_MODULES is abandoned.

    Elimination reason

    In the era of vue-cli@3, using VUE_CLI_BABEL_TRANSPILE_MODULES is ok, but it is actually fragile, as in vue-cli@4, vue-cli introduces babel-plugin-dynamic-import-node The logic ofhas changed, it needs to be VUE_CLI_BABEL_TRANSPILE_MODULES and VUE_CLI_BABEL_TARGET_NODE to be true at the same time, so as long as the judgment logic of vue-cli changes, we need to make corresponding changes, or be very passive and coupled . So in the vue-cli@4 version, we no longer set it by VUE_CLI_BABEL_TRANSPILE_MODULES: true, but by manually introducing 'babel-plugin-dynamic-import-node', see the next section for details.

    vue-cli@4

    1. No need to configure VUE_CLI_BABEL_TRANSPILE_MODULES = true in the .env.development file, just delete it.

    2. Run npm install babel-plugin-dynamic-import-node -S -D

    3. The way to add the dynamic-import-node plugin in babel.config.js, see the next section for details.

    module.exports = {
      presets: ['@vue/cli-plugin-babel/preset'],
      env: {
        development: {
          plugins: ['dynamic-import-node']
        }
      }
    }
    

    Detail commit:https://github.com/PanJiaChen/vue-element-admin/pull/3028/commits/2ea998f91d889480821468de86df9bf8defbb5f0

    Source code(tar.gz)
    Source code(zip)
  • 4.3.1(Jun 21, 2020)

    :tada: 新功能

    • 侧边栏 icon 支持 el-icon,在声明路由时直接使用 icon class 即可,例如:
    meta: {
          title: 'Example',
          icon: 'example'
          icon: 'el-icon-s-help' //demo
        },
    

    :bug: 修复

    • 修复 param2Obj 函数在参数中出现 == 时的 bug (#3100 by @mayunhai)

    :sparkles: 优化

    • chore: 在 webpack 构建时开启preload,提高首页加载速度(https://github.com/PanJiaChen/vue-element-admin/commit/0bf61aac535b7799a0f17573741fee507003a7e4)
    • refactor: 修改所有 mock 文件为 commonjs,移除@babel/register(https://github.com/PanJiaChen/vue-element-admin/commit/d3bd933a8e314e5e51d48125dbcda9e3df8ee673)
    • 更新 element-ui 至 2.13.2 版本

    :tada: Features

    • The sidebar icon supports el-icon, just use the icon class when declaring the route, for example:
    meta: {
          title: 'Example',
          icon: 'example'
          icon: 'el-icon-s-help' //demo
        },
    

    :bug: Bugs

    • Fix the bug when param2Obj function appears with == in the parameter (#3100 by @mayunhai)

    :sparkles: Optimization

    • chore: Turn on preload during webpack build to increase the homepage loading speed(https://github.com/PanJiaChen/vue-element-admin/commit/0bf61aac535b7799a0f17573741fee507003a7e4)
    • refactor: Modify all mock files to commonjs, remove @babel/register(https://github.com/PanJiaChen/vue-element-admin/commit/d3bd933a8e314e5e51d48125dbcda9e3df8ee673)
    • Update element-ui to version 2.13.2
    Source code(tar.gz)
    Source code(zip)
  • 4.3.0(Jun 9, 2020)

    :warning: Breaking Changes

    chore: change node-sass to dart-sass(#3040 by @Cat7373 )

    /deep/ 已不适用,需要使用 ::v-deep进行替换

    v4.3.0之前本项目都是基于node-sass进行构建的,但node-sass底层依赖 libsass,导致很多用户安装的特别的困难,尤其是 windows 用户,它强制用户在windows环境中必须安装python2Visual Studio才能编译成功。

    所以为了解决这个问题,本项目在 v4.3.0修改为dart-sass进行构建,它能在保证性能的前提下大大简化用户的安装成本。通过这个 issue下面相关的评论就可以知道,安装 node-sass 是多么麻烦的一件事。

    这里选择使用dart-sass还有一个更主要的原因,sass官方已经将dart-sass作为未来主要的的开发方向了,有任何新功能它都是会优先支持的,而且它已经在社区里稳定运行了很长的一段时间,基本没有什么坑了。dart-sass之所以容易安装,主要是因为它会被编译成纯 js,这样就可以直接在的 node 环境中使用。虽然这样它的运行速度会比基于 libsass的慢一些些,但这些速度的差异几乎可以忽略不计。整个社区现在都在拥抱dart-sass,我们没有理由拒绝!而且它的确大大简化了用户的安装成本。

    目前vue-cli在选择sass预处理的时候也会默认优先使用dart-scss,相关 pr

    相关的说明可以见该篇文章: Announcing Dart Sass

    具体 dart-sass性能评测可见:Perf Report

    升级方案

    升级也非常的简单,只需要两个步骤

    npm uninstall node-sass
    
    npm install sass -S -D
    

    具体可见该: Pull Request

    不兼容

    替换 node-sass 之后有一个地方需要注意,就是它不再支持之前 sass 的那种 /deep/ 写法,需要统一改为 ::v-deep 的写法。相关: issue

    具体 demo:

    .a {
      /deep/ {
        .b {
          color: red;
        }
      }
    }
    
    /* 修改为 */
    .a {
      ::v-deep {
        .b {
          color: red;
        }
      }
    }
    

    不管你是否使用dart-sass,我都是建议你使用::v-deep的写法,它不仅兼容了 css 的>>>写法,还兼容了 sass /deep/的写法。而且它还是 vue 3.0 RFC 中指定的写法。

    而且原本 /deep/ 的写法也本身就被 Chrome 所废弃,你现在经常能在控制台中发现 Chrome 提示你不要使用/deep/的警告。

    更多: scope css 写法


    :warning: Breaking Changes

    chore: change node-sass to dart-sass(#3040 by @Cat7373 )

    /deep/ is no longer applicable, it needs to be replaced with ::v-deep

    Before v4.3.0, this project was built based on node-sass, but node-sass low-level dependencies libsass, resulting in many users installing Especially difficult for Windows users, it forces users to install python2 and Visual Studio in the windows environment to compile successfully.

    So in order to solve this problem, this project was modified to build dart-sass in v4.3.0, it can guarantee performance Under the premise of greatly simplifying the user's installation costs. Through this issue the relevant comments below can be known, install` Node-sass is such a troublesome thing.

    There is a more important reason for choosing to use dart-sass here. Officially, sass has taken dart-sass as the main development direction in the future. Any new features will be supported first, and it It has been running steadily in the community for a long time, and there are basically no pits. The main reason why dart-sass is easy to install is because it will be compiled into pure js, so that it can be used directly in the node environment. Although its running speed will be slower than that based on libsass, the difference in these speeds is almost negligible. The entire community is now embracing dart-sass, and we have no reason to refuse! And it does greatly simplify the user's installation costs.

    Currently, vue-cli will also prefer to use dart-scss by default when selecting sass preprocessing, related: pr

    Related instructions can be found in this article: Announcing Dart Sass

    Specific dart-sass performance evaluation can be seen: Perf Report

    Upgrade plan

    The upgrade is also very simple, requiring only two steps

    npm uninstall node-sass
    
    npm install sass -S -D
    

    The upgrade can also be seen in detail: Pull Request is simple and only requires two steps

    Not compatible

    One thing to note after replacing node-sass is that it no longer supports the /deep/ writing style of sass before, and it needs to be changed to the writing style of ::v-deep. Related: issue

    Concrete demo:

    .a {
      /deep/ {
        .b {
          color: red;
        }
      }
    }
    
    /* change into */
    .a {
      ::v-deep {
        .b {
          color: red;
        }
      }
    }
    

    Regardless of whether you use dart-sass or not, I suggest you use ::v-deep notation, which is not only compatible with the css >>> notation, but also compatible with sass /deep/ . And it's the way of writing specified in vue 3.0 RFC.

    And the original writing of /deep/ itself was abandoned by Chrome. You can often find a warning in the console that Chrome reminds you not to use /deep/.

    More: scope css writing

    Source code(tar.gz)
    Source code(zip)
  • 4.2.1(May 27, 2019)

  • 4.1.0(Apr 22, 2019)

  • v3.9.0(Feb 22, 2019)

    • Add mock.js to instead of easy-mock

    This project originally used easy-mock to simulate data,but its official service is very unstable, and you can build your own service if you need it.

    So here I use Mock.js for local emulation, it will intercept your request, so you won't see the request in the network.

    If you remove ../mock it will automatically request easy-mock data.

    • Other

    Synchronized vue-element-admin 's code. Detail see: PanJiaChen/vue-element-admin/releases

    Source code(tar.gz)
    Source code(zip)
  • v3.8.0(Aug 20, 2018)

  • v3.6.0(May 2, 2018)

  • v3.0.0(Nov 30, 2017)

A vue2.0 minimal admin template

A minimal vue admin template with Element UI & axios & iconfont & permission control & lint

花裤衩 17.6k Dec 31, 2022
Star Admin Vue Admin Template is a free admin template based on Bootstrap 4 and Vue.js.

Star Admin Vue Admin is a free admin template based on Bootstrap 4 and Vue.js.

BootstrapDash 310 Dec 25, 2022
🖖 A vue-cli 3.0 + typescript minimal admin template

vue-typescript-admin-template is a production-ready front-end solution for admin interfaces based on vue, typescript and UI Toolkit element-ui

Chong Guo 4.9k Dec 31, 2022
✨ a vue3 minimal admin template

一个中后台管理系统基础解决方案,基于 Vue3、TypeScript、Element-Plus 和 Vue-Cli 4.5

V3 Projects 306 Jan 4, 2023
A minimal vue admin template with Element UI & axios & iconfont & permission control & lint

vue-admin-template English | 简体中文 A minimal vue admin template with Element UI & axios & iconfont & permission control & lint Live demo: http://panjia

花裤衩 17.6k Dec 26, 2022
A minimal vue admin template with Element UI & axios & iconfont & permission control & lint

A minimal vue admin template with Element UI & axios & iconfont & permission control & lint

null 2 Apr 23, 2022
Micro front-end Admin based on Qiankun, vue3.x, admin-element-vue, admin-antd-vue project architecture

Micro front-end Admin based on Qiankun, vue3.x, admin-element-vue, admin-antd-vue project architecture

null 21 Dec 26, 2022
Vue3 admin,ant design vue pro,vue admin,vue vite admin,ant design pro

Ant Design Vue Pro An out-of-box UI solution for enterprise applications as a Vue boilerplate. based on Ant Design of Vue 基于 Vite2 Vue3 Ant-Design-of-

Ones 80 Dec 16, 2022
💚 A Minimal Admin Dashboard Develop with Vue 3, VIte, and TailwindCss. It's Free 💥

?? A Minimal Admin Dashboard Develop with Vue 3, Vite, and TailwindCss. It's Free ?? Aatrox - VueJS 3 & TailwindCss Free Admin Dashboard Template Expl

UI Lib 104 Dec 28, 2022
iView vue Admin / An admin management system template

iview-vue-admin iView Vue Admin Live Demo: https://tonyluo.github.io/iview-vue-admin Build Setup # install dependencies npm install # serve with hot

Tony 107 Aug 19, 2022
Admin One - Vue.js 3 Tailwind CSS admin dashboard template

Admin One - Vue.js 3 Tailwind CSS admin dashboard template

JustBoil.me 1.1k Jan 8, 2023
一个vue3-admin-template-vite项目,升级于pan大佬的vue-admin-template项目,基本保留原有架构无缝切换

vue3-element-vite-template 一款 vue3 开箱即用的纯净的后台管理系统,只包含 ui/权限/axios 封装/svg 等 在线预览地址 此项目是在 pan 大佬的vue-admin-template项目基础上进行微改的 vue3 版本,基本沿用 vue-admin-tem

Maxma 20 Dec 2, 2022
soybean admin - a beautiful vue admin template, based on Vue3、Vite、Naive UI、TypeScript.

soybean admin - a beautiful vue admin template, based on Vue3、Vite、Naive UI、TypeScript.

Soybean 2k Jan 4, 2023
Nuxt + CoreUI Free Vue Bootstrap Admin TemplateNuxt + CoreUI Free Vue Bootstrap Admin Template

Nuxt + CoreUI Free Vue Bootstrap Admin Template Nuxt + CoreUI Free Vue Bootstrap Admin Template Description Nuxt + CoreUI Free Vue Bootstrap Admin Tem

null 4 Apr 29, 2022
Crudapi Admin Web (crudapi-admin-web)

简介:crudapi后台管理页面,框架采用Vue,控件库为Quasar, 形式为SPA单页面应用。 主要知识点:Vue基本知识,自定义组件,axios网络请求,Vuex状态管理,Router路由,本地存储LocalStorage、Session、Cookie,登录,本地调试,docker打包等。 主要功能:元数据管理,序列号管理,表关系设置,业务数据crud增删改查等。

crudapi 119 Dec 31, 2022
vue-element-admin is a production-ready front-end solution for admin interfaces.

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.

null 1 Nov 19, 2021
Aura-admin - Aura Admin Web App that helps you to mange the Tech Communities like GDGs

Aura Admin Version: 3.1.1 Click Here Show some ❤️ and ⭐ the repo to support the

null 0 Jan 30, 2022
vue-admin-work是一个中后台系统管理方案。使用 vue2.x 及周边全家桶工具开发而来。支持多种功能,不同角色权限🚀🚀🚀🎉🎉

vue-admin-work是一个中后台系统管理方案。使用 vue2.x 及周边全家桶工具开发而来。支持多种功能,不同角色权限??????????

null 81 Dec 30, 2022
vue admin template base on element 2

element-vue-admin A admin template base on element 2.x.x Live Demo: https://tonyluo.github.io/element-vue-admin Build Setup # install dependencies npm

Tony 77 Dec 16, 2022