摘要: 1.适配问题 //需要刷新才能适配 window.onresize('resize', () => { myChart.resize() }) //不需要刷新,动态适配宽度 window.addEventListener('resize', () => { myChart.resize() }) 2 阅读全文
posted @ 2023-11-17 17:11 Nancy* 阅读(99) 评论(0) 推荐(0)
摘要: /* select多选tags超出省略显示 */ .el-select__tags-text { display: inline-block; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowra 阅读全文
posted @ 2023-11-15 09:45 Nancy* 阅读(823) 评论(0) 推荐(0)
摘要: 1.下载pdf.js文件Getting Started (mozilla.github.io) 2.将下载的文件放进uniapp项目中 3.创建预览页面 代码: <template> <view> <web-view :src="allUrl"></web-view> </view></templa 阅读全文
posted @ 2023-10-27 15:08 Nancy* 阅读(1196) 评论(0) 推荐(0)
摘要: //生成从minNum到maxNum的随机数 randomNum(minNum, maxNum) { switch (arguments.length) { case 1: return parseInt(Math.random() * minNum + 1, 10); case 2: return 阅读全文
posted @ 2023-09-01 15:13 Nancy* 阅读(98) 评论(0) 推荐(0)
摘要: 会显示的报错信息如下 在success后加bind(this) 阅读全文
posted @ 2023-07-21 14:53 Nancy* 阅读(399) 评论(0) 推荐(0)
摘要: 去掉为空字段 const filteredArr = this.arouselList.filter((obj) => { return !(Object.prototype.hasOwnProperty.call(obj, 'pic') && (obj.pic null || obj.pic un 阅读全文
posted @ 2023-07-13 09:31 Nancy* 阅读(481) 评论(0) 推荐(0)
摘要: // 修改对象属性名 this.otherfileList = JSON.parse(JSON.stringify(res.data).replace(/fileOriginName/g, 'name')) //data为数组,fileOriginName为修改前,name为修改后 阅读全文
posted @ 2023-07-10 14:31 Nancy* 阅读(46) 评论(0) 推荐(0)
摘要: 实现效果: 表格代码: <el-table :data="dataList" :span-method="objectSpanMethod" :header-cell-style="{background:'#F4F8FF'}" ref="multipleTable" tooltip-effect= 阅读全文
posted @ 2023-04-12 10:27 Nancy* 阅读(1199) 评论(0) 推荐(0)
摘要: addarrdata (data) { if (!Array.isArray(data)) {//验证data是不是数组类型 return [] } data.forEach(item => { item.parentId = item.fid item.label = item.typeName 阅读全文
posted @ 2023-03-21 15:53 Nancy* 阅读(42) 评论(0) 推荐(0)
摘要: 安装moment npm install moment --save引入moment import moment from 'moment'; 使用 this.dataFrom.bookTime = moment(this.dataFrom.bookTime).format('YYYY年MM月DD日 阅读全文
posted @ 2023-03-13 16:20 Nancy* 阅读(26) 评论(0) 推荐(0)