上一页 1 2 3 4 5 6 7 8 9 10 ··· 35 下一页
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>CPMS 云屋</title> <meta name="apple-mobile-web-app-capable" content="yes"> <meta content="yes" name="apple-touch-fullscreen"> 阅读全文
posted @ 2019-12-27 09:54 Jinsuo 阅读(365) 评论(0) 推荐(0) 编辑
摘要: 第一种方法是直接在子组件中通过this.$parent.event来调用父组件的方法 父组件 复制代码 <template> <div> <child></child> </div> </template> <script> import child from '~/components/dam/child'; export default { components: { child }, met 阅读全文
posted @ 2019-12-23 14:23 Jinsuo 阅读(219) 评论(0) 推荐(0) 编辑
摘要: js 随机生成颜色 方法一 function randomColor (){ var str='#'; for(var i=0;i<6;i++){ str+=Math.floor(Math.random()*16).toString(16); } return str; } 方法二 function randomColor (){ return... 阅读全文
posted @ 2019-12-06 10:27 Jinsuo 阅读(307) 评论(0) 推荐(0) 编辑
摘要: // The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' // import Vue... 阅读全文
posted @ 2019-10-31 07:59 Jinsuo 阅读(1634) 评论(0) 推荐(0) 编辑
摘要: avascript中有六种数据类型:string;boolean;Array;Object;null;undefined。如何检测这些数据类型呢,总结方法如下: 方法一:采用typeof 通过上面的检测我们发现typeof检测的Array和Object的返回类型都是Object,因此用typeof是 阅读全文
posted @ 2019-10-23 10:21 Jinsuo 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 跨域代理配置 由于3.x的默认配置都转移到了CLI service里,所以生成的项目中并没有配置项,我们如果需要自定义一些项目配置,则需要自己在项目的根目录(root)创建一个vue.config.js。vue.config.js里的配置项所有都是可选的,这就避免了我们去看一大堆不必要的默认配置,只 阅读全文
posted @ 2019-10-21 12:37 Jinsuo 阅读(5052) 评论(0) 推荐(0) 编辑
摘要: ue cli 升级到3后,package的名字从 vue-cli 改为了 @vue/cli,装了旧版本的,建议把旧版本的卸载了,再安装新版本。 卸载指令如下: npm uninstall vue-cli -g or yarn global remove vue-cli node版本要求 需要是8.9 阅读全文
posted @ 2019-10-19 19:11 Jinsuo 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 通过 call() 或 apply() 方法你可以设置 this 的值, 且作为已存在对象的新方法调用。 call() 和 apply() 是预定义的函数方法。 两个方法可用于调用函数,两个方法的第一个参数必须是对象本身。 两个方法都使用了对象本身作为第一个参数。 两者的区别在于第二个参数: app 阅读全文
posted @ 2019-10-16 17:11 Jinsuo 阅读(127) 评论(0) 推荐(0) 编辑
摘要: js对象深拷贝的方法: js对象深拷贝的方法1js对象深拷贝的方法2js对象深拷贝的方法3js对象深拷贝的方法4js对象深拷贝的方法5js对象深拷贝的方法6js对象深拷贝的方法7 分步阅读 js中,数组和对象的拷贝(复制)如果使用=号来进行复制,那只是浅拷贝。 第一步:js深拷贝和浅拷贝的概念和区别。 1.浅拷贝 拷贝就是把父对像的属性,全部拷贝给子对象。此时子对象拷贝的是父对象的地址,子... 阅读全文
posted @ 2019-10-16 16:37 Jinsuo 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 子页面 <button type="button" class="layui-btn fr r-12" onclick="orgDeputyLeaderName()">确定</button> //确定提交 子牙面选中的值 传给父页面 var num_arr_id=[],num_arr_name=[]; function orgDeputyLeaderName(){ $("#userList_rig 阅读全文
posted @ 2019-08-23 15:48 Jinsuo 阅读(315) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 35 下一页