摘要: 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)
摘要: 使用生命周期钩子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)
摘要: 根据条件去除数组中数据 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)
摘要: 如图,里面的代码转化成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)
摘要: 曾经在3000端口生成了一个server workers 网站,之后每次使用3000端口都是该网站,chrome://serviceworker-internals/ 点击unregister没用 直接清除浏览器设置里的缓存解决 阅读全文
posted @ 2022-05-15 21:29 lijun12138 阅读(518) 评论(0) 推荐(0)
摘要: 目录结构 新建项目,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)
摘要: 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)
摘要: 通过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)
摘要: 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)
摘要: 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)