会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
巨星太空易
博客园
首页
新随笔
联系
订阅
管理
2022年6月6日
判断对象是否相同
摘要: // export function deepCompare(x, y) { var i, l, leftChain, rightChain; function compare2Objects(x, y) { var p; // remember that NaN NaN returns false
阅读全文
posted @ 2022-06-06 16:40 巨星太空易
阅读(31)
评论(0)
推荐(0)
2022年5月25日
前端计算精度丢失问题
摘要: <script> function addition(num1, num2){ //将传入的数字格式化防止出错 if(typeof num1 != 'number'){ num1 = parseFloat(num1) | 0; } if(typeof num2 != 'number'){ num2
阅读全文
posted @ 2022-05-25 11:41 巨星太空易
阅读(505)
评论(0)
推荐(0)
2022年3月8日
elementui时间线自定义版本
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Document</title> <style> *{ margin: 0; padding: 0; } .items{ margin: 50px; } .item
阅读全文
posted @ 2022-03-08 10:50 巨星太空易
阅读(745)
评论(0)
推荐(0)
2022年3月7日
简单echarts数据
摘要: option = { xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [ { data: [150, 230
阅读全文
posted @ 2022-03-07 17:00 巨星太空易
阅读(32)
评论(0)
推荐(0)
echrts引用
摘要: <template> <div> <a-row class="backG-color"> <a-col :span="8" class="titleFont priceTrend_titleFont"> <span>价格趋势</span> </a-col> <a-col :span="16" cla
阅读全文
posted @ 2022-03-07 16:34 巨星太空易
阅读(46)
评论(0)
推荐(0)
2022年2月25日
全局loading指令
摘要: import store from "@/store/index.js" // 自定义指令,防止重复提交 v-preventReClick 直接调用即可 <button v-preventReClick ></button> export default { // 防重复点击(指令实现) name:
阅读全文
posted @ 2022-02-25 10:20 巨星太空易
阅读(102)
评论(0)
推荐(0)
2022年1月15日
vue自定义判空指令
摘要: // 组件内部指令 directives: { // 指令名称 check: { // 钩子。被绑定元素插入父节点时调用 inserted: (el) => { // 正则-验证数字 const r = /^[0-9]*$/ // input 添加失焦时间 el.addEventListener('
阅读全文
posted @ 2022-01-15 09:55 巨星太空易
阅读(148)
评论(0)
推荐(0)
2022年1月3日
文件下载
摘要: download(data, fileName) { fileName = decodeURIComponent(fileName); console.log(data); if (!data) { this.$message.warning("文件下载失败") return; } // let u
阅读全文
posted @ 2022-01-03 17:10 巨星太空易
阅读(34)
评论(0)
推荐(0)
js文件下载
摘要: if (response.status == 200) { this.$message.success("下载成功!"); const blob = new Blob([response.data], { type: "application/msword" }); const downloadEl
阅读全文
posted @ 2022-01-03 17:00 巨星太空易
阅读(127)
评论(0)
推荐(0)
js时间转换函数
摘要: //定义时间转换函数 formatDate(date, fmt) { date = new Date(date); if (typeof(fmt) "undefined") { fmt = "yyyy-MM-dd HH:mm:ss"; } if (/(y+)/.test(fmt)) { fmt =
阅读全文
posted @ 2022-01-03 16:02 巨星太空易
阅读(220)
评论(0)
推荐(0)
下一页