摘要: 安装依赖 npm install -D babel-loader @babel/core @babel/preset-env Loader 配置 webpack.config.js module: { rules: [ { test: /\.js$/, exclude: /node_modules/ 阅读全文
posted @ 2022-04-18 23:35 lijun12138 阅读(253) 评论(0) 推荐(0)
摘要: 下载相关包 npm i eslint eslint-config-airbnb-base eslint-plugin-import -D 并在 package.json中配置添加 "eslintConfig": { "extends": "airbnb-base" } 在webpack中配置 esl 阅读全文
posted @ 2022-04-18 23:19 lijun12138 阅读(273) 评论(0) 推荐(0)
摘要: 开启三个服务,nav,home,common 1:nav的webpack.config.js配置 const HtmlWebpackPlugin = require('html-webpack-plugin') const {ModuleFederationPlugin} = require('we 阅读全文
posted @ 2022-04-13 20:23 lijun12138 阅读(100) 评论(0) 推荐(0)
摘要: 1:安装相关插件 npm i css-loader style-loader postcss-loader autoprefixer postcss-nested -D 2:webpack.config.js配置 { test:/\.css$/, use:[ 'style-loader', { lo 阅读全文
posted @ 2022-04-12 22:46 lijun12138 阅读(234) 评论(0) 推荐(0)
摘要: 出现该问题是没有安装vue-template-compiler,安装之后就可以了, 对于版本问题需要注意 阅读全文
posted @ 2022-04-09 15:36 lijun12138 阅读(514) 评论(0) 推荐(0)
摘要: 'rules': {'import/newline-after-import': 'off','no-param-reassign': 'off','space-before-function-paren': 'off','object-curly-spacing': 'off','block-sp 阅读全文
posted @ 2022-04-09 15:14 lijun12138 阅读(300) 评论(0) 推荐(0)
摘要: 配置是这样的 getFormmatter一直找也没有找到,最后通过降低eslint版本再webpack成功编译 阅读全文
posted @ 2022-04-09 15:10 lijun12138 阅读(778) 评论(0) 推荐(0)
摘要: 实现原理: 将页面需要生成图片内容截图,然后赋值给a标签的href,再通过a标签提供的下载功能 1.引入插件:html2canvas <script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.js"></scri 阅读全文
posted @ 2022-03-14 22:41 lijun12138 阅读(1637) 评论(0) 推荐(0)
摘要: 代码: <script> //数组遍历 let arr = ["a", "b", "c"]; arr[3] = "d"; for (let item in arr) { console.log(item); } //结果 0 1 2 3 for (let item of arr) { console 阅读全文
posted @ 2022-02-24 20:50 lijun12138 阅读(190) 评论(0) 推荐(0)
摘要: 实现此类效果:(flex) 代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name= 阅读全文
posted @ 2022-02-24 00:57 lijun12138 阅读(60) 评论(0) 推荐(0)