- 博客(28)
- 收藏
- 关注
原创 echarts 数据不完整,对数据进行补0操作
后端传入数据不完整情况,例:两组时间节点,相同名称内,仅第一项时间节点有相关数据,第二项无数据,对此将数据进行整合补0,达到数据统一且能正常展示图表。
2023-03-30 16:04:08
1323
原创 下载文件doc格式
type: "applicationnd.openxmlformats-officedocument.wordprocessingml.document", //doc格式。return this.$message.info("网络错误或下载失败!this.$message.success("下载成功");url: ``, // 接口。
2022-03-21 22:02:57
189
原创 微信小程序跳转
wx.redirectTo:关闭当前页,跳转到指定页;wx.navigateTo:保留当前页,跳转到指定页;wx.switchTap:只能用于跳转到tabbar页面,并关闭其他非tabbar页面。
2021-10-22 17:35:56
122
原创 微信小程序将数据存入本地并获取
//存入本地代码wx.setStorageSync('uid', res.data.userid) wx.setStorageSync("namePhoto", { "name": ..., "photo": ... })//获取本地存储的数据wx.getStorageSync('uid')
2021-10-19 16:20:41
1140
原创 微信小程序---获取当前手机高度
// wxml<view style="height:{{windowHeight}}px;width:100%;"> </view>//jsdata: { windowHeight: 0,},onLoad: function (options) { const sysInfo = wx.getSystemInfoSync() this.setData({ windowHeight: sysInfo.windowHeight, .
2021-10-18 15:13:30
816
原创 vue form表单对比差异
diffData: '', // 差异this.compiles = res.data.data[0] 当前数据this.rawData = {...res.data.data[0]} // 原始数据 // 比较差异的方法 diffFormData () { for (let k in this.rawData) { if (this.rawData[k] !== this.compiles[k]) { if (!th.
2021-09-08 12:01:43
1517
原创 截取特殊字符前面/后面的字段
values.usertype = 'hello/word'var index = values.usertype.lastIndexOf("/");var type_id = values.usertype.substring(0, index+0)console.log(type_id)
2021-09-07 17:41:59
465
原创 Ant Design table编号自增及key报错处理
<a-tablebordered:data-source="dataSource":columns="columns":pagination="pagination" //分页处理:rowKey='dataSource=>dataSource.id' //key报错...
2021-08-27 10:52:59
670
原创 微信小程序向后端传递参数
传递格式:wx.request({ url:'后台接收参数的文件路径', method:'传递方式,是GET还是POST',data{ //参数设置},header{ 'Content-Type': 'application/json' //GET方式},header: { "Content-Type": "application/x-www-form-urlencoded" //POST方式},success:function(res){//请求成功之后要做什...
2021-07-05 11:52:30
3271
原创 vue获取当前时间(年月日时分秒+星期几)
let yy = new Date().getFullYear(); let mm = (new Date().getMonth()+1)<10 ? '0'+(new Date().getMonth()+1) : new Date().getMonth()+1; let dd = new Date().getDate()<10 ? '0'+new Date().getDate() : new Date().getDate(); let hh = new Date().g.
2021-06-03 11:06:57
2595
原创 vue退出登录并禁止返回上一页
handleCommand(command) { //触发事件 if (command === "back") { this.$router.push({ path: "***", //跳转的路径 }); window.localStorage.clear(); //清除所有key // 退出后禁止返回上一页 history.pushState(null, null, document.URL..
2021-06-03 09:43:50
1591
1
原创 解决wangeditor富文本编辑器在element-ui el-dialog不显示问题
1、在el-dialog里添加@opened=""与 @closed=""<el-dialog title="文章发布" :visible.sync="dialogFormVisible" @opened="show()" @closed="hide()" :before-close="handleClose"> <el-form :model="form"> <el-form-item label="内容详情:...
2021-05-31 17:12:55
2779
3
原创 vue数据存储及转换格式
//传值(数据转为字符串格式进行存储)localStorage.setItem('data',JSON.stringify(res.data.data)) //取值(存储数据转为对象取值)localStorage.getItem('data');this.datas = JSON.parse(localStorage.data);//删除localStorage.removeItem()//更改localStorage.setItem()...
2021-05-31 16:40:38
1101
原创 css单行及多行溢出变为省略号
//单行溢出overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
2021-05-31 16:32:03
93
原创 微信小程序延迟执行、点击复制及vue延迟执行
微信延迟执行: setTimeout(function () { 。。。 }, 3000) 微信复制: wx.setClipboardData({ data: res.data.data, }) vue延迟 setTimeout(() => { }, 3000);
2021-05-31 16:11:04
798
原创 vue下载文件(zip格式),并解决中文乱码
examineClick(index,tableData,id){axios({method:'post',url:`https://www.jinghexinxi.top/bjapi/UserRectification/download?user_id=${id}`,responseType:'blob'}).then((res...
2021-05-31 15:16:38
1585
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人