- 博客(27)
- 资源 (1)
- 收藏
- 关注
原创 js文件导出下载
export function download(file, name) { let blob; if (file.data instanceof Blob) { blob = file.data; } else { blob = new Blob([file.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8' }); } cons
2021-12-22 15:55:05 90
原创 echarts-radar雷达图
<div id="radar-chart" style="width: 400px;"></div><script>export default{ data(){ return {} }, mounted(){ this.init() }, methods:{ init () { const radarChart = this.$echarts.init(document.getElementById('radar-char.
2021-12-20 14:30:32 443
原创 echarts-pie饼图
<!--若多图ID需动态--><div id="pie-chart" style="width: 400px; height: 200px"></div><script>export default{ data(){ return {} }, mounted(){ this.init() }, methods:{ init(){ // svg 解决canvas视图模糊 const pieChart = this.$ec
2021-12-08 15:07:34 257
原创 echarts-line折线图
<div id="line-chart" style="width: 520px; height: 250px"></div>init () { const LineChart = this.$echarts.init(document.getElementById('line-chart'), null, { renderer: 'svg' }) let option = { grid: { bottom: 35, left: 40,
2021-12-08 15:07:03 194
原创 echarts-bar柱状图
<div id="columnar-chart" style="width: 400px; height: 200px"></div>init () { const columnarChart = this.$echarts.init(document.getElementById('columnar-chart'), null, { renderer: 'svg' }) let option = { barWidth: 14, barCategoryGa
2021-12-08 15:05:55 456
原创 时间选择器范围控制之picker-options
<!--开始与结束--><el-date-picker v-model="form.time1" :picker-options="pickerStart" type="date" format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker><el-date-picker v-model="form.time2" :picke
2021-06-15 15:28:44 9877 3
原创 vue 富文本 vue-quill-editor 自定义配置及图片上传oss
<quill-editor ref="myQuillEditor" :options="editorOption"></quill-editor>import { quillEditor } from "vue-quill-editor"; //调用编辑器import {quillConfig} from "quill-config.js"; //自定义编辑...
2019-05-16 16:19:42 3491
转载 对象合并及排序
// 对象合并export const margeObj = (obj1, obj2) => { var obj = Object.assign(obj1, obj2); return obj;//返回排好序的新对象}//对象排序export const objKeySort = (obj) => { var newkey = Object.keys(obj).s...
2019-05-16 15:53:42 341
翻译 生成随机字符串
//生成随机串export const randomString = (len) => { len = len || 32; var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/ var maxPos = $cha...
2019-05-16 15:50:20 1148
转载 md5 加密 32
export const md5 = (string) => { function md5_RotateLeft(lValue, iShiftBits) { return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)); } function md5_AddUnsigned(l...
2019-05-16 15:47:21 271
原创 element 图片上传 oss 后端签名 前端直传
<el-upload action :show-file-list="false" :file-list="fileList" list-type="picture-card" :before-upload="uploadBefore" :http-request="picUpload"></el-upload&...
2019-05-16 15:38:50 2532 3
原创 微信小程序授权登陆流程
appid 小程序唯一标示 secret 小程序的app secret 密钥 openid 用户标识 3rd_session 用户唯一标识符(由session_key 和 openid 生成) 前端wx.login()获取code并wx.request()提交code到后端 后端根据 appid + app secret + code 到微信服务端换取 session_...
2018-11-21 23:03:18 545
原创 微信小程序---ECharts
小程序中使用ECharts 动态加载数据 多个图表首先需要引入,下载地址 ecomfe/echarts-for-weixin 只需要拷贝这一个文件夹就OK了 放在你项目合适的位置,在使用的页面json进行配置,允许使用组件 ec-canvas ;//wxml 创建组件<view class="container"> <ec-canvas id="mychart-dom...
2018-04-12 10:14:08 10399 11
原创 vue 多选 单选
<div class="filter_box"> <div class="filter_list"> <div v-for="(item,index) in filter_tabs" @click="showSelect(index)" :class="{activeColor:index==filter_num||it...
2018-03-21 11:05:56 1180
原创 react组件传值(子传父)
<div id="out"></div><script type="text/babel"> // 子传父 父组件获取子组件数据 //父组件传递一个可以改变自己状态的方法给子组件,子组件通过调用父组件传过来的方法来改变父组件的数据。 var Father = React.createClass({ getInitialState:functio...
2018-03-07 17:24:41 3460
原创 react 组件传值 (父传子)
<div id="out"></div><script type="text/babel"> //父传子 子组件获取父组件数据 var Child = React.createClass({ return( <div> <h2>子组件通过属性传值</h2> <
2018-03-07 16:17:47 1181
转载 分布式开发
分布式开发简介1 概述分布式应用程序就是指应用程序分布在不同计算机上,通过网络来共同完成一项任务,通常为服务器/客户端模式。更广义上理解“分布”,不只是应用程序,还包括数据库等,分布在不同计算机,完成同一个任务。之所以要把一个应用程序分布在不同的计算机上,主要有两个目的:1) 分散服务器的压力大型系统中,模块众多,并发量大,仅用一个服务器承载往往会发生压力过大而导致...
2018-03-07 14:13:40 616
原创 Vue 组件传值
父组件获取子组件数据父组件<div> <v-recharge :rechargeMoney="rechargeMoney" v-on:childMessage="getFlagVal"></v-recharge></div>methods: { getFlagVal:function (val) {...
2018-03-06 15:05:34 197
原创 手机号码验证
//封装验证手机号码checkUserPhoneReg: function () { var regExpP = /^1[34578]\d{9}$/; //手机号 if (regExpP.test($('.input_phone').val())) { //test检测$('#user_phone').val()是否符合regExp格式 //$('#err-l...
2018-02-27 16:25:59 2222 1
原创 身份证验证
isCardID: function (sId) { var aCity={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:...
2018-02-27 16:24:50 656
原创 微信录音
voice: { //开始录音 startRecord: function () { var recordTimer = setTimeout(function () { wx.startRecord({ success: function () { ...
2018-02-27 16:22:54 739 1
原创 微信支付
pay:{ //支付 onBridgeReady: function (config,successFun,errorFun) { WeixinJSBridge.invoke( 'getBrandWCPayRequest', config, function (res) { // 使用...
2018-02-27 16:19:41 246
原创 todoList
jquery--->todoList<!DOCTYPE html><html><head><meta charset="utf-8" /><link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" ...
2018-02-27 16:12:12 637
转载 react组件传值
**父组件向子组件传值**-------------<div id = "out"></div> <script type="text/babel"> var Chd = React.createClass({ //创建子组件 render:function(){ var pri = this.pr...
2017-08-23 16:40:20 616
原创 vue-cli 脚手架
**vue-cli搭建单页面应用** 步骤1. 安装之前需要检查是否已经安装nodeJs的环境 [node.js相关的网站](https://nodejs.org/en/download/)2. npm install vue-cli -g3. vue init webpack-simple projectName(项目文件夹名称) **vue init ...
2017-08-23 16:21:31 246
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人