上一页 1 2 3 4 5 6 7 8 ··· 17 下一页
摘要: 方法 根据设计图和实际情况下的屏幕宽度做对比,自适应倍数 (function () { function resize() { // 设计稿宽度 const designWidth = 1920; // 屏幕宽度 const windowWidth = window.innerWidth; // h 阅读全文
posted @ 2021-07-13 11:54 懒惰ing 阅读(79) 评论(0) 推荐(0) 编辑
摘要: react脚手架创建项目 全局安装 npm install -g create-react-app 切换到想创建的目录,使用命令 create-react-app hello-react 进入项目文件夹 cd hello-react 启动项目 npm start react 脚手架项目目录 publ 阅读全文
posted @ 2021-07-09 00:19 懒惰ing 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 需求 当消息超出内容区域时滚动显示 方法 当消息内容超出总内容区域时添加一个与当前消息内容一摸一样的 dom 元素 将总内容区域的 overflow 设置为 hidden,隐藏多余内容 然后控制总内容区域的 scrollTop 来向上轮播 然后当总内容区域的 scrollTop 大于第二个 dom 阅读全文
posted @ 2021-07-08 14:37 懒惰ing 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 需求 创建一个表单组件然后提交 非受控组件 现用现取 class Login extends React.Component { // 表单提交 handleSubmit = () => { const {username, password} = this; alert(`你输入的用户名是:${u 阅读全文
posted @ 2021-07-08 00:17 懒惰ing 阅读(66) 评论(0) 推荐(0) 编辑
摘要: React 三大组件核心属性之 refs 与事件处理 需求: 两个输入框中间又一个按钮 点击按钮提示左侧输入框数据 右侧输入框失去焦点提示数据 字符串形式的 ref 在元素中添加 ref 属性会添加到组件实例的 refs 中 class MyComponent extends React.Compo 阅读全文
posted @ 2021-07-04 21:59 懒惰ing 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 从vue-element-admin复制文件: vue-admin-template\src\layout\components\TagsView 文件夹 vue-admin-template\src\store\modules\tagsView.js vue-admin-template\src\ 阅读全文
posted @ 2021-07-03 19:54 懒惰ing 阅读(1796) 评论(0) 推荐(0) 编辑
摘要: downloadlink(){ let x = new XMLHttpRequest(); x.open("GET", url, true); x.responseType = "blob"; x.onload = function (e) { const url = window.URL.crea 阅读全文
posted @ 2021-07-03 19:03 懒惰ing 阅读(1172) 评论(0) 推荐(0) 编辑
摘要: git pull origin master --allow-unrelated-histories 上面的命令是将远程库和本地库同步,接下来就好办了,只需要将提交的步骤重复一边就可以了。 git add .//添加到队列 git commit -m “提交描述” //将队列提交到本地缓存 git 阅读全文
posted @ 2021-06-24 23:17 懒惰ing 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 每个组件都有会有自己的 props(properties)属性 组件标签的所有属性都保存在 props 中 通过标签属性从组件外向组件内传递变化的数据 模拟需求 自定义用来显示一个人员信息的组件 姓名必须指定, 且为字符串类型 性别为字符串类型,如果性别没有指定,默认为男 年龄必须指定,且为数字类型 阅读全文
posted @ 2021-03-21 21:03 懒惰ing 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 构造字面量对象时使用展开语法 将已有对象的所有可枚举 (enumerable) 属性拷贝到新构造的对象中 浅拷贝 (Shallow-cloning, 不包含 prototype) 和对象合并, 可以使用更简短的展开语法。而不必再使用 Object.assign() 方式 var obj1 = { f 阅读全文
posted @ 2021-03-17 15:46 懒惰ing 阅读(108) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 17 下一页