摘要:
打印一下 this.$refs[formName],检查是否拿到了正确的需要验证的 form 在拿到了正确的 form 后,检查该 form 上添加的表单验证是否正确,需要注意的点有: el-form rules,model 属性绑定,ref 标识 el-form-item prop 属性绑定 <F
阅读全文
posted @ 2022-05-18 17:56
pleaseAnswer
阅读(128)
推荐(0)
编辑
摘要:
1 全局模式捕获:String.prototype.matchAll() const str = ` <html> <body> <div>这是第一个div</div> <p>这是p</p> <div>这是第二个div</div> <span>这是span</span> </body> </html
阅读全文
posted @ 2022-05-18 17:46
pleaseAnswer
阅读(22)
推荐(0)
编辑
摘要:
1 对象扩展 Object.fromEntries() 把键值对列表转换为一个对象 1.1 Object 转换 const obj = { name: 'imooc', course: 'es' } const entries = Object.entries(obj) console.log(en
阅读全文
posted @ 2022-05-18 17:41
pleaseAnswer
阅读(19)
推荐(0)
编辑
摘要:
1 异步迭代:for await of 1.1 同步迭代(模拟) const arr = ['es6', 'es7', 'es8', 'es9'] // 只适用于同步操作 arr[Symbol.iterator] = function() { let nextIndex = 0 return { n
阅读全文
posted @ 2022-05-18 17:37
pleaseAnswer
阅读(47)
推荐(0)
编辑
摘要:
1 异步编程解决方案 Async Await async 让我们写起 Promise 像同步操作 async/await 是函数定义的关键字 await 用于等待 promise 对象的返回结果,且不能单独使用必须放在 async 函数中 利用 async 定义的函数会返回一个 promise 对象
阅读全文
posted @ 2022-05-18 17:30
pleaseAnswer
阅读(27)
推荐(0)
编辑
摘要:
1 数组扩展:Array.prototype.includes(searchElement, fromIndex) fromIndex 从指定索引位置开始查找 1.1 返回值:Boolean const arr = ['es6', 'es7', 'es8'] console.log(arr.incl
阅读全文
posted @ 2022-05-18 17:27
pleaseAnswer
阅读(28)
推荐(0)
编辑