摘要: let jsonp = 'success_jsonpCallback({"net": "内网"})' const reg = /^\w+\((\{[^()]+\})\)$/ let flag = null const match = jsonp.match(reg) if(match){ flag 阅读全文
posted @ 2022-08-16 09:42 Alitar 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 项目中封装了echarts饼图,通过选择不同时间,像后端请求不同数据,频繁切换会出现“There is a chart instance already initialized on the dom.”的警告 这个问题的出现在于,在一张表上渲染不同数据,其实dom已经存在了,但是我们在每次数据发生改 阅读全文
posted @ 2022-07-05 08:54 Alitar 阅读(681) 评论(0) 推荐(0) 编辑
摘要: Echarts社区已停止运营,下面存在开源网站 第一个:www.isqqw.com/#/homepage,多个分类, 可在线调试和切换版本。 第二个:http://www.ppchart.com 多个分类,可在线调试。 第三个:类似原版社区的网站 www.makeapie.cn/echarts 阅读全文
posted @ 2022-06-28 09:58 Alitar 阅读(4188) 评论(0) 推荐(0) 编辑
摘要: <div class="button_index" @click="counter1">产品介绍</div> <div class="product" id="productId"></div> counter1() { //counter1是绑定的点击事件名称 const returnEle = 阅读全文
posted @ 2021-07-07 18:45 Alitar 阅读(774) 评论(0) 推荐(0) 编辑
摘要: 1: { 2: n = 52.123456; 3: //alert(typeof n); 4: alert(n); 5: } 6: //有符号右移 7: { 8: n = 52.123456; 9: var n2 = n >> 0; 10: //alert(typeof n2); 11: alert 阅读全文
posted @ 2021-03-05 16:36 Alitar 阅读(536) 评论(0) 推荐(0) 编辑
摘要: /* 修改复选框默认样式 */ checkbox .wx-checkbox-input { width: 40rpx; height: 40rpx; /* border: 4rpx solid #999; */ border-radius: 100%; } /*复选框外框选中样式*/ checkbo 阅读全文
posted @ 2021-02-25 14:50 Alitar 阅读(111) 评论(0) 推荐(0) 编辑
摘要: /* * ctx: 画布上下文 * word: 需要处理的文字 * maxWidth:一行文字最大宽度 * x: 文字在x轴要显示的位置 * y: 文字在y轴要显示的位置 * maxLine: 文字最多显示的行数 *///传入一个对象包含以上的值 dealWords(options) { optio 阅读全文
posted @ 2020-12-21 15:43 Alitar 阅读(251) 评论(0) 推荐(0) 编辑
摘要: position: sticky 设置后下拉是正常的当超出设定的top值后变成固定定位 阅读全文
posted @ 2020-12-15 16:08 Alitar 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 需求:分享当前商品保存相册以及分享卡片给好友 实现:canvas 2D 小程序自带的分享 //wxml 文件内容 <canvas type="2d" id="canvasBox" style="width:260px;height:370px"></canvas> <view class="save 阅读全文
posted @ 2020-12-15 14:38 Alitar 阅读(922) 评论(0) 推荐(0) 编辑
摘要: yarn add postcss-pxtorem vue.config.js配置 loaderOptions: { postcss: { plugins: [ require('postcss-pxtorem')({ rootValue: 50, // vant用的是375设计 propList: 阅读全文
posted @ 2020-12-02 14:05 Alitar 阅读(430) 评论(0) 推荐(0) 编辑