摘要:
父组件代码如下: <template> <div> 我是父组件: <input type="text" v-model="msg"> <son-box v-model="msg"/> </div> </template> <script> // 导入子组件 import SonBox from '@ 阅读全文
摘要:
html{ -webkit-filter: grayscale(100%); -moz-filter:grayscale(100%); -ms-filter: grayscale(100%); -mo-filter:grayscale(100%); filter:grayscale(100%); f 阅读全文
摘要:
// 移除数组arr中的所有值与item相等的元素,直接给定的arr数组上进行操作,并将结果返回输入 function removeWithoutCopy(arr,item){ for(let i = 0;i<arr.length;i++){ if(arr[i] item){ arr.splice( 阅读全文
摘要:
//返回数组的格式为key:value的形式不打印原型上的属性 var C = function(){ this.foo='bar' this.baz = 'bim' } C.prototype.bop ='bip' iterate(new C()) function iterate(obj){ c 阅读全文
摘要:
socket.io在node中使用,首先安装express,socket.io,为了方便起见还安装了nodemon,它可以帮我们快速启动js文件,配置如下: 效果展示如下: 阅读全文