上一页 1 ··· 6 7 8 9 10 11 12 下一页

2020年4月28日

react-context 和contextType

摘要: import React, { Component,createContext } from 'react'; const OnLineContext=createContext() //可以传入默认值 const BatteryContext=createContext(90) class Mid 阅读全文

posted @ 2020-04-28 11:34 秃了头也不退休 阅读(392) 评论(0) 推荐(0) 编辑

2020年4月26日

React-多页面应用

摘要: 1初始化项目 npm init create-react-app my-app 2.修改index import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from ' 阅读全文

posted @ 2020-04-26 18:05 秃了头也不退休 阅读(3127) 评论(0) 推荐(0) 编辑

2020年4月24日

vue-网页支付 --支付宝和微信支付

摘要: 1.微信支付 网页的微信支付返回的是一串链接,使用qrcode把链接生成二维码 让客户扫描 import QRCode from 'qrcode'QRCode.toDataURL(res.content) .then(url=>{ console.log(url,'生成的为base64的二维码图片' 阅读全文

posted @ 2020-04-24 17:40 秃了头也不退休 阅读(2352) 评论(0) 推荐(0) 编辑

vue-触底加载更多

摘要: 方法一:插件 vue-infinite-scroll <template> <div> <div class="demo1" v-for="index of count" :key="index"> demo </div> <div v-infinite-scroll="loadMore" infi 阅读全文

posted @ 2020-04-24 17:10 秃了头也不退休 阅读(2887) 评论(1) 推荐(0) 编辑

2020年4月23日

vue-组件之间互相出发事件

摘要: 1.子组件出发父组件事件 子组件触发:@click="$emit('cancel')" 父组件传入:@cancel="showModal=false" 2.父组件触发子组件事件 父组件:<child ref="mychild"></child> this.$refs.mychild.parentHa 阅读全文

posted @ 2020-04-23 10:04 秃了头也不退休 阅读(1534) 评论(0) 推荐(0) 编辑

2020年4月22日

vue-插槽 slot

摘要: 子组件放置 <slot name="body"></slot> 父组件 <template v-slot:body> <p>商品添加成功!</p> </template> 阅读全文

posted @ 2020-04-22 17:16 秃了头也不退休 阅读(183) 评论(0) 推荐(0) 编辑

2020年4月17日

vue-知识点

摘要: 1.设置代理 vue.config.vue module.exports={ devServer:{ host:'localhost', proxy:{ '/api':{ target:'http://mall-pre.springboot.cn', changeOrigin:true, pathR 阅读全文

posted @ 2020-04-17 11:01 秃了头也不退休 阅读(153) 评论(0) 推荐(0) 编辑

2020年4月16日

koa-解决跨域问题

摘要: npm install koa2-cors app.use(cors({ origin:['http://localhost:9528'], credentials:true //证书 })) 阅读全文

posted @ 2020-04-16 09:13 秃了头也不退休 阅读(554) 评论(0) 推荐(0) 编辑

2020年4月15日

微信小程序-koa-获取微信access-token

摘要: const rp=require('request-promise') const APPID='xxxxxxxxx' const AppSecret='xxxxxxxxxxxxxx' const URL=`https://api.weixin.qq.com/cgi-bin/token?grant_ 阅读全文

posted @ 2020-04-15 17:22 秃了头也不退休 阅读(464) 评论(0) 推荐(0) 编辑

koa-创建项目

摘要: 新建文件夹 进入文件夹运行 npm init -y 新建app.js const Koa =require('koa') const app=new Koa() app.use(async(ctx)=>{ ctx.body='Hello world' }) app.listen(6789,()=>{ 阅读全文

posted @ 2020-04-15 17:10 秃了头也不退休 阅读(143) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 下一页

导航