- 博客(20)
- 收藏
- 关注
原创 vue 实现websocket
import SockJS from "sockjs-client";import Stomp from "stompjs";// 入参为 socket url地址 监听的topic 以及需要传给后台的信息infoexport default class socket{ constructor(topic,url){ this.url = url || process.env.VUE_APP_BASE_URL; this.topic = topic; .
2022-01-11 15:51:54
776
原创 echarts实现刻度尺
//刻度尺 progressChart() { let myEcharts = echarts.init(this.$refs.progressChart); var option = { grid: { left: "1%", right: "60%", top: "10px", bottom: "30px", containLabel: true, ...
2022-01-10 17:54:02
2508
原创 echarts仪表盘配置
meterchart() { let myEcharts = echarts.init(this.$refs.meterChart); var option = { series: [ { type: "gauge", min: 0, max: 180, splitNumber: 6, startAngle: 240,...
2021-12-23 13:53:22
1255
原创 修改element pagination跳转文字
mounted() { document.getElementsByClassName( "el-pagination__jump" )[0].childNodes[0].nodeValue = "Go"; document.getElementsByClassName( "el-pagination__jump" )[0].childNodes[2].nodeValue = ""; },
2021-10-22 15:14:47
1079
原创 时间戳转换yyyy--mm
//时间戳转换yyyy transformTime(time) { let date = new Date(time); let year = date.getFullYear(); let month = date.getMonth() + 1 > 9 ? date.getMonth() + 1 : "0" + (date.getMonth().
2021-10-22 13:14:01
133
原创 下拉年份选择框
SelectYear() { var Date = new Date(); var year = Date.getFullYear(); this.years = []; for (let i = 0; i < 50; i++) { this.years.push({ value: year - i, label: year - i + "年" }); } },.
2021-10-22 13:10:04
624
原创 js原生table渲染
<div class='calendarTable'> <div class='calendarHeader'> <div class="td Time">Time</div> <div class="td Country">Country</div> <div class="td Event">Event</div> <div cl.
2021-09-24 09:29:55
653
原创 js上一周这一周下一周时间
getweekDay(n) { var now = new Date(); var year = now.getFullYear(); //因为月份是从0开始的,所以获取这个月的月份数要加1才行 var month = now.getMonth() + 1; var date = now.getDate(); var day = now.getDay(); //判断是否为周日,如果不是的话,就让.
2021-09-23 15:04:40
137
原创 js今天的时间yyyy-mm-dd格式
getNowFormatDate() { var date = new Date(); var year = date.getFullYear(); var month = date.getMonth() + 1; var Date = date.getDate(); if (month >= 1 && month <= 9) { month = "0" + ..
2021-09-23 15:02:10
175
原创 element 单击单元格改变内容样式操作
<el-table border id="table1" class="elTable" ref="filterTable" :data="tableData" style="width: 100%" :cell-style="{borderColor:'#1F1F1F',height:'24px',background:'#141414',color:'rgba(255, 255, 255, 0.85)'}" :row-st.
2021-09-15 15:19:28
519
原创 js原生导出excel
function JSONToExcel(JSONData, FileName, title, filter) { if (!JSONData) return; //转化json为object var arrData = typeof JSONData != 'object' ? JSON.parse(JSONData) : JSONData; var excel = "<table>"; //设置表头 var row =.
2021-09-14 09:55:01
181
1
原创 element table 表头排序数字错乱问题解决
<el-table-column></el-table-column>加入:sort-method="sortMethod"属性<el-table border id="table1" class="elTable" ref="filterTable" :data="tableData" style="width: 100%" :cell-style="{borderColor:'#1F1F1F',he.
2021-09-13 17:02:14
682
原创 element 搜索框关键字高亮
<el-autocomplete class="autocomplete" v-model="state" :fetch-suggestions="querySearch" placeholder="Search templates" :trigger-on-focus="false" @select="handleSelect" @keydown = 'eidtKeyDown' @focus='editFocus'.
2021-09-10 11:24:32
617
原创 element tabs底部动态导航带删除添加功能
<el-tabs :tab-position="tabPosition" v-model="editableTabsValue" style="height: calc(100% - 48px)" editable @edit="handleTabsEdit"> <el-tab-pane :key="item.name" v-for="(item, index) in editableTabs" :label="item.title" :name="ite.
2021-09-09 15:15:53
428
原创 按钮点击改变颜色
<span v-for="(item,i) in sheetLists" :key="i" @click="sheetClick(i)" style="margin-right:10px" :class="{'sheets-active': sheetActive===i }"> {{item}}</span>sheetClick(i){ this.sheetActive=i },
2021-09-09 09:54:13
229
原创 element tree 双击树节点
<el-tree class="filter-tree" :data="dataTree" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" highlight-current > <div slot-scope="{ node, data }" @dblclick="handleNodeClick" style="width:.
2021-09-08 16:03:36
457
原创 element 单击按钮改变单元格样式&双击弹出dialog
<el-table border id="table1" class="elTable" ref="filterTable" :data="tableData" style="width: 100%" :cell-style="{borderColor:'#1F1F1F',height:'24px',background:'#000',color:'rgba(255, 255, 255, 0.85)'}" :row-st.
2021-09-07 16:56:40
433
原创 element input 智能匹配(键盘精灵)
<el-autocomplete class="autocomplete" v-model="state2" :fetch-suggestions="querySearch" placeholder="请输入内容" :trigger-on-focus="false" @select="handleSelect" > <template v-slot="{item}"> &...
2021-09-06 16:30:53
166
原创 element table 单元格hover 颜色
.el-table tbody td:hover { color:#40a829 !important}
2021-09-06 16:27:05
607
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人