摘要: 1.JSR303校验 @Validated 开启303校验 @Email 验证字段是否是邮箱若email不可用在pom.xml中添加 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-st 阅读全文
posted @ 2021-08-06 14:06 夜未央111 阅读(81) 评论(0) 推荐(0)
摘要: 1.Spring中ioc注入需要配置大量文件 而springboot支持yaml一键注入 注入方式:(1)在resource下创建application.yaml使用yaml的语法格式注入 示例: (2)在person实例中添加注解@ConfigurationProperties(prefix = 阅读全文
posted @ 2021-08-04 22:07 夜未央111 阅读(232) 评论(0) 推荐(0)
摘要: 1.vue 嵌套路由 用法:在router对象中使用children属性定义嵌套路由 示例: ps:重定向使用redirect表明此请求要重定向的地址 2.参数传递 使用对象传递参数 to ={{name:'地址' ,id: 1}} 通过$route.param.id 3.路由钩子 router.b 阅读全文
posted @ 2021-07-28 23:13 夜未央111 阅读(31) 评论(0) 推荐(0)
摘要: 1.安装 使用命令 npm i element-ui -S 安装element ui 安装sass加载器 cnpm i sass-loader -D 2.使用 在main.js加入如下代码 import Vue from 'vue'; import ElementUI from 'element-u 阅读全文
posted @ 2021-07-28 14:58 夜未央111 阅读(59) 评论(0) 推荐(0)
摘要: 1.创建vue项目 2.在src目录下创建router文件夹 创建index.js 3.在main.js中加入router 4.在app中展示router ps:vue router安装 在命令行输入npm install vue-router --save-dev 阅读全文
posted @ 2021-07-27 16:56 夜未央111 阅读(31) 评论(0) 推荐(0)
摘要: 1.node.js安装 网址:https://nodejs.org/zh-cn/ 下载后一直next 2.安装包 (1)镜像cnpm 在命令窗口使用npm install cnpm -g命令 (2)vue-cli 使用命令vue-cli npm install vue-cli -g 3.vue项目创 阅读全文
posted @ 2021-07-26 20:59 夜未央111 阅读(117) 评论(0) 推荐(0)
摘要: 问题:使用组件中的方法如何删除vue示例中的方法 1.传统解决方法vm.方法名 2.使用自定义方法解决 其中v-on绑定自定义事件remove使用removeItems 在组件中使用组件中方法removeCom removeCom中使用emit方法绑定自定义事件remove 效果: ps:本人也不懂 阅读全文
posted @ 2021-07-26 12:48 夜未央111 阅读(54) 评论(0) 推荐(0)
摘要: 1 vue中可以使用插槽替代具体标签 <slot></slot> (1) 在原模板中使用slot属性绑定 (2)在<slot></slot>标签中使用name属性绑定具体代替插槽的组件 (3)定义具体组件代替插槽 2 示例 效果展示: 具体请访问vue官方文档:https://cn.vuejs.or 阅读全文
posted @ 2021-07-25 16:26 夜未央111 阅读(39) 评论(0) 推荐(0)
摘要: 1 动态绑定class 2.数组绑定class列表 3.组件类型绑定 渲染结果为:<p class:"foo bar baz boo"></p> vue同样可以绑定数组类型 4 内联样式 阅读全文
posted @ 2021-07-23 21:13 夜未央111 阅读(135) 评论(0) 推荐(0)
摘要: 1.vue中computed属性 类似methods但是有区别: methods中定义函数为方法,数据每次加载时都是重新载入 而computed为属性,数据加载时类似缓存只有更新时数据才改变(虚拟dom) 2.示例: currentTime1为methods每次都会改变 curretTime2则不会 阅读全文
posted @ 2021-07-23 19:10 夜未央111 阅读(42) 评论(0) 推荐(0)