会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
懒惰ing
如果不是生活所迫,谁愿意把自己逼得一身才华
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
18
下一页
2021年7月14日
Vue 新页面打开的方法
摘要: 将页面配置到路由 let routeData = this.$router.resolve({ name: "detail", query: {goodsId:'1111'} }); window.open(routeData.href, '_blank');
阅读全文
posted @ 2021-07-14 11:59 懒惰ing
阅读(211)
评论(0)
推荐(0)
2021年7月13日
rem 自适应大屏幕
摘要: 方法 根据设计图和实际情况下的屏幕宽度做对比,自适应倍数 (function () { function resize() { // 设计稿宽度 const designWidth = 1920; // 屏幕宽度 const windowWidth = window.innerWidth; // h
阅读全文
posted @ 2021-07-13 11:54 懒惰ing
阅读(90)
评论(0)
推荐(0)
2021年7月9日
React 创建项目和目录介绍
摘要: 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
阅读(305)
评论(0)
推荐(0)
2021年7月8日
原生消息轮播滚动
摘要: 需求 当消息超出内容区域时滚动显示 方法 当消息内容超出总内容区域时添加一个与当前消息内容一摸一样的 dom 元素 将总内容区域的 overflow 设置为 hidden,隐藏多余内容 然后控制总内容区域的 scrollTop 来向上轮播 然后当总内容区域的 scrollTop 大于第二个 dom
阅读全文
posted @ 2021-07-08 14:37 懒惰ing
阅读(182)
评论(0)
推荐(0)
React 受控组件和非受控组件
摘要: 需求 创建一个表单组件然后提交 非受控组件 现用现取 class Login extends React.Component { // 表单提交 handleSubmit = () => { const {username, password} = this; alert(`你输入的用户名是:${u
阅读全文
posted @ 2021-07-08 00:17 懒惰ing
阅读(76)
评论(0)
推荐(0)
2021年7月4日
React 三大组件核心属性之 refs 与时间处理
摘要: React 三大组件核心属性之 refs 与事件处理 需求: 两个输入框中间又一个按钮 点击按钮提示左侧输入框数据 右侧输入框失去焦点提示数据 字符串形式的 ref 在元素中添加 ref 属性会添加到组件实例的 refs 中 class MyComponent extends React.Compo
阅读全文
posted @ 2021-07-04 21:59 懒惰ing
阅读(95)
评论(0)
推荐(0)
2021年7月3日
vue-admin-template模板添加 tagsview
摘要: 从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
阅读(1900)
评论(0)
推荐(0)
js创建a标签下载download属性不起作用
摘要: 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
阅读(1254)
评论(0)
推荐(0)
2021年6月24日
GIT提交的时候出现 ! [rejected] master -> master (non-fast-forward)错误
摘要: git pull origin master --allow-unrelated-histories 上面的命令是将远程库和本地库同步,接下来就好办了,只需要将提交的步骤重复一边就可以了。 git add .//添加到队列 git commit -m “提交描述” //将队列提交到本地缓存 git
阅读全文
posted @ 2021-06-24 23:17 懒惰ing
阅读(136)
评论(0)
推荐(0)
2021年3月21日
React 三大组件核心属性之 props
摘要: 每个组件都有会有自己的 props(properties)属性 组件标签的所有属性都保存在 props 中 通过标签属性从组件外向组件内传递变化的数据 模拟需求 自定义用来显示一个人员信息的组件 姓名必须指定, 且为字符串类型 性别为字符串类型,如果性别没有指定,默认为男 年龄必须指定,且为数字类型
阅读全文
posted @ 2021-03-21 21:03 懒惰ing
阅读(198)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
18
下一页
公告