摘要: 1.父组件与子组件传值props 1.1定义父组件,父组件传递 inputText这个数值给子组件: //父组件 //引入的add-widget组件 //使用 v-bind 的缩写语法通常更简单: <add-widget :msg-val="msg"> //这里必须要用 - 代替驼峰 // HTML 阅读全文
posted @ 2021-03-08 22:43 1183788267 阅读(81) 评论(0) 推荐(0) 编辑
摘要: npm是node.js的包管理工具,在node环境下进行,类似maven是用来管理java jar包的 webpack 是前端资源加载/打包工具,用于把.vue文件转换成.js文件,这个转换需要借助打包器vue-loader,打包器的下载需要npm,Webpack又是基于NodeJs开发的 vue- 阅读全文
posted @ 2021-03-08 21:53 1183788267 阅读(548) 评论(0) 推荐(0) 编辑
摘要: window.self window.top //1. 如果返回false –> 说明页面被嵌套在iframe中了 //2. 如果返回true –> 说明页面并没有被嵌套在iframe中 阅读全文
posted @ 2021-03-03 13:59 1183788267 阅读(639) 评论(0) 推荐(0) 编辑
摘要: (https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|] ((https?|ftp|file)://|www.)[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|] 阅读全文
posted @ 2020-11-26 14:25 1183788267 阅读(96) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/a2640d3476f8 下载ruby windows下的可执行文件.exe 进入ruby官网,下载对应版本。 安装ruby 安装的时候需要注意勾选 Add Ruby executables to your PATH 添加到系统环境变量 安装.pn 阅读全文
posted @ 2020-02-14 10:47 1183788267 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 使用// 1. 简单模式,设置html元素滚动 $(document).ready(function() { $("html").niceScroll(); }); // 2. 返回对象的实例 var nice = false; $(document).ready(function() { nice 阅读全文
posted @ 2018-11-05 14:20 1183788267 阅读(516) 评论(0) 推荐(0) 编辑
摘要: 文本框根据输入内容自适应高度 文本框根据输入内容自适应高度 阅读全文
posted @ 2018-11-02 16:16 1183788267 阅读(152) 评论(0) 推荐(0) 编辑
摘要: <div class="editdiv" id="edit" contenteditable="true">这是添加文字</div> getC($('.editdiv')) function getC(el){ el = el[0]; // jquery 对象转dom对象 el.focus(); v 阅读全文
posted @ 2018-11-02 16:15 1183788267 阅读(3488) 评论(1) 推荐(1) 编辑
摘要: document.getElementsByTagName('body')[0].style.height = window.innerHeight+'px'; 阅读全文
posted @ 2018-10-26 19:31 1183788267 阅读(3612) 评论(0) 推荐(0) 编辑
摘要: 1.动态设置背景图片<div v-if='img ' :style="{background: 'url('+ img +')',backgroundSize:cover }"></div>2.动态设置class<div class="slideAudio" :class="{active:audi 阅读全文
posted @ 2018-10-16 10:56 1183788267 阅读(4035) 评论(0) 推荐(0) 编辑