会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
lijun12138
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2022年6月9日
render函数拓展
摘要: 1,我们需求<Example :tags="['h1','h2','h3']"></Example>能够生成 <div> <h1>0</h1> <h2>1</h2> <h3>2</h3> </div> 此时我们可以自定义render函数渲染 <script src="./vue.js"></scri
阅读全文
posted @ 2022-06-09 23:46 lijun12138
阅读(41)
评论(0)
推荐(0)
2022年5月30日
vue3在setup中获取异步数据并暴露出去
摘要: 使用生命周期钩子onBeforeMount setup(){ const postData = ref([]) onBeforeMount(async () => { const res = await axios.get('http://localhost:3002/postdata') post
阅读全文
posted @ 2022-05-30 18:52 lijun12138
阅读(1747)
评论(0)
推荐(0)
2022年5月18日
js数组方法splice删除不彻底
摘要: 根据条件去除数组中数据 let arr = [ { id: 1, sex: "1" }, { id: 2, sex: "2" }, { id: 3, sex: "1" }, { id: 4, sex: "1" }, { id: 5, sex: "2" }, { id: 6, sex: "1" },
阅读全文
posted @ 2022-05-18 18:46 lijun12138
阅读(1010)
评论(0)
推荐(0)
webpack5转化es6代码后,立即执行函数依旧是箭头函数
摘要: 如图,里面的代码转化成es5了,但是最外层依旧是es6 我的babel配置 { test: /\.ts$/, exclude: /node_modules/, use: [ { loader: "babel-loader", options: { presets: [ [ "@babel/prese
阅读全文
posted @ 2022-05-18 18:28 lijun12138
阅读(679)
评论(0)
推荐(0)
2022年5月15日
清除 server workers 缓存
摘要: 曾经在3000端口生成了一个server workers 网站,之后每次使用3000端口都是该网站,chrome://serviceworker-internals/ 点击unregister没用 直接清除浏览器设置里的缓存解决
阅读全文
posted @ 2022-05-15 21:29 lijun12138
阅读(518)
评论(0)
推荐(0)
2022年5月14日
vue ssr 实例
摘要: 目录结构 新建项目,npm init -y package.json: { "name": "vue-ssr2", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "build:client": "cro
阅读全文
posted @ 2022-05-14 18:33 lijun12138
阅读(145)
评论(0)
推荐(0)
gridsome安装实例
摘要: 1.先安装sharp镜像源 npm config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp" npm config set sharp_libvips_binary_host "https://npm.taobao.org
阅读全文
posted @ 2022-05-14 17:00 lijun12138
阅读(65)
评论(0)
推荐(0)
2022年5月6日
js使用a标签下载数据
摘要: 通过a标签下载 exportText(ste) { const blob = new Blob([str]) let date=new Date(); const fileName = '下载案例.txt' const link = document.createElement('a') // 创建
阅读全文
posted @ 2022-05-06 23:50 lijun12138
阅读(1267)
评论(0)
推荐(0)
2022年4月28日
checkbox添加圆角
摘要: input[type="checkbox"] { width: 1.64rem; height: 1.64rem; display: inline-block; text-align: center; vertical-align: baseline; line-height: 1.64rem; p
阅读全文
posted @ 2022-04-28 12:10 lijun12138
阅读(316)
评论(0)
推荐(0)
2022年4月19日
webpack性能优化之PWA
摘要: 1.安装插件 workbox-webpack-plugin 并引入webpack.config.js npm i workbox-webpack-plugin -D const WorkboxWebpackPlugin = require('workbox-webpack-plugin'); plu
阅读全文
posted @ 2022-04-19 15:13 lijun12138
阅读(74)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告