会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
青云码上
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
10
下一页
2023年7月14日
BrowserRouter刷新404解决方案
摘要: 1、本地开发环境 在js脚本命令里加上 --history-api-fallback "scripts": { "serve": "webpack serve --config webpack.dev.js --history-api-fallback" } 2、生产环境,可以修改 nglnx 配置
阅读全文
posted @ 2023-07-14 17:37 青云码上
阅读(124)
评论(0)
推荐(0)
2022年8月1日
图片转base64
摘要: 两种方法 第一种 function getBase64(imgUrl) { var canvas = document.createElement('CANVAS'), ctx = canvas.getContext('2d'), img = new Image; img.src = imgUrl;
阅读全文
posted @ 2022-08-01 15:42 青云码上
阅读(139)
评论(0)
推荐(0)
2022年3月10日
vue全屏插件 screenfull
摘要: npm install sreenfull --save import screenfull from ‘screenfull’ <div @click="fullscreen"> 切换全屏 </div> // 全屏切换 fullscreen() { screenfull.toggle(); }
阅读全文
posted @ 2022-03-10 17:32 青云码上
阅读(397)
评论(0)
推荐(0)
2022年2月16日
vue环境常量拓展
摘要: 一个环境文件(如 .env .env.dev .env.prod )只包含环境变量的“键=值”对; 只有 NODE_ENV,BASE_URL 和以 VUE_APP_ 开头的常量将通过 webpack.DefinePlugin 静态地嵌入到客户端侧的代码中, 但我们可以通过修改webpack的配置来让
阅读全文
posted @ 2022-02-16 10:22 青云码上
阅读(199)
评论(0)
推荐(0)
2022年1月18日
移动端H5输入框只能输入数字的最好体验
摘要: 一开始我是这样写的: <input type="number" /> 安卓手机只能输入数字,但是苹果手机还是可以通过切换输入法输入非数字 然后我这样写: <input type="tel" /> 然后苹果手机只能输入数字,但是安卓手机可以输入非数字 所以判断手机是安卓还是IOS来渲染输入框(以下是v
阅读全文
posted @ 2022-01-18 14:59 青云码上
阅读(581)
评论(0)
推荐(0)
2022年1月17日
微信X5内核调试
摘要: 微信X5内核调试第一步debugmm.qq.com/?forcex5=true第二步http://debugtbs.qq.com/第三步http://debugx5.qq.com/
阅读全文
posted @ 2022-01-17 13:09 青云码上
阅读(1622)
评论(0)
推荐(0)
2022年1月6日
mac安装Homebrew和 tree
摘要: 安装 Homebrew 直接复制以下命令安装即可: /bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)" 安装了Homebrew就可以使用 brew 命令了。 安装 tre
阅读全文
posted @ 2022-01-06 14:40 青云码上
阅读(258)
评论(0)
推荐(0)
2021年12月31日
输入框只能输入数字(最好用)
摘要: 原生js <input type="text" oninput="iptEvent(value, event)" placeholder="只能输入数字" /> function iptEvent(value, e) { // 纯数字,不含小数点 e.target.value = value.rep
阅读全文
posted @ 2021-12-31 01:24 青云码上
阅读(300)
评论(0)
推荐(0)
2021年12月21日
vue中 .sync 的作用
摘要: 我们使用 vue 编写弹框组件的时候,想要关闭弹窗时往往会写个关闭的方法,子组件$emit,父组件里还要加 @xxx="xxxxx", 非常的不优雅,现在使用 .sync 就非常方便优雅地控制弹窗显示和隐藏了。 父组件: <myModal :show.sync="modalShow" /> //编译
阅读全文
posted @ 2021-12-21 16:29 青云码上
阅读(1510)
评论(0)
推荐(0)
2021年12月17日
打包 vue 组件为 web-component
摘要: vue build --target wc --name componentName src/components/xxxxxx.vue componentName:web-component 组件名字,自己取src/components/xxxxxx.vue:vue组件路径
阅读全文
posted @ 2021-12-17 13:57 青云码上
阅读(649)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
10
下一页
公告