摘要: 问题描述: 本地修改了代码后,执行“git pull”命令时,无法更新代码,并报错提示:“Your local changes to the following files would be overwritten by merge” 问题原因: 是因为本地修改的代码与git服务器的代码冲突导致。如 阅读全文
posted @ 2022-02-18 10:13 土小狗 阅读(5614) 评论(0) 推荐(0) 编辑
摘要: 1、父组件可以使用 props 把数据传给子组件。2、子组件可以使用 $emit,让父组件监听到自定义事件 。 vm.$emit( event, arg ) //触发当前实例上的事件 vm.$on( event, fn );//监听event事件后运行 fn; 例如:子组件: <template> 阅读全文
posted @ 2022-02-16 16:57 土小狗 阅读(111) 评论(0) 推荐(0) 编辑
摘要: setCursor 方法的使用 codeMirror.focus() setTimeout(()=>{ codeMirror.setCursor({line:1,ch:5}) },0) 阅读全文
posted @ 2022-02-15 09:30 土小狗 阅读(758) 评论(0) 推荐(0) 编辑
摘要: var data=[ {id:1001,icon:"img/1.png",name:"餐饮0",num:1,price:10,a:1}, {id:1002,icon:"img/2.png",name:"餐饮1",num:1,price:20,a:2}, {id:1002,icon:"img/2.pn 阅读全文
posted @ 2022-02-14 17:32 土小狗 阅读(548) 评论(0) 推荐(0) 编辑
摘要: let idarry=[]; let newarry=[]; for (var i=0;i<js.length;i++){ let idx=idarry.indexOf(js[i].applicationId); if(idx 1) { idarry.push(js[i].applicationId 阅读全文
posted @ 2022-02-14 16:16 土小狗 阅读(259) 评论(0) 推荐(0) 编辑
摘要: const list1 = [ {id: 0, name: 'xiaomin'}, {id: 1, name: 'xiaohong'}, ]; const list2 = [ {id: 0, name: 'xiaomin'}, {id: 1, name: 'xiaohong'}, {id: 3, n 阅读全文
posted @ 2022-02-13 00:17 土小狗 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 一、利用ES6 Set去重(ES6中最常用) function unique (arr) { return Array.from(new Set(arr)) } var arr = [1,1,'true','true',true,true,15,15,false,false, undefined,u 阅读全文
posted @ 2022-02-11 15:05 土小狗 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 1 <a-range-picker 2 v-model="rangePickerDateFC" 3 :format="dateFormat" 4 @change="onChange" 5 /> 1 import moment from 'moment' 2 export default { 3 na 阅读全文
posted @ 2022-02-08 17:51 土小狗 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 一、当前时间的前一个小时 var frontOneHour = new Date(new Date().getTime() - 1 * 60 * 60 * 1000); console.log(new Date(new Date().getTime() - 1 * 60 * 60 * 1000), 阅读全文
posted @ 2022-02-08 14:55 土小狗 阅读(3299) 评论(0) 推荐(0) 编辑
摘要: vue项目中接受后台传过来的流文件会出现乱码 后台response的内容如下: 在参考各位大大资料的基础下,做了点总结。 // 导出文件流 fetchExportBill(url, data = {}) { return new Promise((resolve, reject) => { axio 阅读全文
posted @ 2022-02-07 14:36 土小狗 阅读(121) 评论(0) 推荐(0) 编辑