![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
它经不起推敲的
你每一次想要努力的瞬间都是未来的你向你现在的你发出的求救!
展开
-
微前端乾坤项目vue集成子系统流程
【代码】微前端乾坤项目vue集成子系统流程。原创 2024-01-15 14:08:37 · 579 阅读 · 0 评论 -
报错Could not fetch metadata for @hydee/sass-mixins@git+ssh://git@yxtgit.hxyxt.com:frontend
去掉ssh的密码。原创 2024-01-04 18:18:25 · 846 阅读 · 0 评论 -
swift界面初体验
【代码】swift界面初体验。原创 2023-10-09 16:15:47 · 340 阅读 · 0 评论 -
react 数组中加入10条数据,使它视图只更新最新10条,旧数据视图不变
chatList 数据数组,items新的10条数据。原创 2023-04-27 22:26:49 · 125 阅读 · 0 评论 -
react hooks的useContext使用
【代码】react hooks的useContext使用。原创 2023-03-07 18:21:35 · 79 阅读 · 0 评论 -
判断首页是否是从小程序外部进入(微信小程序)
在广告页本地存储下进入类型,没有广告页可以写一个空页面。注意: uni.switchTab不能通过url传参。首页生命周期中判断下。原创 2023-01-05 15:47:20 · 231 阅读 · 0 评论 -
解决微信小程序视频加载过多黑屏问题
【代码】解决微信小程序视频加载过多黑屏问题。原创 2023-01-03 11:39:20 · 1744 阅读 · 0 评论 -
position: fixed设置z-index不能覆盖之前的
b是a的子孙节点,a与c同级。设置b的style为position: fixed;则”,这个从父原则,其实就相当于是同级的dom元素会先比较层级先后,然后在一个元素内部会再依次逐层比较层级先后。原创 2023-01-03 11:04:08 · 456 阅读 · 0 评论 -
通过接口拿到当前用户的位置(高德地图)
高德地址:https://lbs.amap.com/api/webservice/guide/api/ipconfig。原创 2022-12-29 17:31:42 · 536 阅读 · 0 评论 -
uniapp接入谷歌地图,混合原生代码开发
【代码】uniapp接入谷歌地图,混合原生代码开发。原创 2022-11-28 17:51:48 · 980 阅读 · 0 评论 -
uniapp接入谷歌导航功能
导航原创 2022-11-12 16:49:07 · 463 阅读 · 0 评论 -
MiniProgramError TypeError: Cannot set properties of undefined (setting ‘_iconfont_svg_string_373130
打开微信小程序体验版显示空白原创 2022-10-30 12:59:27 · 1346 阅读 · 0 评论 -
前端导出excel
【代码】前端导出excel。原创 2022-10-11 08:21:19 · 101 阅读 · 0 评论 -
The value of the ‘Access-Control-Allow-Credentials‘ header in the response is ‘‘ which must be ‘true
node的app.js设置下请求头为具体域名,Credentials设为true。原创 2022-10-10 21:09:54 · 1835 阅读 · 0 评论 -
TypeError: Cannot read properties of undefined (reading ‘push‘) ——原因react history.push组件中没有history
2、通过注册了路由的页面传到组件中。1、使用withRouter解决。原创 2022-10-10 19:59:27 · 909 阅读 · 1 评论 -
elementUi实现table列表动态列(table列数不固定)
动态列表原创 2022-06-19 15:14:29 · 1407 阅读 · 0 评论 -
H5接入微信支付宝支付,超简单
支付宝支付 uni.$u.http.get('/api/pay/h5/spend', { data: { myOrderNum: myOrderNum } }).then(res => { // 将接口返回的form表单显示到页面 document.querySelector('body').innerHTML = res; // 调用submit方法 document.forms[0].submit() })打印后端返回的res为<原创 2022-04-10 15:27:03 · 5102 阅读 · 0 评论 -
解决svn中commit感叹号
执行回滚操作原创 2022-04-04 00:32:20 · 384 阅读 · 0 评论 -
uniapp uview-ui退出登录后重新登录token不是最新的解决方案
找到修改文件位置,加上这一行代码globalsConfig.header = {...globalsConfig.header, 'Login-Allow-Token': uni.getStorageSync('token')};原创 2022-04-03 21:08:44 · 476 阅读 · 0 评论 -
uniapp多语言的使用
lang文件夹下的index.jsimport Vue from 'vue'import VueI18n from 'vue-i18n'import English from './en'import Portuguese from './Portuguese'import Indonesian from './Indonesian'import Korea from './Korea'import German from './German'import Japanese from './原创 2022-03-20 15:41:38 · 882 阅读 · 0 评论 -
uniapp全局变量的使用
app.vue中export default { globalData: { $i18n: { locale: 'English' }, $t: {} }, onLaunch: function() { this.globalData.$i18n = this.$i18n this.globalData.$t = str => this.$t(str) console.log('App Launch') }, onShow: fun原创 2022-03-20 15:10:55 · 1275 阅读 · 0 评论 -
vue请求拦截器和响应器
main.js中// 引入请求封装require('./util/request/index')(app)index.js中module.exports = (vm) => { require('./requestInterceptors')(vm) require('./responseInterceptors')(vm)}requestInterceptors.js中/** * 请求拦截 * @param {Object} http */module.ex原创 2022-03-12 20:44:47 · 1270 阅读 · 0 评论 -
svn删除远程文件和忽略文件
先windows+r调出命令窗口再粘贴上vpn地址,进入到远程找到想删除的文件,右键,点击delete就删除了找到要忽略的文件,右键按下图操作原创 2022-03-12 20:22:13 · 631 阅读 · 0 评论 -
node中间件简易使用
const http = require('http');const express = require('express');const bodyParser = require('body-parser');const app = express();app.use(bodyParser.urlencoded({extended: false}));app.use('add-product', (req, res, next) => { res.send('<div原创 2022-03-06 15:51:12 · 137 阅读 · 0 评论 -
事件环,任务队列,js执行机制总结
await 后面接的代码为同步代码 下一行代码为异步代码 async function a() { await b; console.log(3); } function b() { console.log(2); } a(); console.log(1); // 打印结果为 1,2 ,3 // 改造成promise为 function a() { new Promise((resolve, reject) => { func.原创 2022-03-06 14:06:31 · 113 阅读 · 0 评论 -
Nuxt.js制作官网,要点记录(更利于seo)
构建nuxt工程项目:npx create-nuxt-app text。nuxt.js不用配置路由,根据pages文件夹目录进行生成。页面跳转:this.$router.push(’/users/’)。公共模块:layouts目录下的文件,default.vue是默认文件,不用注册,其他文件要注册(layout:文件名);使用:<Nuxt />。动态页面:文件夹名加_文件夹名,如_id,参数接收($router.params.id)。模块应用:user.vue中写入组件<nux.原创 2022-02-27 15:03:16 · 1322 阅读 · 0 评论 -
在微信环境中,H5跳转到小程序指定页面
先在微信小程序后台生成小程序地址:再在H5页面跳转就行了原创 2022-02-17 21:32:56 · 1405 阅读 · 0 评论 -
限制element UI el-select输入内容的长度
<el-select v-model="item.couponRandomId" filterable :id="`searchSelect${index}`" remote reserve-keyword placeholder="请输入" ref="s...原创 2021-12-23 14:57:41 · 4074 阅读 · 1 评论 -
element ui动态验证表单数据
<div class="goods" v-for="(item, index) in editForms.list" :key="index"> <el-form-item :label="'奖励时长'" :prop="'list.' + index + '.rewardDuration'" :rules="[ { ...原创 2021-12-23 14:48:21 · 210 阅读 · 0 评论 -
微信小程序后端websocket推流二进制文件转换成base64显示图片
//与socket建立连接 connectStart() { ws = wx.connectSocket({ url: 'ws://192.168.211.25:9300', success: (res) => { console.log(res) }, fail: (err) => { wx.showToast({ title: '网络异常!', }) c原创 2021-12-23 14:38:24 · 1211 阅读 · 0 评论 -
css:解决position: relative定位top设为负数后出现的空白
帮top属性改为margin-top原创 2021-10-29 13:53:39 · 2180 阅读 · 3 评论 -
js判断H5页面处于app环境还是浏览器环境
我们对比app环境和浏览器环境的navigator.userAgent,可以发现它们几乎一致,并不能通过它来区分。解决方案:由于在app内部要传参数给安卓和ios,app定义了相应的方法来接收数据,我们就可以通过是否有对应的方法来判断。 const u = navigator.userAgent, isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), isAndroid = u.indexOf('Android') > -1 || u.原创 2021-10-20 16:40:01 · 6727 阅读 · 0 评论 -
JSON.stringify中你不知道的大坑
let res = JSON.stringify({ a: undefined, b: null, c: function(){}, d: false, e: NaN, f: Infinity, g: { name: '小雨雨' }, h: Symbol('foo') }) console.log(res) // {"b":null,"d":false,"e":null,"f":null,"g":{"name":"小雨雨"}} // undefined, 函原创 2021-10-11 15:39:56 · 494 阅读 · 0 评论 -
手写iterator(迭代器)
function myIterator(arr){ let index = 0; return { next: function(){ if(index < arr.length){ return { value: arr[index++], done: false } }else{ return { value: undefined, done: true } } }原创 2021-10-11 15:06:26 · 236 阅读 · 0 评论 -
el-table通过id回显多选框
this.$nextTick(() => { tableData.forEach((row) => { this.$refs.datalist.toggleRowSelection(this.tableData.find(item => { return row.id=== item.id })) }) })原创 2021-09-14 19:41:06 · 796 阅读 · 0 评论 -
判断当前环境是QQAPP还是QQ浏览器
正则匹配var ua = navigator.userAgent.toLowerCase(); if(ua.match(/QQ\/[0-9]/i)){ //QQAPP }else if (ua.indexOf('MQQBrowser') > -1){ //QQ浏览器 }原创 2021-08-27 20:07:53 · 350 阅读 · 0 评论 -
js通过XMLHttpRequest.getResponseHeader(“xxx“) 获取到的为null
原因是由于跨域了,解决了跨域就可以了。解决跨域的方式有:1,jsonp2,配置请求头3,设置跨域代理proxy4.CORS解决跨域原创 2021-07-27 14:59:36 · 817 阅读 · 0 评论 -
手写vue源码 v-if,v-show,@click,数据改变视图变化(简化版)
var Vue = (function(){ var Vue = function (option) { //生命周期 this.recycleFns = { beforCreate: option.beforCreate.bind(this), created: option.created.bind(this), beforMount: option.beforMount.bind(this), mounted: option.mounted.bind(t原创 2021-07-16 18:13:19 · 333 阅读 · 0 评论 -
用ES6新语法实现去重(reduce和Set)
1.reduce加find去重const arr = [1,3,2,4,5,2,1,3]; const res = arr.reduce((prv,cur) => { if(!prv.find(v => v === cur)){ // prv.push(cur) // return prv return [...prv,cur] } return prv; },[])原创 2021-06-27 17:50:33 · 192 阅读 · 0 评论 -
js原生深入,手写常见的几种继承方式
原型链继承function Parent() { this.name = '小头' } function Child() { this.age = 6; } const rest = new Parent(); Child.prototype = rest; const res = new Child(); console.log(res.name) //小头缺点:当继承的属性有引用值时,改变后,父子中这个属性都会变化看下面例子:function Pa.原创 2021-06-27 17:43:51 · 264 阅读 · 0 评论