摘要:
1.再要做CDN的JS组件库文件的时候要使用 rollup-plugin-external-globals 这个插件,但是不做CDN的时候要关闭注释掉,不然引入插件后可能会报一些依赖库的全局变量未声明的错误,比如Vue is not defined 这样的错误, 建议再打包的时候可以用环境变量控制一 阅读全文
摘要:
再vue2里面做可以这么写: <keep-alive> <router-view></router-view> </keep-alive> 但是报一个警告: vue-router.mjs:35 [Vue Router warn]: <router-view> can no longer be use 阅读全文
摘要:
首先你需要全局安装 nodemon ,然后要做一个launch.json的配置: { "version": "0.2.0", "configurations": [ { "name": "Launch server.js via nodemon", "type": "node", "request" 阅读全文
摘要:
let retArr: any = []; /** * 递归找ID * @param str * @param arr */ const findPId = (str: any, arr = data as any) => { let curPId = str; for (var idx in ar 阅读全文
摘要:
import { message } from 'antd' export function getBlob(url: string): Promise<any> { return new Promise(resolve => { const xhr = new XMLHttpRequest() x 阅读全文
摘要:
代码: let arr = [{name:'白鸽',year:'2022',month:'2'},{name:'麻雀',year:'2022',month:'3'},{name:'白鸽',year:'2022',month:'8'},{name:'大象',year:'2021',month:'9'} 阅读全文
摘要:
上代码: import React, {Component} from 'react' import Pdfh5 from 'pdfh5' import 'pdfh5/css/pdfh5.css' class Index extends Component { constructor(props) 阅读全文
摘要:
flex-shrink 属性指定了 flex 元素的收缩规则。flex 元素仅在默认宽度之和大于容器的时候才会发生收缩,其收缩的大小是依据 flex-shrink 的值。 详见: https://www.runoob.com/cssref/css3-pr-flex-shrink.html align 阅读全文
摘要:
Object.prototype.toString.call() 精准判断对象的类型 其余参考:https://blog.csdn.net/honeymoon_/article/details/120307545 阅读全文
摘要:
antd貌似也可以试着参考一下,代码如下: <Tree className="yige-tree" treeData={treeData} value={selTreeData} defaultValue={selTreeData || []}//回显加载之前选中的数据 multiple expan 阅读全文