摘要: 如图: Line.vue <template> <div> <div style="width: 300px; height: 300px" ref="chart" id="chart"></div> </div> </template> <script> export default { data 阅读全文
posted @ 2021-05-18 09:39 胡炖鱼 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 效果如图: 思路: 通过element ui组件,输入框+时间选择器 组合而成。两个组件叠加而成,输入框组件在第一层,时间组件在第二层,鼠标通过鼠标的穿透属性,在点击第一层时穿透到第二层触发focus时间。 代码如下; index.vue <p class="fix"> <el-input plac 阅读全文
posted @ 2021-05-14 00:15 胡炖鱼 阅读(953) 评论(0) 推荐(0) 编辑
摘要: 自己初步: function getNum(num) { return num < 10 ? "0" + num : num; } function getH(hh) { if (hh > 12) { hh = hh - 12; } return hh; } function formatDate( 阅读全文
posted @ 2021-04-15 16:37 胡炖鱼 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 解: function reduceObject(data) { //判断是否为数组对象: if (Array.isArray(data)) { console.log("数组") } let obj1 = {}; data.forEach(ele => { if (!ele.name || ele 阅读全文
posted @ 2021-04-14 18:02 胡炖鱼 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 使用vue+echart图表。 引入echart npm i echart 可参考:https://www.npmjs.com/package/echart(npm官网) 在main.js中引入,挂载在vue实例上。 import * as echarts from 'echarts'; Vue.p 阅读全文
posted @ 2021-04-14 17:56 胡炖鱼 阅读(1764) 评论(0) 推荐(0) 编辑
摘要: 访问github个人博客时*.github.io 拒绝了我们的连接请求,错误码403 解决方案: 修改host文件 如图 通过网站查询自己博客的ip:https://tools.ipip.net/dns.php 然后选择ip添加至host文件中,如下 保存之后在进入博客地址; 阅读全文
posted @ 2021-01-29 17:13 胡炖鱼 阅读(1301) 评论(0) 推荐(0) 编辑
摘要: js数组对象去重: <html> <head> <title>我的第一个 HTML 页面</title> </head> <body> </body> <script> let obj = [{ id: 1, type: 1, }, { id: 2, type: 2, }, { id: 2, typ 阅读全文
posted @ 2020-11-13 15:45 胡炖鱼 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 技术:vuex,vue 首先下载vuex 创建store文件夹下index.js import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex); const store = new Vuex.Store({ state: { demo: { 阅读全文
posted @ 2020-10-23 10:51 胡炖鱼 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 使用CSS3新特性实现: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="gong.css" /> <title>魔方</title> <style t 阅读全文
posted @ 2020-10-21 18:38 胡炖鱼 阅读(1048) 评论(0) 推荐(0) 编辑
摘要: 基于vue语法 分页加载(vue+element -ui) <template> <div> <el-pagination class="pagination" background layout="prev, pager, next" :pageSize="pageSize" :total="to 阅读全文
posted @ 2020-10-21 17:32 胡炖鱼 阅读(712) 评论(0) 推荐(0) 编辑