上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页
摘要: 一、js 判断 根据浏览器ua判断当前是否为移动设备: middleware中间件执行流程顺序: 1、nuxt.config.js 2、匹配布局 3、匹配页面 项目根目录下新建 middleware 文件夹,新建 midd.js 文件 export default function ({ isSer 阅读全文
posted @ 2023-03-20 10:25 DL·Coder 阅读(1059) 评论(0) 推荐(0) 编辑
摘要: 一、 使用 middleware 判断(推荐) 根据浏览器ua判断当前是否为移动设备: middleware中间件执行流程顺序: 1、nuxt.config.js 2、匹配布局 3、匹配页面 项目根目录下新建 middleware 文件夹,新建 midd.js 文件 export default f 阅读全文
posted @ 2023-03-17 16:57 DL·Coder 阅读(695) 评论(0) 推荐(0) 编辑
摘要: 传送门:https://juejin.cn/post/6956456779761303560 传送门:https://www.jianshu.com/p/fba791ce8c4c 阅读全文
posted @ 2023-02-20 14:00 DL·Coder 阅读(13) 评论(0) 推荐(0) 编辑
摘要: <span type="par">【背景切换】</span> span[type] { font-size: 13px; } span[type='par'] { color: #e05c69; background-color: #e1f1fa; .modify; } span[type='wor 阅读全文
posted @ 2023-02-10 13:25 DL·Coder 阅读(57) 评论(0) 推荐(0) 编辑
摘要: // 替换 html 特殊字符 export function replaceHtmlSymbol(html) { if (html == null) { return '' } return html.replace(/</gm, '&lt;') .replace(/>/gm, '&gt;') . 阅读全文
posted @ 2023-02-07 15:33 DL·Coder 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 初始化 Map,在创建的同时初始化实例,可以给 Map 构造函数传入一个可迭代对象,需要包含键/值对数组。 // 使用嵌套数组初始化映射 const m1 = new Map([ ["key1", "val1"], ["key2", "val2"], ["key3", "val3"] ]); ale 阅读全文
posted @ 2023-02-07 09:22 DL·Coder 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 1.手动切换 export const BASE_URL = 'http://codercba.com:9002' // export const BASE_URL = 'http://codercba.prod:9002' export const TIME_OUT = 10000 2.依赖当前环 阅读全文
posted @ 2023-02-01 21:45 DL·Coder 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 集成公共状态管理插件 @reduxjs/toolkit react-redux redux-persist store 之 index.ts 代码 import { configureStore } from '@reduxjs/toolkit' import { useSelector, Type 阅读全文
posted @ 2023-01-31 15:26 DL·Coder 阅读(593) 评论(0) 推荐(0) 编辑
摘要: 解决方法:把 CRLF 切换成 LF windows 下运行命令 git config --global core.autocrlf false 具体解释见传送门; 传送门:https://juejin.cn/post/7051785683089752100 阅读全文
posted @ 2023-01-02 11:00 DL·Coder 阅读(402) 评论(0) 推荐(0) 编辑
摘要: clientX 鼠标相对于浏览器(这里说的是浏览器的有效区域)左上角x轴的坐标; 不随滚动条滚动而改变; clientY 鼠标相对于浏览器(这里说的是浏览器的有效区域)左上角y轴的坐标; 不随滚动条滚动而改变; pageX 鼠标相对于浏览器(这里说的是浏览器的有效区域)左上角x轴的坐标; 随滚动条滚 阅读全文
posted @ 2022-12-29 13:53 DL·Coder 阅读(129) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页