2023年9月6日
摘要: 目的:写一个悬浮框,让这个悬浮框跟随鼠标移动 问题:当设置了left为鼠标位置clientX后,页面中实际的悬浮框left并不等于clientX,甚至随着鼠标往右移的时候,悬浮框与鼠标之间的距离越来越远。 首先,我们需要知道CSS中position的定义。 1.static: 默认值,静态定位,表示 阅读全文
posted @ 2023-09-06 14:03 zy89898976 阅读(59) 评论(0) 推荐(0) 编辑
  2023年8月14日
摘要: 1.map()函数 (1)map()适用于映射新的数组 let arr1 = [1, 4, 9, 16]; let NewArr = arr1.map((x) => x * 2); console.log(NewArr); // [2, 8, 18, 32]; 但是,当用if条件返回时,会出现und 阅读全文
posted @ 2023-08-14 10:44 zy89898976 阅读(64) 评论(0) 推荐(0) 编辑
  2023年8月10日
摘要: 第一步:安装echarts,再引入echarts 执行npm install echarts 在main.js中引入后,在对应使用图标的vue文件中也引入echarts //main.js import echarts from 'echarts' Vue.prototype.$echarts = 阅读全文
posted @ 2023-08-10 14:47 zy89898976 阅读(642) 评论(0) 推荐(0) 编辑
  2023年7月25日
摘要: 第一种:用expand属性 <easy-custom-table rowKey="id" :expand="expand" //添加expand属性,属性值为一个对象 :tableData="tableData" :columns="columns" :maxHeight="tableHeight" 阅读全文
posted @ 2023-07-25 11:12 zy89898976 阅读(31) 评论(0) 推荐(0) 编辑
  2023年7月24日
摘要: export function xxx(data) { return request({ method:'post', url:'xxx', data:data //data是添加到请求体bady(请求参数为body)中的,用于post请求 }) } export function xxx(para 阅读全文
posted @ 2023-07-24 09:50 zy89898976 阅读(223) 评论(0) 推荐(0) 编辑
  2023年7月19日
摘要: 正常情况下,表格中想要展开某一行只能通过点击最前面的小箭头,如果想要实现点击某一行后直接展开,那么首先,就要先了解这几个属性: row-key的值只能是表格中某一列的key,而expand-row-keys数组里保存的则是所有展开行的row-key值,假如设置row-key=“id”,那么expan 阅读全文
posted @ 2023-07-19 16:33 zy89898976 阅读(723) 评论(0) 推荐(0) 编辑
  2023年6月26日
摘要: 如果想要获取到arr数组对象中key为name的属性,需要用到引号 let arr = [ { name: '1', prop: '123' }, { name: '2', prop: '111' } ] arr.forEach(item => { console.log('123', item[' 阅读全文
posted @ 2023-06-26 10:10 zy89898976 阅读(144) 评论(0) 推荐(0) 编辑
  2023年6月21日
摘要: let text = 'key' let obj = { [text]: 'value' } console.log(obj) // key: value 阅读全文
posted @ 2023-06-21 08:38 zy89898976 阅读(297) 评论(0) 推荐(0) 编辑
  2023年6月15日
摘要: 在A -> B页面时,如果想要将A页面中的数据传给B,可以使用eventChannel方法或者用url拼接,在这里先说明第一种eventChannel方法如何实现。 A页面: 首先定义了一个点击事件handleItemClick,触发点击事件后再传递数据 data() { return { item 阅读全文
posted @ 2023-06-15 16:18 zy89898976 阅读(689) 评论(0) 推荐(0) 编辑
  2023年6月5日
摘要: //绑定事件需要用on前缀 return ( <span style={{ color: 'red', cursor: 'pointer' }} on-click={() => { this.confirmUpdata(row) }} > 确认更新 </span> ) return ( <i on- 阅读全文
posted @ 2023-06-05 16:44 zy89898976 阅读(5) 评论(0) 推荐(0) 编辑