前端技术
qq_35089721
这个作者很懒,什么都没留下…
展开
-
vue实现地图 好用点赞哦
切换到china-map分支。原创 2023-05-29 16:41:26 · 105 阅读 · 0 评论 -
uniapp H5、app、小程序不同端之间跳转
1、h5跳转apphttps://uniapp.dcloud.io/tutorial/app-ios-schemes.html2、app跳转h5 openUrl3、 app 跳转 小程序launchMiniProgramhttps://www.html5plus.org/doc/zh_cn/share.html#plus.share.ShareService.launchMiniProgram4、小程序跳转appbutton | uni-app官网uniapp 实现跳转其..原创 2022-05-25 18:00:22 · 1425 阅读 · 0 评论 -
uniapp热更新
比较版本号是否需要更新,写个更新内容的提示框提示升级,速度很快// 加弹窗提示更新的内容并进行更新 // // #ifdef APP-PLUS // plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) { // uni.request({ // url: 'http://www.example.com/update/', // data.原创 2022-05-12 16:11:45 · 308 阅读 · 0 评论 -
经验:项目积累
taoshi:1. 用于商品详情的图片放大镜vue-piczoom:vue-piczoom - npm2.PC端地图经纬度获取此方式非最佳,后面可以尝试vue-amap实现3.budongchan:uniapp 页面代码生成图片插件 图片不能显示待解决 非最佳方案canvas海报生成 图片合成 写页面一样生成海报内容 - DCloud 插件市场4.duanshipin dati:复杂公式的转义显示:mathjax.jsmathjax文档 — MathJax 3...原创 2022-01-29 15:57:30 · 1650 阅读 · 0 评论 -
uniapp接mobSDK分享登录配置重点facebook,line,google,微信
mob配置重点:app模块配置 把 微信相关去掉!!!urltypes 中 facebook 加 'fb'universaillink 配置 capabilitiesschame、白名单配置google用的是web版auth"google的redirectUrl" : "http://localhost",https://mob.com/wiki/detailed?wiki=uni_app&id=14"urltypes" : "[facebook],[line],[mo原创 2021-07-02 14:36:39 · 1378 阅读 · 0 评论 -
div选择框跟随鼠标移动 节流
function throttle(fun, delay) { let last, timer; return function () { let self = this, args = arguments, now = +new Date(); if (last &&am..原创 2020-09-09 15:01:03 · 216 阅读 · 0 评论 -
rem适配方案
http://ailongmiao.com/read/90.html@media only screen and (min-width: 320px) { html { font-size: 13.65px; }}@media only screen and (min-width: 360px) { html { font-...原创 2020-01-08 11:41:13 · 221 阅读 · 0 评论 -
经验!一步步创建react项目并用webpack实现打包
nginx使用配置:react项目打包发布到服务器上bootstrap grid布局:https://cdn.bootcss.com/twitter-bootstrap/4.2.1/css/bootstrap-grid.min.cssemail 正则:/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/...原创 2019-12-30 19:54:50 · 601 阅读 · 0 评论 -
svg环形进度图react-circle添加动画效果
num用于更新次数,做比例计算count为进度变化值主要实现步骤:setCount(parseFloat(to*num*0.1).toFixed(2))import React, { useEffect,useState } from 'react';import Circle from "react-circle";const CountTo=(props)=>{...原创 2019-11-12 17:26:18 · 562 阅读 · 0 评论 -
JS无法进行精确计算的bug
解决方案解决方案的原理是,将浮点数乘以(扩大)10的n次方倍,把浮点数变为整数后再进行相应的运算,最后将得到的结果除以(缩小)10的n次方倍。原理示例:将console.log(1-0.8); 变为 console.log((1 * 10 - 0.8 * 10) / 10); 即可得到正确的值根据上述原理,可以封装一些方法出来解决此类问题。如下所示(Math.pow(x, y);...原创 2019-11-08 11:30:09 · 176 阅读 · 0 评论 -
PxCook快速拿设计图样式工具
下载:https://www.fancynode.com.cn/pxcook原文参考:https://www.jianshu.com/p/70e3874d86d6原创 2019-11-05 18:21:34 · 701 阅读 · 0 评论 -
React Native 屏幕适配
"use strict"import {Dimensions, StatusBar, Platform, PixelRatio} from 'react-native'//UI设计图的宽度const designWidth = 750//UI设计图的高度const designHeight = 1334//手机屏幕的宽度export const width = Dimensi...原创 2019-11-05 18:15:01 · 575 阅读 · 0 评论 -
React Native 设置app图标和名称,启动页
1 安卓:图标:将logo拖到app icon gear中 生成四个规格的图标,分别放到android/app/src/main/res 下的四个文件夹中,命名为ic_launcher.png 没有对应上的文件夹放一张1024*1024 或者512*512的即可app名称:在android/app/src/main/res/values/strings.xml 中更改2...原创 2019-11-04 14:23:20 · 428 阅读 · 0 评论 -
react native 引入外部字体文件
1.在根目录下新建文件夹assets/fonts/,把ttf字体文件引入这里有很重要的一步,没做好后面都没用:查看ttf文件的字体信息(可以尝试字体软件查看)找到它的字体名,修改字体文件名为此文件名!!!2.在react-native.config.js下添加:module.exports = { dependencies: { }, "assets": [ ...原创 2019-10-23 18:52:19 · 1620 阅读 · 0 评论 -
react native 请求静态图片
<Image source={ require('./assets/test.png') } resizeMode={'contain'} style={{width:100,height:100}} />原创 2019-10-23 18:05:57 · 232 阅读 · 0 评论 -
react native: Unrecognized font family 'antoutline'
原因是忘了 react-native link@ant-design/react-native (图片借用网络),把antfill.ttf 和 antoutline.ttf 这两个文件引入。原创 2019-10-23 10:42:33 · 1249 阅读 · 1 评论 -
react withScroll hoc判断鼠标向上向下滚动
import React from "react";const mount = (that) => { window.addEventListener('wheel', that.handleMouseScroll);};const unmount = (that) => { window.removeEventListener('wheel', that.hand...原创 2019-10-22 14:22:21 · 538 阅读 · 0 评论 -
react按需加载和错误边界处理lazy(),Suspense
好文链接:http://www.ptbird.cn/react-lazy-suspense-error-boundaries.html转载 2019-07-04 16:23:31 · 921 阅读 · 0 评论 -
es6 Proxy对象详解
https://www.cnblogs.com/kdcg/p/9145385.html转载 2019-07-15 15:14:14 · 118 阅读 · 0 评论 -
react 派生state问题,非单一数据源导致状态不更新问题
https://www.jb51.net/article/147331.htm官网:https://zh-hans.reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#recommendation-fully-controlled-component建议模式:https://zh-hans.rea...原创 2019-07-25 15:04:34 · 576 阅读 · 0 评论 -
CSS Grid
好文:CSS Grid 网格布局教程http://www.ruanyifeng.com/blog/2019/03/grid-layout-tutorial.html转载 2019-07-25 17:32:54 · 94 阅读 · 0 评论 -
react生命周期详解
参考https://segmentfault.com/a/1190000016617400原创 2019-08-20 10:28:09 · 67 阅读 · 0 评论 -
react 生命周期
原文链接:https://blog.csdn.net/wust_cyl/article/details/84306393Constructor1: 用于初始化操作,一般很少使用2:唯一一个直接修改state的地方,其他地方通过调用this.setState()方法。getDerivedStateFromProps1:当state需要从props初始化时,使用2:尽量不使用,...原创 2019-08-21 14:56:04 · 70 阅读 · 0 评论 -
react native 返回上一页并刷新上一页
上一页:navigation.navigate('ReceiptFolder', {fileName: item.name,refresh:()=>this.getList()})点击页:navigation.getParam('refresh')();navigation.goBack()原创 2019-09-19 15:22:23 · 3875 阅读 · 0 评论 -
react native 实现城市选择组件
https://github.com/collinxz-coder/blog/issues/6?utm_source=tuicool&utm_medium=referral原创 2019-10-11 11:44:31 · 343 阅读 · 0 评论 -
vue项目系统学习
vue-cli脚手架创建一个项目://npm install vuenpm install vue-clivue create todo-vuevue api使用:https://cn.vuejs.org/v2/api/#v-onvue ui使用:http://element-cn.eleme.io/2.0/#/zh-CN/component/installationvue...原创 2019-04-15 14:55:02 · 269 阅读 · 0 评论