概述
v4.0版本正式发布。
重大改变
-
基于
vue-cli@3
进行构建 -
调整了项目的目录结构
- mock 文件移至根目录下
- layout 从 views 文件夹下移至 src 下
-
使用了最新的
eslint-plugin-vue@5
,重新格式化了代码 -
现在可以在不刷新页面的情况下 remove routes
-
更新了
husky@1.3.1
-
增加了 jest 单元测试
-
新增了
npm run preview
、npm run test:uni
、npm run new
指令 -
使用了新的 mock 方式,解决了之前 mock 若干问题
-
vuex
启用了 模块化namespaced
-
新增了
settings.js
,让 sidebarLogo、fixedHeader、TagsViews 等都可配置 -
新增了 sidebar logo
-
重构了侧边栏 sidebar 代码逻辑,并且优化了样式和展开收起动画,同时让二级菜单内容过多时支持滚动
-
使用了 async/await 替代了部分 promise 代码
-
增加了 header-search 组件 #1591
-
增加了 fearure[TagsView]: add affix porperty #1577
-
移除了 tree-table 组件。
element-ui
v2.7.0 开始支持tree-table
,所以不再独立维护。 -
增加了权限配置 demo
-
增加了导出多级表头 excel 的 demo
-
feature[Directive]: add auto-height table directive
RoadMap
- 更好的多级页面的缓存:目前页面的缓存基于
keep-alive
,但当三级路由嵌套的情况下,支持的并不好。之后探索一个更好的解决方案。 - 单元测试:当项目大了之后,没有单元测试维护起来还是有些吃力的。
之后会慢慢补上 unit-test 的测试用例。 酌情加上一些e2e-test
的例子。 - 去国际化:其实大部分人是不需要国际化的,默认情况下移除国际化。单独开一个国际化分支。
- 适配 webpack5:webpack5 还是解决了不少之前的痛点的,正式版发布之后会进行升级
- vue 3.0: 等官方发布之后会基于新版本进行重构
The v4.0 version was officially released.
Breaking Changes
-
Build based on
vue-cli@3
-
Adjusted the directory structure
- Mock file move to root directory
- Layout from the views folder to src
-
Reformatted the code with the latest
eslint-plugin-vue@5
-
You can now remove routes without refreshing the page.
-
Updated
husky@1.3.1
-
Added jest unit test
-
Added
npm run preview
,npm run test:uni
,npm run new
directive -
Using the new mock method, solved some problems with the previous mock
-
vuex
usenamespaced
-
Added
settings.js
to make sidebarLogo, fixedHeader, TagsViews, etc. configurable -
Add sidebar logo
-
Refactored the sidebar code logic and optimized the style and unfolding the animation
-
Use Async/await
-
Add header-search #1591
-
Add fearure[TagsView]: add affix porperty #1577
-
Remove tree-table.
element-ui
v2.7.0 started to supporttree-table
, so it is no longer maintained independently. -
Added permission configuration demohttps://github.com/PanJiaChen/vue-element-admin/commit/c963f56686b9731a517a17c4d562bc3da0fa3771
-
Added demo to export multi-level header excel
-
feature[Directive]: add auto-height table directive #1702 (by @yuntao1997 )
RoadMap
- Better multi-level page caching: The current page cache is based on
keep-alive
, but when the three-level routing is nested, the support is not good. Then explore a better solution. - Unit testing: When the project is big, it is still a little difficult to maintain without unit testing.
The unit-test test case will be added slowly. Add some examples ofe2e-test
as appropriate. - Remove i18n: In fact, most people do not need to be i18n. Open a i18n branch separately.
- Adapting webpack5:
webpack5
still solves a lot of pain points before, the upgrade will be upgraded after the official version is released. - vue 3.0: vue 3.0: Refactoring based on the new version after official release
最后
以上就是瘦瘦柚子为你收集整理的vue-element-admin 4.0.0 正式版发布的全部内容,希望文章能够帮你解决vue-element-admin 4.0.0 正式版发布所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复