摘要: Number、String、Boolean、Null、undefined、object、symbol、bigInt。 判断数据类型 Object.prototype.toString.call 原理:调用了Object原型对象的tostring方法 typeof 运算符返回一个用来表示表达式的数据类 阅读全文
posted @ 2021-01-07 13:07 小白学前端 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 1 import {useEffect} from 'react'; 2 let observer; 3 export default function useObserverHook(ele,callback,watch=[]) { 4 useEffect(()=>{ 5 const node=d 阅读全文
posted @ 2020-12-18 17:20 小白学前端 阅读(175) 评论(0) 推荐(0) 编辑
摘要: think-react-store 基于 react hooks 和 context api 实现的类似的 redux 的数据管理库。支持数据存储,方法调用,可以在 class 组件和 function 组件中使用,支持同步和异步的方法调用。 https://github.com/cpagejs/t 阅读全文
posted @ 2020-12-16 17:18 小白学前端 阅读(231) 评论(0) 推荐(0) 编辑
摘要: project-libs 是一个常用函数集锦的工具库,包括浏览器、函数式、常用验证、cookie、数组处理等函数。 https://github.com/cpagejs/project-libs 阅读全文
posted @ 2020-12-16 16:48 小白学前端 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1 <scroll-view scroll-x="true" :scroll-left="scrollLeft" class="head"> 2 <div @click="changeTab(index,item.id)" :class="[nowIndex==index ?'active':''] 阅读全文
posted @ 2020-08-05 15:40 小白学前端 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 一个页面怎么给另一个页面传个对象值呢 res={content: str, okTheme: 'alink'} 传值前需要转化 1 encodeURIComponent(JSON.stringify(res)) 接收 1 JSON.parse(decodeURIComponent(this.$roo 阅读全文
posted @ 2020-08-05 15:11 小白学前端 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 首先app.json打开 1 "permission": { 2 "scope.userLocation": { 3 "desc": "你的位置信息将用于小程序位置接口的效果展示" 4 } 5 }, 地图引用参照: https://lbs.amap.com/api/wx/gettingstarted 阅读全文
posted @ 2020-08-05 14:53 小白学前端 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 1 <text data-data="111" bindtap='copyUrl'>复制</text> 1 copyUrl(e) { 2 const data = e.currentTarget.dataset.data 3 wx.setClipboardData({ 4 data,//要复制的内容 阅读全文
posted @ 2020-08-05 14:13 小白学前端 阅读(291) 评论(0) 推荐(0) 编辑
摘要: <template> <div class="login"> <div class="item" v-for="(item,index) in dataList" :key="index"> <input @change="change(index,item.checked)" type="chec 阅读全文
posted @ 2020-08-04 11:43 小白学前端 阅读(596) 评论(0) 推荐(0) 编辑
摘要: 简单记录一下使用vue-element-admin 后台项目我采用的是vue-element-admin后台模板,我们下载下来做下改造。 1.关闭自带的mock 1-1 去除main.js 1 // if (process.env.NODE_ENV 'production') { 2 // cons 阅读全文
posted @ 2020-07-30 16:13 小白学前端 阅读(878) 评论(0) 推荐(0) 编辑