摘要: 1.父传子 子组件通过props接收 //父组件: <template> <div id="app"> <Children :msg="abc"/> </div> </template> <script> import Children from './components/children' ex 阅读全文
posted @ 2020-09-04 14:35 king-xin 阅读(125) 评论(0) 推荐(0)
摘要: <body> <div class="box"> <div class="box1"></div> </div> </body> 方法一: .box{ width: 100px; height: 100px; border: 1px solid red; display: flex; } .box1 阅读全文
posted @ 2020-09-04 14:23 king-xin 阅读(109) 评论(0) 推荐(0)
摘要: git操作的集体步骤 1.cd 路径 进入当前目录 2.配置git基本操作 git config --global user.name "git用户名" git config --global user.email "git邮箱" 3.git init 在本地进行初始化(简历暂存区) .git 文件 阅读全文
posted @ 2020-08-09 14:21 king-xin 阅读(72) 评论(0) 推荐(0)
摘要: 1 //节流 2 const throttle=(function(){ 3 var firstTime=0; 4 var timer=null; 5 return function(callback,time=300){ 6 var lastTime=new Date().getTime() 7 阅读全文
posted @ 2020-05-26 22:17 king-xin 阅读(153) 评论(0) 推荐(0)
摘要: 1 const eventList = {} 2 //发布 3 const $on = function(eventName,callback){ 4 if(!eventList[eventName]){ 5 eventList[eventName] = []; 6 } 7 8 eventList[ 阅读全文
posted @ 2020-05-26 00:42 king-xin 阅读(156) 评论(0) 推荐(0)
摘要: 设置拦截 axios.interceptors.request.use((config) => { if (config.method 'post') { if (!config.isFormData) { config.data = qs.stringify(config.data,{ indic 阅读全文
posted @ 2020-05-14 21:47 king-xin 阅读(1352) 评论(0) 推荐(0)
摘要: import {fetch as fetchPro} from "whatwg-fetch" import qs from "qs" const get=(url,data)=>{ var str=""; for(var key in data){ str+="&"+key+"="+data[key 阅读全文
posted @ 2020-05-12 18:17 king-xin 阅读(160) 评论(0) 推荐(0)
摘要: 一、配置 this.state={ tabs:[ { path:"/home", icon:"\ue628", name:"首页", }, { path:"/find", icon:"\ue663", name:"发现", }, { path:"/order", name:"订单", icon:"\ 阅读全文
posted @ 2020-05-11 22:34 king-xin 阅读(469) 评论(0) 推荐(0)
摘要: @charset "utf-8"; /* CSS Document */ html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img { margin:0; padding:0; 阅读全文
posted @ 2020-05-11 22:19 king-xin 阅读(247) 评论(0) 推荐(0)