2022年11月16日

导出表格

摘要: Export() { //导出 this.exportLoadings = true; let url = api.api7 + "/JD/ExportJDList";//请求数据的地址 let params = {}//请求的参数 for(let k in this.filterData){ pa 阅读全文

posted @ 2022-11-16 13:44 马玉豪 阅读(156) 评论(0) 推荐(0)

2022年11月8日

rpx

摘要: 1.rpx是将手机屏幕假设为750px,实际元素的大小与实际手机屏幕的比值与设置元素的rpx的值与750的比值相同。 阅读全文

posted @ 2022-11-08 11:32 马玉豪 阅读(220) 评论(0) 推荐(0)

2022年10月9日

请求头值的含义

摘要: 请求是请求报文的一部分,用于告诉服务器关于客户端环境和请求正文相关的一些信息,如浏览器版本,请求参数的长度等 Accept-Language: zh-cn,zh;q=0.5 Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7 Accept: text/html,ap 阅读全文

posted @ 2022-10-09 11:54 马玉豪 阅读(139) 评论(0) 推荐(0)

2022年9月29日

产生随机颜色

摘要: const randomColor = (min, max) => { const r = randomNum(min, max) const g = randomNum(min, max) const b = randomNum(min, max) return `rgb(${r},${g},${ 阅读全文

posted @ 2022-09-29 17:03 马玉豪 阅读(20) 评论(0) 推荐(0)

产生随机数

摘要: const randomNum = (min, max) => { return parseInt(Math.random() * (max - min) + min) } 阅读全文

posted @ 2022-09-29 17:02 马玉豪 阅读(23) 评论(0) 推荐(0)

2022年9月27日

echarts

摘要: // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('LeftEar')); // 指定图表的配置项和数据 var option = { title: { text: '左耳' }, tooltip 阅读全文

posted @ 2022-09-27 17:48 马玉豪 阅读(95) 评论(0) 推荐(0)

2022年9月26日

202.9.26(vue3)

摘要: 一: import { useRoute, useRouter } from 'vue-router' useRouter 相当于vue2的this.$router全局的路由实例,是router构造方法的实例; useRoute 相当于vue2的this.$route表示当前激活的路由的状态信息,包 阅读全文

posted @ 2022-09-26 17:31 马玉豪 阅读(67) 评论(0) 推荐(0)

provide 和 inject 用法及原理

摘要: 在父子组件传递数据时,通常使用的是 props 和 emit,父传子时,使用的是 props,如果是父组件传孙组件时,就需要先传给子组件,子组件再传给孙组件,如果多个子组件或多个孙组件使用时,就需要传很多次,会很麻烦。 像这种情况,可以使用 provide 和 inject 解决这种问题,不论组件嵌 阅读全文

posted @ 2022-09-26 16:06 马玉豪 阅读(937) 评论(0) 推荐(0)

nextTick简介

摘要: 在说nextTick之前,我们先介绍一下这节课案例的需求,我们还是有一个数组,里面有几个超级英雄,把他们渲染到了一个ul里,我们现在要获取这个ul的高度 <template> <div> <ul ref="list"> <li v-for="(item, index) in list" :key=" 阅读全文

posted @ 2022-09-26 15:53 马玉豪 阅读(105) 评论(0) 推荐(0)

2022年9月23日

鼠标按下移动不选中类容

摘要: window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty(); document.body.onselectstart = function(){ return false; } 阅读全文

posted @ 2022-09-23 16:28 马玉豪 阅读(19) 评论(0) 推荐(0)

导航