[置顶] Mac 安装react-native 环境踩坑记

摘要: 我的工程创建时间是2019.7.11号下午 :首先看一下最后我的工程的package.json各个包的版本: 1.安装依赖 brew install node brew install watchman 注意 node>10 安装yarn npm install -g yarn react-nati 阅读全文

posted @ 2019-07-12 10:35 myYouth 阅读(950) 评论(0) 推荐(0) 编辑

[置顶] Mac 安装flutter 踩坑记

摘要: 完整版请看链接: http://b36d5043.wiz03.com/share/s/2Prl132RpQ3x2XpA4I2oTa2204K0FF0vB4J42tWIEQ04UrAg 首先下载flutter SDK; 解压的/Users/app/下 下载: Android Studio 并且安转,默 阅读全文

posted @ 2019-06-11 12:52 myYouth 阅读(3832) 评论(0) 推荐(0) 编辑

[置顶] 基于canvas绘图 缩放 做标记

摘要: 技术要点: 1.img 绘制到canvas 2.绘制完成以后进行拖拽,缩放 3.使用canvas画图,在绘制的img上进行标记划线,当然可以实现跟过功能,例如百度地图的功能,做单个标记,区域标记等。 4.实现坐标等转换,标记区域的所有坐标都是基于相对原始图片的坐标,便于其他操作。 实际项目中的开发实 阅读全文

posted @ 2018-06-14 16:29 myYouth 阅读(1882) 评论(8) 推荐(2) 编辑

[置顶] 获取URL地址栏参数(正则表达式)

摘要: /** * 获取地址栏参数 * @method queryURLParameter * @param {url:不传默认是当前locationhref ,isEncoded:是否是加密,不加密false,加密需要解密:true} * @return {参数对象} * eg:https://i.cnb 阅读全文

posted @ 2017-04-13 10:33 myYouth 阅读(826) 评论(0) 推荐(0) 编辑

[置顶] 原生js 的ajax封装

摘要: /** * 封装ajax函数(包括跨域) * @method ajax * @param option :{type:"post" or "get" 请求方式,url:"url" 请求地址,data:object 请求参数,async:"true" 异步or“false”同步,success:fun 阅读全文

posted @ 2017-03-21 17:39 myYouth 阅读(283) 评论(0) 推荐(0) 编辑

[置顶] 前端js模糊搜索(模糊查询)

摘要: 1.html结构: <label for="searchShop" class="clear pos-a" style="top:17px;"> <input type="text" id="searchShop" placeholder="场所搜索"> <input type="button" v 阅读全文

posted @ 2017-02-16 11:13 myYouth 阅读(27679) 评论(5) 推荐(1) 编辑

[置顶] jquery插件fileupload图片上传(前端如何处理)

摘要: 1.页面首先引入jquery,版本不要低于1.6 2.其次页面引入对应的这个五个js,按顺序放置 3.html结构如下: 上传头像: 重新上传 这个样式是这样的:4.css样式如下:如有些结构和样式不一致的,希望自己调整一下 /*上传图片*/.control-gr... 阅读全文

posted @ 2017-02-10 18:28 myYouth 阅读(7583) 评论(3) 推荐(0) 编辑

[置顶] js中的原型以及原型链

摘要: 在js中原型是每个构造函数的属性: 这个算 js 核心概念的一部分 var f1 = new Foo();对象 f1 的构造函数就是 Foo , f1的原型 __proto__ 就指向构造函数 Foo.prototype 可以吧代码复制一份在你控制台看看 function GetNum() { al 阅读全文

posted @ 2017-02-07 14:28 myYouth 阅读(433) 评论(0) 推荐(0) 编辑

2022年8月29日

IOS 和Android H5 打开摄像头拍照 使用navigator.MediaDevices.getUserMedia() 拍照

摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文

posted @ 2022-08-29 15:54 myYouth 阅读(2818) 评论(0) 推荐(0) 编辑

2021年7月18日

Nuxt.js 使用vue-social-share.js 插件 分享功能实践

摘要: 1. 安装 npm install vue-social-share -S 2.在nuxt项目的跟目录下的plugins文件夹下创建 vue-social-share.js 例如: 里面内容如下: import Vue from 'vue' import Share from 'vue-social 阅读全文

posted @ 2021-07-18 23:21 myYouth 阅读(758) 评论(0) 推荐(0) 编辑

2021年5月12日

校验邮箱正则

摘要: /^\w+@[a-zA-Z0-9]+((\.[a-z0-9A-Z]{1,})+)$/ xxx@xxx.xxx.xxx 阅读全文

posted @ 2021-05-12 12:05 myYouth 阅读(2224) 评论(0) 推荐(0) 编辑

2020年11月5日

sass 中使用for 循环以及随机数

摘要: @for $i from 1 through 18 { .dot-posi#{$i} { animation:change 2s ease-in-out (random(5) + 1) + s infinite alternate; } } 阅读全文

posted @ 2020-11-05 10:39 myYouth 阅读(832) 评论(0) 推荐(0) 编辑

vue 中使用 VueAwesomeSwiper.js 轮播

摘要: npm install vue-awesome-swiper //版本 4.1.1 //在main.js中 切记要对应好版本,不然引入的路径可能不一样 import VueAwesomeSwiper from 'vue-awesome-swiper' import 'swiper/css/swipe 阅读全文

posted @ 2020-11-05 10:37 myYouth 阅读(608) 评论(0) 推荐(0) 编辑

2020年9月19日

play() failed because the user didn't interact with the document first audio 如何控制自动播放

摘要: //加上静音属性也播放不了 <audio ref="audio" preload="auto" autoplay src="./tip.mp3" controls="controls" hidden loadedmetadata="onLoadedmetadata" /> </section> <b 阅读全文

posted @ 2020-09-19 21:29 myYouth 阅读(10461) 评论(0) 推荐(0) 编辑

2020年7月31日

.eslintrc.js

摘要: module.exports = { root: true, parserOptions: { parser: 'babel-eslint', sourceType: 'module' }, env: { browser: true, node: true, es6: true, }, extend 阅读全文

posted @ 2020-07-31 10:20 myYouth 阅读(632) 评论(0) 推荐(0) 编辑

vue.config.js

摘要: const pxtoviewport = require('postcss-px-to-viewport') const path = require('path') function resolve(dir) { return path.join(__dirname, dir) } const T 阅读全文

posted @ 2020-07-31 10:18 myYouth 阅读(331) 评论(0) 推荐(0) 编辑

2020年6月18日

使用vue-cli 4.0 搭建后台系统 (顶部导航+左侧导航) 第五集

摘要: 总结: 1.每个二级菜单都需要一router-view去接受三级组件的展示。 2.页面主要是写了的demo,简单的交互,没有具体去结合业务实践。 3.页面很多元素交互参考了vue-admin-template的实现。 阅读全文

posted @ 2020-06-18 14:30 myYouth 阅读(486) 评论(0) 推荐(0) 编辑

使用vue-cli 4.0 搭建后台系统 (顶部导航+左侧导航) 第四集

摘要: 1。主要说一说,顶部导航和左侧菜单的联动和切换。主要 组件components->topbar->inedx.vue <el-menu :default-active="activeMenu" class="el-menu-bar" mode="horizontal" :background-col 阅读全文

posted @ 2020-06-18 14:25 myYouth 阅读(1003) 评论(0) 推荐(0) 编辑

导航