04 2021 档案

摘要:// 第一种:用async、await修饰 async function a() { let b = await crawer("参数"); console.log(b); } a(); // 第二种:用.then接收 let b = crawer("参数") .then((res) => { co 阅读全文
posted @ 2021-04-30 22:13 yw3692582 阅读(307) 评论(0) 推荐(0) 编辑
摘要:<template> <div class="hello"> <EncapTable ref="items" :Data="Data"></EncapTable> </div> </template> <script> import EncapTable from "./EncapTable"; e 阅读全文
posted @ 2021-04-30 10:59 yw3692582 阅读(2875) 评论(0) 推荐(0) 编辑
摘要:<template> <div> <!-- 基于el-table二次封装的一个table组件,功能包括:搜索、编辑、删除、分页 --> <el-table :data=" getSearchInfo.slice( (currpage - 1) * Data.pageSize, currpage * 阅读全文
posted @ 2021-04-30 10:57 yw3692582 阅读(384) 评论(0) 推荐(0) 编辑
摘要:formatNode(node) { // 获取websocket发送的msg信息,写了一个递归,前提是要在调用formatNode函数传入的参数控制好 if (node.key != '值') { // 在sendMsg的头部添加,这样是为了后面转成字符串 this.sendMsg.unshift 阅读全文
posted @ 2021-04-28 09:33 yw3692582 阅读(48) 评论(0) 推荐(0) 编辑
摘要:shutter.js百叶窗(好像需要配合velocity.js)、slick.js幻灯片 地址: https://www.html5tricks.com/demo/jquery-blinds-player/index.html(百叶窗) https://www.html5tricks.com/dem 阅读全文
posted @ 2021-04-25 14:05 yw3692582 阅读(141) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content 阅读全文
posted @ 2021-04-25 13:45 yw3692582 阅读(1721) 评论(0) 推荐(0) 编辑
摘要:let arr = [1, [1, 2], [2, , [3, 4, 5], 3,{'user_name':'张三','password':'admin'}], 4]; let newArr = []; function ddd(data) { data.forEach((item) => { if 阅读全文
posted @ 2021-04-23 15:40 yw3692582 阅读(444) 评论(0) 推荐(0) 编辑
摘要:// 简单粗暴,适用于简单的一些判断 let obj = { 1:'1', 2:'2', 3:'3' } return obj[a] 阅读全文
posted @ 2021-04-23 14:09 yw3692582 阅读(204) 评论(0) 推荐(0) 编辑
摘要:首先在linux上安装node.js,我参考的这一篇文章:https://www.cnblogs.com/yuanzhiguo/p/11448074.html 然后将node.js代码放在任意位置,我是放nginx文件夹里了,这样方便维护。 配置nginx的nginx.conf文件夹: 在http下 阅读全文
posted @ 2021-04-20 23:29 yw3692582 阅读(141) 评论(0) 推荐(0) 编辑
摘要:new Date(new Date().toLocaleDateString()).getTime() 阅读全文
posted @ 2021-04-20 10:08 yw3692582 阅读(116) 评论(0) 推荐(0) 编辑
摘要:在config中的index.js的proxyTable添加下面代码 '/api': { target: '请求的地址',//设置你调用的接口域名和端口号 别忘了加http changeOrigin: true, pathRewrite: { '^/api': ''//这里理解成用‘/api’代替t 阅读全文
posted @ 2021-04-19 14:13 yw3692582 阅读(388) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content 阅读全文
posted @ 2021-04-18 20:51 yw3692582 阅读(180) 评论(0) 推荐(0) 编辑
摘要:<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.5.2/vue.min.js"></script> <script>!window.Vue && document.write(unescape('%3Cscript src="/study/s 阅读全文
posted @ 2021-04-17 22:50 yw3692582 阅读(1027) 评论(0) 推荐(0) 编辑
摘要:首先:npm install --save-dev compression-webpack-plugin@1.1.12 # 开启gzip gzip on; # 启用gzip压缩的最小文件,小于设置值的文件将不会压缩 gzip_min_length 1k; # gzip 压缩级别,1-9,数字越大压缩 阅读全文
posted @ 2021-04-17 22:08 yw3692582 阅读(151) 评论(0) 推荐(0) 编辑
摘要:router.beforeEach((to, from, next) => { let user_name = localStorage.getItem('user_name') if (to.path '/') { next() return } else { if (user_name null 阅读全文
posted @ 2021-04-15 17:17 yw3692582 阅读(31) 评论(0) 推荐(0) 编辑
摘要:config中 index.js 修改部分 二级目录(域名部分需要nginx做配置搜索一下就好了) 阅读全文
posted @ 2021-04-15 09:55 yw3692582 阅读(889) 评论(0) 推荐(0) 编辑
摘要:第一种:通过路由声明的方式(优点是美观,我一般用这种) // 在路由中这样用,path后跟“/:id”,代表收到的值是id { path: '/editUser/:id', name: 'editUser', component: resolve => require(['../views/main 阅读全文
posted @ 2021-04-15 09:51 yw3692582 阅读(877) 评论(0) 推荐(0) 编辑
摘要:let blob = e.data; let url = window.URL.createObjectURL(blob) console.log(url) 阅读全文
posted @ 2021-04-14 15:04 yw3692582 阅读(217) 评论(0) 推荐(0) 编辑
摘要:在main.js中或者单独引入(这里是直接写在了main.js中) import axios from 'axios' // 首先引入 Vue.prototype.$ajax = axios // 然后挂载到vue上 // axios请求拦截器 axios.interceptors.request. 阅读全文
posted @ 2021-04-12 15:20 yw3692582 阅读(156) 评论(0) 推荐(0) 编辑
摘要:我使用moment.js只用到了几个常用api,相对来说moment.js体积大一点,而day.js只有2kb,轻量,api和moment一样。 例如: 使用moment.js moment().format('YYYY-MM-DD HH:mm') 使用day.js dayjs().format(' 阅读全文
posted @ 2021-04-12 13:13 yw3692582 阅读(489) 评论(0) 推荐(0) 编辑
摘要:Echarts使用时,如果使用同一个图表,则可以写一个通用的函数,在调用的时候只需要传入相应的数据(如:图表的容器id、一些关键数据等)就可以了,这样提高了工作效率和代码的复用率。 阅读全文
posted @ 2021-04-09 11:07 yw3692582 阅读(48) 评论(0) 推荐(0) 编辑
摘要:let [a, b, c] = [5, 8, 12]; console.log(a, b, c) // 5, 8, 12 阅读全文
posted @ 2021-04-07 11:20 yw3692582 阅读(5666) 评论(0) 推荐(0) 编辑
摘要:let a = 10, b = 5; console.log(a, b) // 10, 5 [a, b] = [b, a] console.log(a, b) // 5, 10 阅读全文
posted @ 2021-04-07 11:18 yw3692582 阅读(247) 评论(0) 推荐(0) 编辑
摘要:解决方案:将el-image换成HTML的自有标签<img></img>即可,这样就不会有闪烁了。 阅读全文
posted @ 2021-04-06 17:19 yw3692582 阅读(3025) 评论(4) 推荐(0) 编辑

点击右上角即可分享
微信分享提示