摘要:
首先在src文件下创建setupProxy.js文件,和App.js同一级,例如: const { createProxyMiddleware } = require('http-proxy-middleware'); //更新后使用的是createProxyMiddleware,以前使用的是pro 阅读全文
摘要:
不传参数时候 函数定义成箭头函数直接使用 render () { return ( <div> <h4>请发表你的看法</h4> <div className ="flex"> <Add addItemFun={this.addItemFun}/> <Lists commentList={this. 阅读全文
摘要:
react生命周期16.0前的生命周期 首次进去页面执行的生命周期钩子函数有:(初始化阶段和挂载阶段) 1.constructor (初始化数据,也可以super(props) 调用基类的构造方法 props只读不可变,state可变) 2.componentWillMount ( 在组件挂载到DO 阅读全文
摘要:
函数组件 //1.创建函数式组件 function MyComponent(){ console.log(this); //此处的this是undefined,因为babel编译后开启了严格模式 return <h2>我是用函数定义的组件(适用于【简单组件】的定义)</h2> } //2.渲染组件到 阅读全文
摘要:
相同点 1.都可以描述一个对象或者函数 interface interface People { name: string age: number } interface setPeople { (name:string,age:number):void } type type People = { 阅读全文
摘要:
微信使用本地存储 wx.setStorageSync("system",this.globalData.system); //同步设置值 //判断机型ios 安卓 let system = wx.getStorageSync('system'); //同步获取存储的值 console.log(sys 阅读全文
摘要:
使用vite创建vue3项目 npm install -g create-vite-app //安装全局create-vite-appcreate-vite-app vue3-vite //使用工具create-vite-app创建项目名为vue3-vite的vue3项目cd 01-vue3-vit 阅读全文
摘要:
<%-- 单个权限不显示更多--%> let more = $('.buttonList .btn').length;//获取所有按钮个数 if(more/10<=1){ $('.jurisdiction').each((key,val)=>{ $('.jurisdiction')[key].sty 阅读全文
摘要:
ref、reactive、toRef、toRefs 使用 触发页面更新(ref,reactive) ref : 复制,修改响应式数据不会影响原始数据 ,一次只能定义一个ref响应式数据 let age = ref(20);//响应式数据,ui更新 响应式原理:ref 则是用把数据给包装成 ref 对 阅读全文
摘要:
新系统从头开始安装mySql使用Navicat for MySQL管理数据 1.首先在桌面右击此电脑点击管理(G) 如果出现 参考链接:https://jingyan.baidu.com/article/48a42057270b7aa92425041a.html 寻找mySql服务 如果有直接右键启 阅读全文