如何從現有版本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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM