登录社区云,与社区用户共同成长
邀请您加入社区
1、两种方式通过判断实体属性是否存在id判断请求路径是否存在id2、获取请求路径id的方式this.$route.params.id一般把添加和更新的函数写为这种形式saveOrUpdate() {//判断路由是否有路由参数if (this.$route.params && this.$route.params.id) {this.updateCourseInfo();} else
this.$route.params.id
一般把添加和更新的函数写为这种形式
saveOrUpdate() { //判断路由是否有路由参数 if (this.$route.params && this.$route.params.id) { this.updateCourseInfo(); } else { this.saveCourseInfo(); } },
前往低代码交流专区
更多推荐
Mac 使用vscode 创建vue项目后修改文件提示:权限不足,以超级用户身份重试
基于nodejs+vue云计算的城乡医疗卫生服务系统[程序+论文+开题]-计算机毕业设计
ElasticSearch迁移至openGauss
扫一扫分享内容
所有评论(0)