如何从现有版本1.4.8升级到element UI2.0.11

现在的项目是定死的依赖以下几个核心组件的版本:

vue 2.3.3

element-ui 1.4.8

vue-template-comiler 2.3.3

将以前定死的依赖修改为

vue ^2.3.3

element-ui ^1.4.8

vue-template-comiler ^2.3.3

 

然后安装npm-check-updates

npm install -g npm-check-updates

#执行版本升级检查

npm-check-updates

#更新package.json

ncu -u

#重新安装依赖

npm install

 

其它修改的点:

[Element Migrating][ElDialog][Attribute]: size is removed.
icon="search" --> suffix-icon="el-icon-search"
<template scope="scope"> --> <template slot-scope="scope">

导入components要使用import:

components: {
'orgPickerForm': require('@/components/orgPickerForm.vue'),
'userProject': require('./_userProject.vue'),
'projectDialogPicker': require('@/components/projectDialogPicker.vue')
}

调整为:

import orgPickerForm from '@/components/orgPickerForm.vue'
import userProject from './_userProject.vue'
import projectDialogPicker from '@/components/projectDialogPicker.vue'

components: {
'orgPickerForm': orgPickerForm,
'userProject': userProject,
'projectDialogPicker': projectDialogPicker
}

 

参考资料:

摆脱令人抓狂的ESlint 语法检测配置说明

https://segmentfault.com/a/1190000008742240

Element-ui升级2.0后初体验
https://segmentfault.com/a/1190000012051823
Vue.js 2 遇到 vue.runtime.common.js?d43f:511 [Vue warn]: Failed to mount component: template or render function not defined. (found in root instance) 错误的解决方法。
http://blog.csdn.net/zhangchao19890805/article/details/53367574

 

Mapstruct使用问题Couldn’t retrieve @Mapper annotation

http://blog.csdn.net/kang389110772/article/details/72896988

posted on 2018-01-22 17:34  James.H.Fu  阅读(3482)  评论(0编辑  收藏  举报

导航