02 2022 档案

摘要:父组件中使用: <file :kindId="kindId" @refresh="refresh"></file> import file from './components/file.vue'; components: { file }, data() { return { kindId: nu 阅读全文
posted @ 2022-02-24 16:17 如意酱 阅读(31) 评论(0) 推荐(0) 编辑
摘要:vue2的防抖处理(自定义指令) 在utils/index.js 文件中 // 防抖 立即执行 function debounce(fn, arg) { // delay = delay || 1000; let delay = 1000; let timeout; return function( 阅读全文
posted @ 2022-02-24 15:59 如意酱 阅读(1134) 评论(0) 推荐(0) 编辑
摘要:阿里图库管理项目用到的小图标非常方便,只需要在阿里图库创建账户,点击项目管理-我的项目-新建项目,就可以管理图标啦。 第二步:上传svg图标 第三步:在vue中使用: 在public/index.html文件中 加入点击生成的代码 放在这个位置,注意再加个style设置一下。 然后就可以在项目中使用 阅读全文
posted @ 2022-02-24 15:46 如意酱 阅读(663) 评论(0) 推荐(0) 编辑
摘要:如图效果,多选下拉框,可搜索下拉内容进行选择,一组选择后,其他组再选,之前的选项置灰(也就是说,每个选项只能被选一次。) 上代码: html: <el-dialog title="编辑" :visible.sync="dialogVisible" append-to-body width="540p 阅读全文
posted @ 2022-02-24 15:09 如意酱 阅读(151) 评论(0) 推荐(0) 编辑
摘要:这是一个可以监控每秒物体运动速度、数量的实时动态曲线图。思路是定时器控制,每秒新增一个在末尾,去掉一个在首个。来达到不断往后移的效果。 话不多说,直接上代码: data: { data:[], }, mounted() { this.operation_data_barFn(); }, method 阅读全文
posted @ 2022-02-22 11:45 如意酱 阅读(2039) 评论(0) 推荐(0) 编辑
摘要:根据不同分辨率调用不同css ( ①根据屏幕尺寸:window.screen.width >= 1680。。。) ②媒体查询 分别引用:<link rel="stylesheet" media="screen and (max-device-width:1280px)" href="test-01. 阅读全文
posted @ 2022-02-17 13:44 如意酱 阅读(399) 评论(0) 推荐(0) 编辑
摘要:切换拉取分支: git branch (查看本地分支):查看 git branch -a (查看本地+远程所有分支):查看 git checkout -b dev(自己取的名) origin/develop(要拉取的远程分支全名) :新建并拉取 git checkout master:切换到主干 代 阅读全文
posted @ 2022-02-17 13:18 如意酱 阅读(17) 评论(0) 推荐(0) 编辑
摘要:1. 确保removeEventListener方法的第二个参数 listener,即需要从目标事件移除的 EventListener 函数与addEventListener方法中的参数一致。 注意:如果是用function声明,并且函数体中访问了 this,需要用.bind() 方法绑定到 thi 阅读全文
posted @ 2022-02-17 13:14 如意酱 阅读(3630) 评论(0) 推荐(1) 编辑
摘要:CSS 滤镜 : backdrop-filter:https://www.jb51.net/css/745019.html 处理图像效果的CSS属性: https://www.w3cplus.com/css3/image-effects-with-css.html 毛玻璃效果:https://www 阅读全文
posted @ 2022-02-17 13:12 如意酱 阅读(46) 评论(0) 推荐(0) 编辑
摘要:var validatorPhone = function (rule, value, callback) { if (value "") { callback(new Error("请输入手机号")); } else if (!/^1\d{10}$/.test(value)) { callback 阅读全文
posted @ 2022-02-17 13:05 如意酱 阅读(144) 评论(0) 推荐(0) 编辑
摘要:更多方法参考:http://t.zoukankan.com/gaoht-p-14518823.html //方法一: .wrap{ width: 100%; } .item{ margin-right: 20px; margin-bottom: 20px; width: calc((100% - 2 阅读全文
posted @ 2022-02-17 13:03 如意酱 阅读(539) 评论(0) 推荐(0) 编辑
摘要:onFocus() { let input = document.getElementById("input"); input.scrollIntoView(); }, 阅读全文
posted @ 2022-02-17 13:01 如意酱 阅读(130) 评论(0) 推荐(0) 编辑
摘要:.greencircle:before{ content: ''; margin: 3px; display: table; width: 6px; height: 6px; background: #2090ff; border-radius: 50%; } 或者直接加一个 • (简单总是最重要的 阅读全文
posted @ 2022-02-17 12:59 如意酱 阅读(1233) 评论(0) 推荐(0) 编辑
摘要:日后再做进一步优化: this.learnStyleListAll = [...res.data.data]; 阅读全文
posted @ 2022-02-17 12:58 如意酱 阅读(16) 评论(0) 推荐(0) 编辑
摘要:a. vertical-align:top; 消除垂直间隙 b. 父亲设置font-size: 0; c. 子元素各设置字体大小 阅读全文
posted @ 2022-02-17 12:57 如意酱 阅读(23) 评论(0) 推荐(0) 编辑
摘要:个人见解: 闭包的实质是因为函数嵌套而形成的作用域链 闭包的定义即:函数 A 内部有一个函数 B,函数 B 可以访问到函数 A 中的变量,那么函数 B 就是闭包 简化版:一个函数想要访问外部变量,那这就是闭包。 阅读全文
posted @ 2022-02-17 12:55 如意酱 阅读(78) 评论(0) 推荐(0) 编辑
摘要:在dom中: <img v-for="(val, i) in 10" :key="i" :src="require('@/assets/img/screen/num-' + i + '.png')" /> 在data中引用图片: videoPictureUrl: require('@/assets/ 阅读全文
posted @ 2022-02-17 12:54 如意酱 阅读(115) 评论(0) 推荐(0) 编辑
摘要:export default xxximport xxx from './' export xxximport {xxx} from './' export default function(){ } import xxx from './' 阅读全文
posted @ 2022-02-17 12:54 如意酱 阅读(23) 评论(0) 推荐(0) 编辑
摘要:<div class="product_item" v-for="(item, index) in productList" :key="index" @mouseover="mouseOver(index)" @mouseleave="mouseLeave"> <img class="produc 阅读全文
posted @ 2022-02-17 12:52 如意酱 阅读(39) 评论(0) 推荐(0) 编辑
摘要:① >>>( 如果是css可以,scss等预处理器无法解析) .a >>> .b { /* ... */} ② /deep/ (版本不能太新否则报错): 解决方法:npm uninstall sass-loader npm install sass-loader@7.0.0 npm install 阅读全文
posted @ 2022-02-17 12:51 如意酱 阅读(76) 评论(0) 推荐(0) 编辑
摘要:1.值班管理 下拉搜索限制框 2.下载和导入 3.图片视频预览组件 (后续可加入滚轮放大缩小功能) 4.地图 通过经纬度定位到地图 点位管理 数据管理编辑 5.如何把阿里图库图标放到项目中(线上、本地) 6.地图小工具 7.vue3 8.表格拖拽排序 9.防抖 阅读全文
posted @ 2022-02-16 17:25 如意酱 阅读(23) 评论(0) 推荐(0) 编辑
摘要:<el-form-item label="地点" prop="weizhi" class="work-item-label"> <div class="form-tips"> 请在地图中确认位置 </div> <template> <div class="map-wrap"> <div id="GD 阅读全文
posted @ 2022-02-16 17:16 如意酱 阅读(1273) 评论(0) 推荐(0) 编辑
摘要://只能选此刻之前日期与时间: <el-form-item label="事发时间" prop="happenTime" class="work-item-label" > <el-date-picker v-model="ruleForm.happenTime" type="datetime" f 阅读全文
posted @ 2022-02-16 16:46 如意酱 阅读(662) 评论(0) 推荐(0) 编辑
摘要:效果如图: .card-wrap { width: 33%; height: 100%; box-shadow: 0px 0px 12px 1px #003ba26b inset; background: linear-gradient(to left, #196aa8, #196aa8) left 阅读全文
posted @ 2022-02-16 16:30 如意酱 阅读(511) 评论(0) 推荐(1) 编辑
摘要:.cut-border { width: 400px; height: 300px; border: solid 1px #334995; box-shadow: 0px 0px 14px 1px #173C90 inset; clip-path: polygon(20px 0, calc(100% 阅读全文
posted @ 2022-02-16 16:10 如意酱 阅读(784) 评论(0) 推荐(0) 编辑
摘要:background: linear-gradient(left, rgba(45, 73, 165, .1), rgba(45, 73, 165, .4), rgba(45, 73, 165, 0.1)); 阅读全文
posted @ 2022-02-16 16:09 如意酱 阅读(122) 评论(0) 推荐(0) 编辑
摘要:28. border-top: 1px solid; border-image: -webkit-linear-gradient(90deg, transparent, rgba(48, 160, 255, .5) 50%, transparent) 1; border-image: linear- 阅读全文
posted @ 2022-02-16 16:07 如意酱 阅读(129) 评论(0) 推荐(0) 编辑
摘要:@media all and (-webkit-min-device-pixel-ratio:0) and (min-resolution: .001dpcm) { .ball { width: 170px; height: 2px; background-image: linear-gradien 阅读全文
posted @ 2022-02-16 15:03 如意酱 阅读(293) 评论(0) 推荐(0) 编辑
摘要:/* 文字超出范围的三个点 */ width: 250px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* 超过两行显示三个点:*/ word-break: break-all; text-overflow: e 阅读全文
posted @ 2022-02-16 15:02 如意酱 阅读(126) 评论(0) 推荐(0) 编辑
摘要:<span :style="{ color: setStatusColor(scope.row.status) }"> {{setStatusCN(scope.row.status) }} </span> computed: { setStatusColor() { return function 阅读全文
posted @ 2022-02-16 14:58 如意酱 阅读(737) 评论(0) 推荐(0) 编辑
摘要:(this.currentPage - 1) *this.numPage +index +1 阅读全文
posted @ 2022-02-16 14:49 如意酱 阅读(91) 评论(0) 推荐(0) 编辑
摘要:div { display: inline-block; width: 20%; background: green; position: relative; } div:before { content: ""; display: inline-block; padding-bottom: 100 阅读全文
posted @ 2022-02-16 14:48 如意酱 阅读(309) 评论(0) 推荐(0) 编辑
摘要://设置一个监听resize window.addEventListener('resize', () => { ​ this.runningChart.resize(); }); //离开的时候销毁resize destroyed() { ​ window.removeEventListener( 阅读全文
posted @ 2022-02-16 14:46 如意酱 阅读(131) 评论(0) 推荐(0) 编辑
摘要:areaStyle: { color: { type: 'linear', colorStops: [{ offset: 0, color: 'rgba(35,174,229,1)' // 0% 处的颜色 }, { offset: 0.5, color: 'rgba(35,174,229,0.8)' 阅读全文
posted @ 2022-02-16 14:40 如意酱 阅读(3027) 评论(0) 推荐(0) 编辑
摘要:series: [{ type: 'line', color: ['#1FE3B3'], symbolSize: 5, // 设置折线上圆点大小 symbol: 'circle', // 设置拐点为实心圆}, 阅读全文
posted @ 2022-02-16 14:38 如意酱 阅读(2768) 评论(0) 推荐(0) 编辑
摘要:background-image: -webkit-linear-gradient(bottom, #003268, #0f91f6, #fff); -webkit-text-fill-color: transparent; -webkit-background-clip: text; 阅读全文
posted @ 2022-02-16 14:36 如意酱 阅读(36) 评论(0) 推荐(0) 编辑
摘要:class: <div v-bind:class="{ active: isActive, 'text-danger': hasError }"></div> <div v-bind:class="[isActive ? 'activeClass' : '', 'errorClass']"></di 阅读全文
posted @ 2022-02-16 14:35 如意酱 阅读(43) 评论(0) 推荐(0) 编辑
摘要:只能输入数字 并保留小数点后两位: <el-input maxlength="20" onkeyup="value=value.replace(/^(\d*\.?\d{0,2}).*/,'$1')"></el-input> 1.限制input输入框只能输入大小写字母、数字、下划线的正则表达式: <e 阅读全文
posted @ 2022-02-16 14:29 如意酱 阅读(203) 评论(0) 推荐(0) 编辑
摘要:watch: { // 方式一: 'cityName.name': { handler(newName, oldName) { // ... }, deep: true, immediate: true //立即执行 } //方式二: cityName(newName, oldName){ // . 阅读全文
posted @ 2022-02-16 14:28 如意酱 阅读(358) 评论(0) 推荐(0) 编辑
摘要:parseInt(Math.random() * 1000) 阅读全文
posted @ 2022-02-16 14:26 如意酱 阅读(47) 评论(0) 推荐(0) 编辑
摘要:// 获取element 结构tree的选中节点 let list = this.$refs.tree.getCheckedKeys(); //选中节点 const halfList = this.$refs.tree.getHalfCheckedKeys(); //半选节点 list = [... 阅读全文
posted @ 2022-02-16 14:24 如意酱 阅读(459) 评论(0) 推荐(0) 编辑
摘要:关键样式代码:white-space: pre-line; 示例: <span style="white-space: pre-line;" v-html="dutyDescription"></span> 阅读全文
posted @ 2022-02-16 14:19 如意酱 阅读(120) 评论(0) 推荐(0) 编辑
摘要:updated() { let scrollContainer = document.querySelector('.trend-top'); scrollContainer.scrollTop = scrollContainer.scrollHeight; }, 阅读全文
posted @ 2022-02-16 14:09 如意酱 阅读(33) 评论(0) 推荐(0) 编辑
摘要:// 父组件中调用子组件: <field ref="typeRef"></field> 在需要的地方直接用如下代码: this.$refs['typeRef'].dialogVisible = true; // 子组件调用父组件方法: this.$parent.getList(); 阅读全文
posted @ 2022-02-16 13:39 如意酱 阅读(49) 评论(0) 推荐(0) 编辑
摘要:Array.from(new Set(this.yearList)); 阅读全文
posted @ 2022-02-16 13:35 如意酱 阅读(19) 评论(0) 推荐(0) 编辑
摘要:localStorage sessionStorage标签关时清 sessionStorage.getItem('kindChoose') 取 sessionStorage.setItem('kindChoose', index) 存 sessionStorage.removeItem('kindC 阅读全文
posted @ 2022-02-16 13:34 如意酱 阅读(27) 评论(0) 推荐(0) 编辑
摘要:发现有时对象直接用 this.obj.disabled = true; 不管用,因此找了一个$set方法。 this.$set(val, 'disabled', true); 阅读全文
posted @ 2022-02-16 13:32 如意酱 阅读(25) 评论(0) 推荐(0) 编辑
摘要://方法一:直接修改img样式 .container{ width: 200px; height: 200px; overflow: hidden; border: 2px solid red; position: relative; } .container img{ width: 100%; p 阅读全文
posted @ 2022-02-16 12:59 如意酱 阅读(284) 评论(0) 推荐(0) 编辑
摘要:// 获取当前时间 getNowTime() { let dateTime; let yy = new Date().getFullYear(); let MM = new Date().getMonth() + 1; let dd = new Date().getDate(); let hh = 阅读全文
posted @ 2022-02-16 12:43 如意酱 阅读(949) 评论(0) 推荐(0) 编辑

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