上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 60 下一页
摘要: 使用webpack提供的 asset/resource 做图片的打包处理,但是只能识别css中的路径,如: .title { color: red; background: url('/src/assets/imgs/456.jpeg'); width: 100%; height: 100vh; } 阅读全文
posted @ 2022-08-20 16:53 洛晨随风 阅读(401) 评论(0) 推荐(0)
摘要: 在编写node 自定义的一些脚本命令的时候,使用 npm link打开bin的执行文件,本意是要执行执行文件里面的内容,却发现最后文件本身被打开了,后来发现是要做一个声明再执行文件头部,例如: #!/usr/bin/env node // 我们对于创建等命令的设定以及一些交互流程等都会在这个入口文件 阅读全文
posted @ 2022-08-19 11:48 洛晨随风 阅读(133) 评论(0) 推荐(0)
摘要: 最近再自制搭建一个脚手架,用这个库出现了两个错误,分别谈一下解决方案: 1.Error: 'git clone' failed with status 128 解决:地址要保证使用的是https模式,地址加前缀,例如: direct:https://github.com/luochenLing/XX 阅读全文
posted @ 2022-08-19 11:25 洛晨随风 阅读(1197) 评论(0) 推荐(0)
摘要: 1.再要做CDN的JS组件库文件的时候要使用 rollup-plugin-external-globals 这个插件,但是不做CDN的时候要关闭注释掉,不然引入插件后可能会报一些依赖库的全局变量未声明的错误,比如Vue is not defined 这样的错误, 建议再打包的时候可以用环境变量控制一 阅读全文
posted @ 2022-08-17 17:33 洛晨随风 阅读(4769) 评论(0) 推荐(0)
摘要: 再vue2里面做可以这么写: <keep-alive> <router-view></router-view> </keep-alive> 但是报一个警告: vue-router.mjs:35 [Vue Router warn]: <router-view> can no longer be use 阅读全文
posted @ 2022-08-14 18:35 洛晨随风 阅读(915) 评论(0) 推荐(0)
摘要: 首先你需要全局安装 nodemon ,然后要做一个launch.json的配置: { "version": "0.2.0", "configurations": [ { "name": "Launch server.js via nodemon", "type": "node", "request" 阅读全文
posted @ 2022-08-13 12:14 洛晨随风 阅读(388) 评论(0) 推荐(0)
摘要: let retArr: any = []; /** * 递归找ID * @param str * @param arr */ const findPId = (str: any, arr = data as any) => { let curPId = str; for (var idx in ar 阅读全文
posted @ 2022-08-11 17:19 洛晨随风 阅读(843) 评论(0) 推荐(0)
摘要: import { message } from 'antd' export function getBlob(url: string): Promise<any> { return new Promise(resolve => { const xhr = new XMLHttpRequest() x 阅读全文
posted @ 2022-07-29 11:31 洛晨随风 阅读(587) 评论(0) 推荐(0)
摘要: 代码: let arr = [{name:'白鸽',year:'2022',month:'2'},{name:'麻雀',year:'2022',month:'3'},{name:'白鸽',year:'2022',month:'8'},{name:'大象',year:'2021',month:'9'} 阅读全文
posted @ 2022-07-28 18:09 洛晨随风 阅读(1050) 评论(0) 推荐(0)
摘要: 上代码: import React, {Component} from 'react' import Pdfh5 from 'pdfh5' import 'pdfh5/css/pdfh5.css' class Index extends Component { constructor(props) 阅读全文
posted @ 2022-06-16 18:09 洛晨随风 阅读(525) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 60 下一页