上一页 1 2 3 4 5 6 7 8 ··· 12 下一页

2020年8月14日

vue与react当路由页面跳转时滚动位置不对的处理

摘要: 在我们开发react或者vue项目的时候会发现当切换路由进行页面跳转的时候如果在前一个页面将滚动条滚到了最下面然后进行跳转那么接下来的那个页面也会默认滚动在最下面。这个时候我们就需要处理一下。 在处理之前我们首先需要知道原因在哪里: 原因是因为虚拟dom的算法问题,导致不会更新scroll 解决方法 阅读全文

posted @ 2020-08-14 17:26 秃了头也不退休 阅读(701) 评论(0) 推荐(0) 编辑

react中实现倒计时功能

摘要: import React,{ Component } from 'react'; class OrderDetail extends Component{ constructor(props){ super(props) this.state={ msg:"" } } timeTransition 阅读全文

posted @ 2020-08-14 14:58 秃了头也不退休 阅读(4273) 评论(0) 推荐(0) 编辑

react-countup - 数字滚动效果

摘要: import CountUp,{startAnimation} from 'react-countup' import './countup.css' class Index extends Component { state = { end:100 } onComplete=()=>{ conso 阅读全文

posted @ 2020-08-14 14:31 秃了头也不退休 阅读(4326) 评论(0) 推荐(0) 编辑

create-react-app 打包去掉map文件

摘要: 一:直接删除.map文件即可 二:通过修改配置文件改掉自动生成(建议大家测试环境的时候不要关闭,这样有利于定位查找代码错误的位置,到发布生产的时候再关闭),现在的cli都已经没有了配置文件,所以我们这样来找: 1:首先到根目录下找到package.json, 里边看到build的时候用的是 “bui 阅读全文

posted @ 2020-08-14 13:35 秃了头也不退休 阅读(1162) 评论(0) 推荐(0) 编辑

vue-vuex整理

摘要: 1.结构不复杂时的结构和用法 import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export default new Vuex.Store({ state: { userCode:'admin', }, mutations: { 阅读全文

posted @ 2020-08-14 10:53 秃了头也不退休 阅读(182) 评论(0) 推荐(0) 编辑

2020年8月13日

react-按需加载

摘要: 除了lazy Suspense 可以写个高阶函数 阅读全文

posted @ 2020-08-13 16:20 秃了头也不退休 阅读(132) 评论(0) 推荐(0) 编辑

react-intl 国际化

摘要: 1.安装 npm install react-intl --save 注意: 为了兼容Safari各个版本,需要同时安装 intl,intl在大部分的『现代』浏览器中是默认自带的,但是Safari和IE11以下的版本就没有了,这里需要留个心眼。 安装intl需要在终端中输入以下指令: npm ins 阅读全文

posted @ 2020-08-13 15:43 秃了头也不退休 阅读(1079) 评论(0) 推荐(0) 编辑

2020年7月22日

css-手机页面适配

摘要: //获取屏幕宽度 let htmlwidth=document.documentElement.clientWidth || document.body.clientWidth if(htmlwidth>750){htmlwidth=750} let htmlDom=document.getElem 阅读全文

posted @ 2020-07-22 10:48 秃了头也不退休 阅读(248) 评论(0) 推荐(0) 编辑

2020年7月16日

flutter-shared_preferences(持久化)

摘要: https://github.com/flutter/plugins/tree/master/packages/shared_preferences/shared_preferences 1.import 'package:shared_preferences/shared_preferences. 阅读全文

posted @ 2020-07-16 17:44 秃了头也不退休 阅读(930) 评论(0) 推荐(0) 编辑

flutter-flutter_html(使用html标签)

摘要: 1.flutter_html: ^1.0.0 https://github.com/Sub6Resources/flutter_html 2.import 'package:flutter_html/flutter_html.dart'; 3. child: ( Html( data: """ <i 阅读全文

posted @ 2020-07-16 11:36 秃了头也不退休 阅读(5830) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 12 下一页

导航