02 2020 档案
摘要:在组件的render函数中遍历数组menus[]并且要return返回虚拟Dom对象。 render() { return createPortal( this.state.visible && <div className={styles.modal}> <div className={style
阅读全文
该文被密码保护。
摘要:下面代码是组件源码: import React, {Component} from 'react' import {createPortal} from 'react-dom' import styles from './modal.css' export default class Modal e
阅读全文
摘要:下面样式设置到父div上: .modal { display: flex; align-items: center; /*竖直居中 垂直居中*/ justify-content: center; /*水平居中*/ }
阅读全文
摘要:The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu 出现这个问题,网上搜索结果为:Chro
阅读全文
摘要:子模块的文件引入父工程对象时,出现红色warning,提示传入的对象类型不是所要求的类型。 思路是父工程引用的JS包和子模块使用的包不是同一个包,解决办法是父工程和子工程都使用同一个包。 resolve: { symlinks: false, /* 1,模块的相对路径的设置 * 2,因为字模块和父目
阅读全文
摘要:Target device: smartisan-yq601-3fa1a5dcInstalling APK: /Users/wangliang/workspace/emm-android/build/outputs/apk/emm-android-debug.apkUploading file to
阅读全文
摘要:解决办法: 添加到受影响的 module build.gradle 中(比如app的gradle文件根代码下) configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> d
阅读全文