摘要: <RangePicker showTime allowClear={false} value={hackValue || time} disabledDate={disabledDate} disabledTime={disabledRangeTime} onCalendarChange={(val 阅读全文
posted @ 2021-09-27 14:13 cielw 阅读(719) 评论(0) 推荐(0)
摘要: 全局前置守卫 通常用来判断是否登录(main.js配置) to:进入到哪个路由去,from:从哪个路由离开 router.beforeEach((to, from, next) => { next() // 放行 next(false) // 取消执行 next('/')或 next({path:' 阅读全文
posted @ 2021-05-18 16:10 cielw 阅读(62) 评论(0) 推荐(0)
摘要: 表单序列化 (form表单提交) const serialize = data => { let list = []; Object.keys(data).forEach(ele => { list.push(`${ele}=${data[ele]}`); }); return list.join( 阅读全文
posted @ 2021-04-29 10:53 cielw 阅读(1268) 评论(0) 推荐(0)
摘要: 在项目使用element-UI中, 有时候会需要用到覆盖原有样式, 但是全局样式不起作用, 只能通过深度作用选择器 style为css 时写法 .a >>> .b { width:100%; } style为css的预处理器(scss, less sass) 时写法 /* /deep/ ang="l 阅读全文
posted @ 2021-04-08 15:37 cielw 阅读(580) 评论(0) 推荐(0)