12 2021 档案

摘要:1、正常情况下,在一次事件中调用多次通知,会出现重叠 DOM <el-button type="primary" plain @click="doNotify">弹出通知叠加</el-button> js doNotify() { for (let i = 0; i < 3; i++) { this 阅读全文
posted @ 2021-12-31 16:51 吴小明- 阅读(1194) 评论(0) 推荐(0) 编辑
摘要:封装echarts折线图1、下载插件 npm i echarts 2、components/ColorLine.vue <template> <div class="color-line" :id="id"></div> </template> <script> const echarts = require('echar 阅读全文
posted @ 2021-12-31 10:17 吴小明- 阅读(191) 评论(0) 推荐(0) 编辑
摘要:1、将下载好的字体引入到assets中 2、src/styles/common.less @font-face { font-family: 'digital'; src: url('~@assets/fonts/DS-Digital Bold.ttf'); } 3、main.js中引入样式文件 i 阅读全文
posted @ 2021-12-30 21:32 吴小明- 阅读(558) 评论(0) 推荐(0) 编辑
摘要:一、countup.js 1、下载 npm i countup.js@1.9.3 (最新版本的有问题) 2、DOM <div class="num-wrapper"> <span ref="countupRef" v-for="item in numList" :key="item">{{item} 阅读全文
posted @ 2021-12-30 21:25 吴小明- 阅读(1631) 评论(0) 推荐(0) 编辑
摘要:评论: 1、评论列表默认加载10条,下拉加载下一页。使用的是vant的list组件load事件 2、回复默认只展示3条,超出隐藏,点击【展开全部评论】加载剩下的回复,点击【收起】回到默认状态 3、点击评论者可以回复当前评论,input中显示回复的谁,并聚焦 this.$refs.inputRef.f 阅读全文
posted @ 2021-12-30 20:03 吴小明- 阅读(539) 评论(0) 推荐(0) 编辑
摘要:命令:git checkout -b new_branch_name history_commit_id 例如:git checkout -b release_rollback20211229 c7215d...f8ef74 阅读全文
posted @ 2021-12-29 14:08 吴小明- 阅读(163) 评论(0) 推荐(0) 编辑
摘要:components/ListScroller.vue <template> <van-pull-refresh ref="vanPullRefreshRef" v-model="refreshing" @refresh="onRefresh" :style="{height: listHeight 阅读全文
posted @ 2021-12-20 14:42 吴小明- 阅读(1112) 评论(0) 推荐(0) 编辑
摘要:import * as XLSX from 'xlsx'; export function getXlsxData(file: any) { return new Promise((resolve, reject) => { const fileReader = new FileReader(); 阅读全文
posted @ 2021-12-14 16:18 吴小明- 阅读(891) 评论(0) 推荐(0) 编辑
摘要:公司维护的项目使用的是elementUI最早的1.x版本的,文本域不支持show-word-limit属性 解决: <el-form-item label="申请理由"> <el-input v-model="formData.applycontent" type="textarea" :autos 阅读全文
posted @ 2021-12-07 16:10 吴小明- 阅读(414) 评论(0) 推荐(0) 编辑
摘要:限制区间30天: pickerMinDate: '', pickerOptions: { onPick: ({ maxDate, minDate }) => { this.pickerMinDate = minDate.getTime() if (maxDate) this.pickerMinDat 阅读全文
posted @ 2021-12-07 10:57 吴小明- 阅读(735) 评论(0) 推荐(0) 编辑
摘要:需求:点击【更多操作】,显示【编辑】【删除】,点击灰色区域关闭弹层 DOM结构: <div class="more-operations"> <transition name="popup"> <div class="popup" v-show="isShow" @click="handleClos 阅读全文
posted @ 2021-12-06 10:23 吴小明- 阅读(177) 评论(0) 推荐(0) 编辑
摘要:js算出对称的年月日for (let year = 2000; year <= 2060; year++) { const str = String(year) .split('') .reverse() .join('') const month = str.substring(0, 2) const day = s 阅读全文
posted @ 2021-12-03 14:01 吴小明- 阅读(33) 评论(0) 推荐(0) 编辑
摘要:- 当选中项目后,每隔5秒缓存一次当前页面所填内容 - 缓存至localStorage中,过期时间为7日,到期后自动删除当前项目的缓存,namespace为【visitPlanList】 - 中途退出软件时,下次进入新增页,选中之前的项目,会回显对应的内容 - 如果手动点击【放弃】按钮,并确认退出, 阅读全文
posted @ 2021-12-02 18:15 吴小明- 阅读(965) 评论(0) 推荐(0) 编辑
摘要:方式一:使用transition标签包裹需要过渡动画的标签 <transition name="checkbox"> <van-checkbox v-model='item.flag' v-show="isSign"> <template #icon="props"> <div :class="pr 阅读全文
posted @ 2021-12-02 17:03 吴小明- 阅读(445) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示