摘要: <input single ref={ref => this.handler = ref} id="icon-button-file" onChange={this.fileChanges} accept={accept} type="file" style={{ display: 'none' } 阅读全文
posted @ 2020-09-09 09:26 吃鸡小能手 阅读(180) 评论(0) 推荐(0) 编辑
摘要: ` buf2hex = (buffer) => { // buffer is an ArrayBuffer console.log(buffer) return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toStr 阅读全文
posted @ 2020-09-09 09:24 吃鸡小能手 阅读(1850) 评论(0) 推荐(0) 编辑
摘要: (Math.round((2 / 7) * 100*100)/100).toFixed(2) + '%' (Math.round((2 / 7) * 100*100)/100).toFixed(2) + '%'"28.57%" 阅读全文
posted @ 2020-08-11 09:52 吃鸡小能手 阅读(2001) 评论(0) 推荐(0) 编辑
摘要: <UnitForm source={selected} key={selected.id}/> 只需要在 父组件中加入,key 传入的内容不同即可 阅读全文
posted @ 2020-07-22 17:46 吃鸡小能手 阅读(1804) 评论(0) 推荐(1) 编辑
摘要: vue有相关配置,但是因为用户需要,reactRouter在之前的版本中舍弃了其配置,需要用户自定义设置 方法: 创建一个组件,判断切换后的页面是否是最顶端 ··· import React from 'react';import { Route, withRouter,} from "react- 阅读全文
posted @ 2020-04-10 21:48 吃鸡小能手 阅读(1032) 评论(0) 推荐(0) 编辑
摘要: 在做vue路由切换的时候,发现一个页面切换到另一个页面的时候, 路由可以切换,但是页面和之前页面位置相同 想实现切换后,页面定位到顶部; 方法: 在main.js中 ``` Vue.config.productionTip = false;router.beforeEach((to, from, n 阅读全文
posted @ 2020-04-10 21:12 吃鸡小能手 阅读(1792) 评论(0) 推荐(0) 编辑
摘要: https://mp.weixin.qq.com/s/kQUh4Mk3mOLQ1QhuiJM_jg 感谢叶老师的分享!!!!! 阅读全文
posted @ 2020-03-18 23:13 吃鸡小能手 阅读(145) 评论(1) 推荐(0) 编辑
摘要: // 在根路径下新建JS文件vue.config.js 内容为 module.exports = { publicPath: '/', devServer: { proxy: { '/api': { target: 'http://localhost:3000/web/xlmc',//需要进入的路径 阅读全文
posted @ 2020-03-17 17:22 吃鸡小能手 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 其他input使用ref,获取输入框内容为: const image = this.refs.image.value;console.log(image); 文件内容 const image_urls = this.refs.image_urls.files[0];console.log(image 阅读全文
posted @ 2020-03-07 22:12 吃鸡小能手 阅读(6548) 评论(0) 推荐(0) 编辑
摘要: const backgroundAudioManager = wx.getBackgroundAudioManager(); var isPlay = this.data.isPlay;//在data中定义isPlay=false if (isPlay) { backgroundAudioManag 阅读全文
posted @ 2019-12-18 19:40 吃鸡小能手 阅读(523) 评论(0) 推荐(0) 编辑