摘要:
使用vue-touch步骤 npm install vue-touch@next --save //在vue项目中的main.js文件中引入:import VueTouch from 'vue-touch'Vue.use(VueTouch, {name: 'v-touch'}) <v-touch v 阅读全文
posted @ 2021-09-27 14:53
卡布奇诺。不加糖
阅读(143)
评论(0)
推荐(0)
摘要:
<template> <li v-for="(item,index) in workList" :key="index" class="workLi" :class="top[index]"> <div class="workListLeft"> <h3 class="workT"> <span>{ 阅读全文
posted @ 2021-09-27 14:50
卡布奇诺。不加糖
阅读(244)
评论(0)
推荐(0)
摘要:
纵向table表头 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <table border="0"> <tbody> </tbody> </tab 阅读全文
posted @ 2021-09-27 14:48
卡布奇诺。不加糖
阅读(407)
评论(0)
推荐(0)
摘要:
步骤条 <template> <div> <ul class="steps"> <li v-for="(item,index) in SetData" :key="item+index" :class="{'active':Steps index+1}" >{{ item + Steps }} </ 阅读全文
posted @ 2021-09-27 14:47
卡布奇诺。不加糖
阅读(92)
评论(0)
推荐(0)
摘要:
滚动条 Window.scrollTo(0,1800)//浏览器滚动条滚动 移动端使用 SetTimeout(()=>{ Window.scrollTo(0,1800) },100) 阅读全文
posted @ 2021-09-27 14:47
卡布奇诺。不加糖
阅读(60)
评论(0)
推荐(0)
摘要:
伪元素的用途 css中的属性是插入生成的内容,它一般与伪元素:befor和 :after 配合使用。 content:"." 就表示在需要的地方插入"." counter-increment属性递增一个或多个计数器值。 counter-reset默认值为0 counter-increment属性通常 阅读全文
posted @ 2021-09-27 14:46
卡布奇诺。不加糖
阅读(39)
评论(0)
推荐(0)
摘要:
1.find() 返回数组中第一个满足条件的数据 (1)// var num = [10, 20, 30, 40, 50, 60, 70, 80, 90]; var newNum1 = num.find((item, index) => { return item > 40; }) console. 阅读全文
posted @ 2021-09-27 14:45
卡布奇诺。不加糖
阅读(119)
评论(0)
推荐(0)
摘要:
el-tree动态禁用状态 <template> <div class="hello"> <h1>{{ msg }}</h1> <el-tree accordion show-checkbox :data="testOrgList1" style="display: flex;flex-direct 阅读全文
posted @ 2021-09-27 14:39
卡布奇诺。不加糖
阅读(1507)
评论(0)
推荐(0)
摘要:
组件内守卫 const Foo = { template: `...`, beforeRouteEnter(to, from, next) { // 在渲染该组件的对应路由被 confirm 前调用 // 不!能!获取组件实例 `this` // 因为当守卫执行前,组件实例还没被创建 }, befo 阅读全文
posted @ 2021-09-27 14:38
卡布奇诺。不加糖
阅读(47)
评论(0)
推荐(0)
摘要:
触发高频事件后 n 秒内函数只会执行一次,如果 n 秒内高频事件再次被触发,则重新计算时间。(防抖让一个函数在一定间隔内没有被调用时,才开始执行被调用方法) export const Debounce = (function () { let timer = null return function 阅读全文
posted @ 2021-09-27 14:32
卡布奇诺。不加糖
阅读(39)
评论(0)
推荐(0)
摘要:
普通数组去重 vm.bleDevices = Array.from(new set(vm.bleDevices)) 对象数组去重 unique(arr) { const res = new Map(); return arr.filter((arr) => !res.has(arr.mac) && 阅读全文
posted @ 2021-09-27 14:27
卡布奇诺。不加糖
阅读(19)
评论(0)
推荐(0)
摘要:
Object.keys(obj).length,判断对象属性数组长度。 阅读全文
posted @ 2021-09-27 14:26
卡布奇诺。不加糖
阅读(115)
评论(0)
推荐(0)
摘要:
删除数组中的某一个对象 var index = this.dialogList.findIndex(citem=>citem.CHECK_ID item.CHECK_ID) this.dialogList.splice(index,1) 数组对象去重 var obj = {}; vm.DEVICED 阅读全文
posted @ 2021-09-27 14:23
卡布奇诺。不加糖
阅读(374)
评论(0)
推荐(0)
摘要:
Object.assign(this.$data, this.$options.data()) 阅读全文
posted @ 2021-09-27 14:19
卡布奇诺。不加糖
阅读(33)
评论(0)
推荐(0)
摘要:
父组件向子组件传值 父组件 <template> <div id="app"> <mailTable :father="father"></mailTable> </div> </template> <script> import mailTable from '../utils/table' ex 阅读全文
posted @ 2021-09-27 14:12
卡布奇诺。不加糖
阅读(546)
评论(0)
推荐(0)

浙公网安备 33010602011771号