-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
没有后端 #1
Comments
前后端分离开发的,这里只有前端vue代码
在 2022-11-26 16:32:54,"henghengxiedaima" ***@***.***> 写道:
后端代码呢老哥
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
我按照你的把后端写了一下,根据前端写后端就是难啊。。对前端想做个二次开发,我看那个主页的日历组件,我想换一个更漂亮的,但是是基于vue3的,请教一下,怎么把项目的vue版本提升一下啊(我看这个项目用的vue2) |
个人对这个项目其实不太有升级想法,因为功能实现比较单一。
另外升级到vue3时间成本比较大,个人不建议升级,不如直接用新的vue3来重写。
而且这个项目用的组件库是element-ui是基于vue2技术的,会造成破坏。
如果真的想要升级,个人有以下建议(网上参考的):
第一步: 先把Vue2 框架整体替换成 Vue3(这一步直接在终端中可以通过vue add vue-next),因为目前 Vue3也是兼容了 Options 写法,这样代码结构可以先不用更改,后期可以逐步修改(因为涉及到所有页面和组件)。之后新增的页面和组件按照 Vue3 新增的 compositionAPI 结构来写。
第二步: 把 Vue3 中已经不再支持的 API 和语法进行修改替换。包括 Vue3 已经不再支持过滤器filter,v-model 用法也改变等。
第三步: 把项目使用到的第三方插件和UI框架(Element)替换成Vue3版本,对应用法可能也需要修改。需要通过 package.json 里注册目录,在页面进行检索修改。
对于这一步升级有以下几点比较麻烦:
项目中依赖的库并不支持vue3
vue2到vue3的一些破坏性更改
项目中依赖组件库(ElementUI等)的破坏性更改
对一些新特性的尝试(vite,ts,pinia)等 公司项目迁移造成稳定性破坏(极其重要)
第四步: 确保项目代码语法编译无误后,需要检查代码中的业务是否正确,避免对公司项目迁移造成稳定性破坏(极其重要)。
第五步: 使用 TypeScript 重构 JS 代码,TypeScript 比 JavaScript 多了静态类型检查,也增加了一些新的语法,是给项目锦上添花。但是这一步会比较耗时(因为相当于修改把JS代码都要过一遍),但是项目中可以同时存在JS 和 TS,所以可以逐步替换。
在 2022-11-29 14:58:03,"henghengxiedaima" ***@***.***> 写道:
我按照你的把后端写了一下,根据前端写后端就是难啊。。对前端想做个二次开发,我看那个主页的日历组件,我想换一个更漂亮的,但是是基于vue3的,请教一下,怎么把项目的vue版本提升一下啊(我看这个项目用的vue2)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
谢谢~谢谢~没想到写了这么多建议。我后来也是查了一下相关方法,确实是难度比较大。由于我是做后端开发的,在前端的能力也停留到了读懂代码、做简单开发的水平,一直想系统学一下vue,但是学校的课讲的挺水的。这个系统也是为了完成一下vue课程的期末大作业,炫酷的界面一下吸引我了。 |
谢谢你的支持和欣赏,其实这个项目我也是用来打比赛的,期待你后续不断完善,加油哦!
在 2022-12-02 20:30:25,"henghengxiedaima" ***@***.***> 写道:
谢谢~谢谢~没想到写了这么多建议。我后来也是查了一下相关方法,确实是难度比较大。由于我是做后端开发的,在前端的能力也停留到了读懂代码、做简单开发的水平,一直想系统学一下vue,但是学校的课讲的挺水的。这个系统也是为了完成一下vue课程的期末大作业,炫酷的界面一下吸引我了。
谢谢~
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
后端代码呢老哥
The text was updated successfully, but these errors were encountered: