<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Huang_John的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Huang_John</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Huang_John]]></copyright><item><title><![CDATA[npm install 报错：FetchError: request to https://registry.npmjs.org/safer-buffer failed]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/141191863</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/141191863</guid><author>Huang_John</author><pubDate>Wed, 14 Aug 2024 15:17:14 +0800</pubDate><description><![CDATA[如果是浏览器可以访问到对应的地址，那么就是npm的proxy代理配置有问题，可以这样设置。如果返回都为null，则设置成功，而后在清理一下npm的缓存。而后运行npm install 可以查看具体错误信息。设置完之后查看是否返回都为null。在设置一下npm的调试。]]></description><category></category></item><item><title><![CDATA[年终奖退回上热搜了，可是我还在火上烤（转）]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/136244322</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/136244322</guid><author>Huang_John</author><pubDate>Thu, 22 Feb 2024 22:29:07 +0800</pubDate><description><![CDATA[你觉得公司对员工的这种做法合理吗，该程序员又应该怎么应对公司的这种做法呢，请在评论区留下你的看法。]]></description><category></category></item><item><title><![CDATA[uni-app + mui-player & vue + mui-player 播放flv文件]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/133687700</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/133687700</guid><author>Huang_John</author><pubDate>Sun, 08 Oct 2023 18:37:41 +0800</pubDate><description><![CDATA[其它都差不多，直接上代码。]]></description><category></category></item><item><title><![CDATA[微信公众号以及企微第三方应用开发必备的小工具]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/130245078</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/130245078</guid><author>Huang_John</author><pubDate>Wed, 19 Apr 2023 15:23:56 +0800</pubDate><description><![CDATA[vConsole，项目里面安装这个vConsole，然后打开就可以愉快的查看控制台了。有个很好用的工具，可以在移动端查看控制台，跟小程序的下面的那个调试模式有点类似。]]></description><category></category></item><item><title><![CDATA[autox如何用夜神模拟器连接vscode进行调试]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/129701020</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/129701020</guid><author>Huang_John</author><pubDate>Wed, 22 Mar 2023 01:15:40 +0800</pubDate><description><![CDATA[而后，先不着急连接电脑，autoX要在防火墙设置端口放行，端口号是固定的9317，重点来了，在你的windows中搜索防火墙。以上为夜神模拟器上autoX链接vscode方法，试过用雷电的，应该是模拟器没有配置好，没有链接成功过。如果vscode上出现如下文字，那么恭喜你说明已经链接成功，可以本地用模拟器调试了。然后一直点下一步，最后会弹出来让你命名规则，自己随便命名就好了。弹出输入框后，输入刚刚vscode上autox的服务运行地址。再到输入框内输入9317端口号，其他不用改，点下一步。]]></description><category></category></item><item><title><![CDATA[Mac如何打开企业微信内置浏览器控制台]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/128202184</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/128202184</guid><author>Huang_John</author><pubDate>Tue, 06 Dec 2022 14:13:05 +0800</pubDate><description><![CDATA[Mac打开企业微信内置浏览控制台]]></description><category></category></item><item><title><![CDATA[企业微信第三方应用添加好友]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/128200738</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/128200738</guid><author>Huang_John</author><pubDate>Tue, 06 Dec 2022 12:26:27 +0800</pubDate><description><![CDATA[企业微信第三方应用直接打开添加好友界面]]></description><category></category></item><item><title><![CDATA[ant design vue table 表格设置了表头固定后单元格被遮挡（笔记）]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/126103920</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/126103920</guid><author>Huang_John</author><pubDate>Mon, 01 Aug 2022 16:21:28 +0800</pubDate><description><![CDATA[antdv table表格被遮挡]]></description><category></category></item><item><title><![CDATA[vue foreach某条数据异常跳出循环]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/124981311</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/124981311</guid><author>Huang_John</author><pubDate>Thu, 26 May 2022 11:31:18 +0800</pubDate><description><![CDATA[vue forEach中以下这种方式是无法跳出循环的，return只是结束当前这次，而后会继续下一次的循环
array.forEach(item =&gt;{
	if (item.id == 0) {
	return
})

那我们再看看用break
array.forEach(item =&gt;{
	if (item.id == 0) {
	break
})

咋回事，控制台怎么报错了？！
用try-catch-finally吧，这个语法是js标准的处理异常的方式写法如下：
let array = [0]]></description><category></category></item><item><title><![CDATA[js 数组去重]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/124376469</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/124376469</guid><author>Huang_John</author><pubDate>Sun, 24 Apr 2022 10:16:24 +0800</pubDate><description><![CDATA[过滤器里写
export function uniqueArray(array, key) {
    var result = [array[0]];
    for (var i = 1; i &lt; array.length; i++) {
        var item = array[i];
        var repeat = false;
        for (var j = 0; j &lt; result.length; j++) {
            if (item[]]></description><category></category></item><item><title><![CDATA[金额数字分割]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/124376404</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/124376404</guid><author>Huang_John</author><pubDate>Sun, 24 Apr 2022 10:14:11 +0800</pubDate><description><![CDATA[全局过滤器里面写
export function moneyNum(nStr) {
    nStr += ''; // 数字转换为字符 
    let x = nStr.split('.'); // 按照小数点分隔
    let x1 = x[0]; // 整数部分
    let x2 = x.length &gt; 1 ? '.' + x[1] : ''; // 小数部分
    var rgx = /(\d+)(\d{3})/; // 正则式定义
    while (rgx.test(x1))]]></description><category></category></item><item><title><![CDATA[vue数字转大写]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/124376349</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/124376349</guid><author>Huang_John</author><pubDate>Sun, 24 Apr 2022 10:12:34 +0800</pubDate><description><![CDATA[写在全局过滤器里面
export function convertCurrency(money) {
    // 汉字的数字
    let cnNums = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
    // 基本单位
    let cnIntRadice = ['', '拾', '佰', '仟'];
    // 对应整数部分扩展单位
    let cnIntUnits = ['', '万', '亿', '兆'];
    // 对]]></description><category></category></item><item><title><![CDATA[正则校验手机号和座机]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/124376270</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/124376270</guid><author>Huang_John</author><pubDate>Sun, 24 Apr 2022 10:09:42 +0800</pubDate><description><![CDATA[let reg = /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/
reg.test(value)


]]></description><category></category></item><item><title><![CDATA[vue 页面刷新vuex清空处理]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/122967897</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/122967897</guid><author>Huang_John</author><pubDate>Wed, 16 Feb 2022 17:14:26 +0800</pubDate><description><![CDATA[将vuex中的数据缓存到浏览器即可保证刷新页面vuex不回被清空
首先缓存state中的数据，在app.vue中添加
mounted中添加监听unload事件，当页面刷新的时候缓存数据：
 window.addEventListener('unload', this.saveState)

method中添加方法：
saveState() {
      sessionStorage.setItem('state', JSON.stringify(this.$store.state))
    }

在st]]></description><category></category></item><item><title><![CDATA[Vue 项目环境变量的配置和使用方法]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/122472724</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/122472724</guid><author>Huang_John</author><pubDate>Thu, 13 Jan 2022 14:22:09 +0800</pubDate><description><![CDATA[node.js环境变量使用]]></description><category></category></item><item><title><![CDATA[echart 按需引入]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/122378300</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/122378300</guid><author>Huang_John</author><pubDate>Sat, 08 Jan 2022 12:01:09 +0800</pubDate><description><![CDATA[npm install echarts

在main.js中引入
let echarts = require('echarts/lib/echarts')  //echart基础配置，必须引入
require('echarts/lib/component/tooltip')  //echart基础配置，必须引入
require('echarts/lib/component/title')  //echart基础配置，必须引入
require('echarts/lib/component/grid')  //]]></description><category></category></item><item><title><![CDATA[element 按需加载]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/122378260</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/122378260</guid><author>Huang_John</author><pubDate>Sat, 08 Jan 2022 11:58:47 +0800</pubDate><description><![CDATA[npm install element-ui

再main.js文件添加需要用到的组件
import {
  Message,
  Tabs,
} from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'; //引入样式文件
// 注意，message这个组件不要Vue.use,不然进入页面会有个空弹窗
Vue.use(Tabs)


...]]></description><category></category></item><item><title><![CDATA[vue 页面添加水印并在浏览器不能去除]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/122348989</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/122348989</guid><author>Huang_John</author><pubDate>Thu, 06 Jan 2022 17:38:07 +0800</pubDate><description><![CDATA[创建watermark.js文件
let watermark = {}

let setWatermark = (str) =&gt; {
    let id = '1.23452384164.123412416';

    if (document.getElementById(id) !== null) {
        document.body.removeChild(document.getElementById(id));
    }

    // 创建一个画布
    let can ]]></description><category></category></item><item><title><![CDATA[mac npm install ** -g报错问题]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/120973045</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/120973045</guid><author>Huang_John</author><pubDate>Tue, 26 Oct 2021 15:24:15 +0800</pubDate><description><![CDATA[权限问题：
打开命令行，输入如下代码，然后提示输入密码，将电脑密码输入进去就好了
sudo chown -R $(whoami) /usr/local/*


]]></description><category></category></item><item><title><![CDATA[webpack 前端性能优化----css篇]]></title><link>https://blog.youkuaiyun.com/Huang_John/article/details/120353966</link><guid>https://blog.youkuaiyun.com/Huang_John/article/details/120353966</guid><author>Huang_John</author><pubDate>Fri, 17 Sep 2021 18:07:56 +0800</pubDate><description><![CDATA[webpack将css打包成独立文件
webpack.config.js如下配置：
需要用到mini-css-extract-plugin，安装
npm install mini-css-extract-plugin

在webpack中引入
const MiniCssExtractPlugin = require('mini-css-extract-plugin')

在module选项中使用mini-css-extract-plugin
rules:[
	{
		test:/\.css$/,	  //正]]></description><category></category></item></channel></rss>