摘要: 如果我们给一个组件进行了命名,那么我们在其他组件引入的时候,引用名就需要跟这个内部的命名保持一致例如 本组件 name:"simpleComponent" 其他组件引入的时候 import simpleComponent from "XXXXX" 阅读全文
posted @ 2018-09-28 23:52 前端大佬李嘉诚 阅读(916) 评论(0) 推荐(0) 编辑
摘要: encodeURIComponent和decodeURIComponent可以编码和解码URI特殊字符(如#,/,¥等),而decodeURI则不能。 阅读全文
posted @ 2018-09-28 23:32 前端大佬李嘉诚 阅读(71) 评论(0) 推荐(0) 编辑
摘要: // vue项目可以抽取出单独的组件 通过引入的方式 function formDate(date, fmt) { if (/(y+)/.test(fmt)) { var year = new Date().getFullYear() + ""; fmt = fmt.replace(RegExp.$ 阅读全文
posted @ 2018-09-28 00:26 前端大佬李嘉诚 阅读(807) 评论(0) 推荐(0) 编辑