摘要: 当组件使用混入对象时,所有混入对象的选项将被“混合”进入该组件本身的选项 // 定义一个混入对象 var mixin = { data: function () { return { message: 'hello', foo: 'abc' } } } new Vue({ mixins: [mixi 阅读全文
posted @ 2022-04-22 14:56 拨云丶 阅读(19) 评论(0) 推荐(0) 编辑
摘要: let str = "Hello world, welcome to the Nigix" let Boolen = str.includes("world") //true 阅读全文
posted @ 2022-04-22 14:56 拨云丶 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Object.entries()方法返回一个给定对象自身可枚举属性的键值对数组,其排列与使用for...in循环遍历该对象时返回的顺序一致 简单来说就是可以把一个对象的键值以数组的形式遍历出来,结果和for...in一致,但不会遍历原型属性 const obj = { foo: 'bar', baz 阅读全文
posted @ 2022-04-22 14:51 拨云丶 阅读(43) 评论(0) 推荐(0) 编辑