摘要: 展示效果 HTML部分 <el-table :data="tableData4" style="width: 100%" customClass="table4"> <el-table-column label="指标" align="right" width="90"> <el-table-col 阅读全文
posted @ 2021-03-09 18:13 搜戴斯 阅读(826) 评论(0) 推荐(0) 编辑
摘要: vue 读取本地.txt文件 methods: { getdev() { // 更新数据devInfo.txt文件接口 let xhr = new XMLHttpRequest(), okStatus = document.location.protocol "file:" ? 0 : 200; x 阅读全文
posted @ 2021-02-22 17:44 搜戴斯 阅读(11598) 评论(0) 推荐(0) 编辑
摘要: vue indexedDB的使用 import Idb from 'idb-js' // 引入Idb import db_student_config from './db_student_config' // 引入数据库配置 methods: { getdev() { Idb(db_student 阅读全文
posted @ 2021-02-22 17:43 搜戴斯 阅读(1253) 评论(0) 推荐(0) 编辑
摘要: vue LocalStorage的使用 //设置LocalStorage localStorage.setItem('deviceData',JSON.stringify(res)); //获取LocalStorage localStorage.getItem('deviceData'); 阅读全文
posted @ 2021-02-22 17:42 搜戴斯 阅读(145) 评论(0) 推荐(1) 编辑
摘要: vue 引入pako解压与压缩字符串 import pako from 'pako' //引入pako解压与压缩字符串 methods: { // 设备浏览-加载设备信息 getDeviceInfo() { let that = this; //后端接口获取压缩数据 getDeviceInfo(). 阅读全文
posted @ 2021-02-22 17:37 搜戴斯 阅读(2354) 评论(0) 推荐(0) 编辑
摘要: data() { return { intervalId:null, // 定时器 }; }, methods: { // 定时刷新数据函数 30s // 参考教程-> https://www.cnblogs.com/aurora-ql/p/13300202.html dataRefreh() { 阅读全文
posted @ 2021-02-22 16:30 搜戴斯 阅读(111) 评论(0) 推荐(0) 编辑
摘要: created() { //页面刚进入时开启长连接 this.initWebSocket(); }, destroyed: function () { //页面销毁时关闭长连接 this.websocketclose(); }, methods: { initWebSocket() { //初始化w 阅读全文
posted @ 2021-02-22 16:28 搜戴斯 阅读(334) 评论(0) 推荐(0) 编辑
摘要: mounted() { // 监听浏览器窗口大小变化 window.onresize = () => { return (() => { this.clientWidth = document.body.clientWidth-210; this.clientHeight = document.bo 阅读全文
posted @ 2021-02-22 15:51 搜戴斯 阅读(694) 评论(0) 推荐(0) 编辑
摘要: vue下canvas裁剪图片 阅读全文
posted @ 2020-04-15 23:42 搜戴斯 阅读(1075) 评论(0) 推荐(0) 编辑
摘要: 初始化WebSocket initWebSocket(){ //初始化weosocket const wsuri = 'ws://10.100.45.8:8888/websocket';//ws地址 this.websock = new WebSocket(wsuri); this.websock. 阅读全文
posted @ 2019-10-15 15:05 搜戴斯 阅读(2166) 评论(0) 推荐(0) 编辑