
vue
lrz136
111
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
input @input节流
【代码】input @input节流。原创 2023-03-09 11:08:21 · 212 阅读 · 0 评论 -
记录一次vue项目编译报错
项目里本地引用组件,vue.config.js的config.module没加本地的packages导致报错原创 2022-10-19 11:01:38 · 1139 阅读 · 0 评论 -
数组去重方法
1.es6 Set()cosnt arr = [1,2,3,2,4,1]console.log([...new Set(arr)])2const arr = [1,2,3,2,4,1]console.log(Array.from(new Set(arr)))3.jsconst Arr = ["1", 2, "4", 2, null, "1"]const arr2 = []for(let i in Arr) { if(arr2.indexOf(Arr[i]) ==.原创 2021-01-05 20:05:13 · 102 阅读 · 0 评论 -
input[file]上传文件条件过滤
日常做文件上传时,会需要条件过滤掉一部分不符合条件1.文件格式过滤 2.数量3.尺寸过滤然后上传过程中过滤:原创 2022-06-16 11:33:38 · 1163 阅读 · 0 评论 -
js直接请求导出,非打开地址
const xhr = new XMLHttpRequest() xhr.open('get', `${process.env.VUE_APP_BASE_API}/store/registrationActivitiesApplies/export/excel`, true) xhr.setRequestHeader('token', getToken()) xhr.responseType = 'blob' // 返回类型blob // 定.原创 2021-11-23 17:44:01 · 175 阅读 · 0 评论 -
Excel导出报表
// 导出 downLoadTable() { this.isLoading = true const msg = this.$message({ showClose: true, message: '导出中,请耐心等待...', type: 'success', duration: 0 }) this.listQuery.upload = 1 winnin...原创 2021-11-23 16:16:51 · 675 阅读 · 0 评论 -
vue 使用定时器
const paramsTimer = setInterval(() => { fetchCustomizeList({ has_options: 1, store_id: this.store_id, page_size: 999, status: 1 }).then(async(res) => { if (res.code === RES_SUCCESS_CODE) { this.customizeList = res.d...原创 2021-10-29 14:43:24 · 180 阅读 · 0 评论 -
vue引入使用腾讯地图
// 引入鹅厂地图 initMap(lat = 0.0000000, lng = 0.0000000) { // 定义地图中心点坐标- var center = new TMap.LatLng(lat, lng) // 定义map变量,调用 TMap.Map() 构造函数创建地图 map = new TMap.Map(document.getElementById('txMapBox'), { center: center, // 设.原创 2021-05-25 14:25:42 · 4337 阅读 · 0 评论 -
elementUI的级联组件el-cascader重置问题
// 清空地区选中节点和高亮节点this.$nextTick(() => { this.$refs.locationCascader.$refs.panel.clearCheckedNodes() this.$refs.locationCascader.$refs.panel.activePath = []})当前页使用重置,获取到ref=locationCascader的级联组件,在进行上述操作即可;// 清空地区选中节点和高亮节点this.$nextTick(..原创 2021-05-18 09:46:20 · 2344 阅读 · 0 评论 -
main.js中定义全局方法,组件直接饮用
Vue.prototype.get7Day = function(n) { // 定义相关方法 this.date = [] this.date[0] = `${d().subtract(n, 'day').$y}-${d().subtract(n, 'day').$M + 1}-${d().subtract(n, 'day').$D}` this.date[1] = `${d(new Date()).$y}-${d(new Date()).$M + 1}-${d(new Date())..原创 2021-05-12 11:21:07 · 1718 阅读 · 0 评论 -
input输入框输入限制数字输入
<input oninput="value=value.replace(/\D+/g,'')" maxlength="11"> // vue<input @input="value=value.replace(/\D+/g,'')">原创 2021-03-01 09:04:58 · 220 阅读 · 0 评论 -
JS 实现 某日期 + 几天 = 日期
// 时间处理 handleTime (dateTemp0, days) { let dateTemp = dateTemp0.split('-') let nDate = new Date(dateTemp[1] + '-' + dateTemp[2] + '-' + dateTemp[0]) // 转换为MM-DD-YYYY格式 ...原创 2020-01-10 09:40:09 · 436 阅读 · 0 评论 -
element UI 表格序号倒序
// 处理序号=》倒序 indexMethods (index) { // currentpage当前页码,this.tableData.length总条数,index索引值 if (this.tableData.length < 10) { return (this.tableData.length - index) }...原创 2019-12-25 17:42:31 · 4344 阅读 · 0 评论 -
restful的http动词对应sql命令
对于资源的具体操作类型,由http动词表示常用的HTTP动词由下面五个(括号里对应的sql命令)GET(SELECT):从服务器取出资源(一项或多项)。POST(CREATE):在服务器新建一个资源。PUT(UPDATE):在服务器更新资源(客户端提供改变后的完整资源)。PATCH(UPDATE):在服务器更新资源(客户端提供改变的属性)。DELETE(DELETE):从服务器...原创 2019-05-07 16:46:14 · 596 阅读 · 0 评论 -
MVC与MVVM思想解析(区别)
原创 2019-03-15 11:15:23 · 265 阅读 · 0 评论