随笔分类 -  前端

摘要:安装 npm install muse ui typeface roboto material design icons vuex axios save Muse UI 是一套 Material Design 风格开源组件库,旨在快速搭建页面。它基于 Vue 2.0 开发,并提供了自定义主题,充分满 阅读全文
posted @ 2019-04-28 10:50 random_lee 阅读(6211) 评论(0) 推荐(0)
摘要:config index.js 'use strict' // Template version: 1.3.1 // see http://vuejs templates.github.io/webpack for documentation. const path = require('path' 阅读全文
posted @ 2019-04-28 10:49 random_lee 阅读(3970) 评论(0) 推荐(0)
摘要:vue element ui中引入第三方icon 1. 把图标加入项目 2. 设置项目名称,下载项目(项目名称自定义) 3. 解压项目到开发目录 4. 在main.js中全局引入css文件 5. 修改下载下来的项目中的css文件,iconfont.css 阅读全文
posted @ 2019-04-28 10:46 random_lee 阅读(781) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/mhbsoft/article/details/82894291 https://blog.csdn.net/qq_33050575/article/details/70332554 阅读全文
posted @ 2019-04-11 05:46 random_lee 阅读(2002) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/xum222222/article/details/81699376 阅读全文
posted @ 2019-03-31 04:34 random_lee 阅读(239) 评论(0) 推荐(0)
摘要:数组 遍历 普通遍历 最简单的一种,也是使用频率最高的一种。 优化: 缓存数组长度: 使用临时变量,将长度缓存起来,避免重复获取数组长度,当数组较大时优化效果才会比较明显。 for-in 这个循环很多人爱用,但实际上,经分析测试,在众多的循环遍历方式中它的效率是最低的。 for-of 这种方式是es 阅读全文
posted @ 2019-03-29 09:53 random_lee 阅读(8903) 评论(0) 推荐(0)
摘要:原文链接https://www.cnblogs.com/xiaoyulive/p/7906548.html 在使用js编程的时候,常常会用到集合对象,集合对象其实是一种泛型,在js中没有明确的规定其内元素的类型,但在强类型语言譬如Java中泛型强制要求指定类型。 ES6引入了iterable类型,A 阅读全文
posted @ 2019-03-29 09:38 random_lee 阅读(3758) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-03-29 09:20 random_lee 阅读(765) 评论(0) 推荐(0)
摘要:问题细化一下是这样的:比如我有一个用来修改数据的表单,第一条数据是{name: 'Xixi', age: 12},打开表单后就有两个输入框分别填的是Xixi和12,此时我修改Xixi为Haha,调用this.$refs[].resetFields()后,该表单数据恢复为Xixi和12,这是没问题的。 阅读全文
posted @ 2019-03-19 17:42 random_lee 阅读(3814) 评论(1) 推荐(0)
摘要: 阅读全文
posted @ 2019-03-19 12:17 random_lee 阅读(298) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/luoxuemei/p/9295506.html 阅读全文
posted @ 2019-03-18 15:55 random_lee 阅读(3177) 评论(0) 推荐(0)
摘要:https://segmentfault.com/a/1190000015782272 阅读全文
posted @ 2019-03-13 23:27 random_lee 阅读(461) 评论(0) 推荐(0)
摘要:参考文章 https://segmentfault.com/a/1190000009392552 阅读全文
posted @ 2019-03-13 00:12 random_lee 阅读(2154) 评论(0) 推荐(0)
摘要:注:组件信息流转的时候只能单向1 > 父子传参传参:通过属性prop:传递数据 a.父组件传参给子组件 子组件: <ul> <li v-for="item in dataList"></li> </ul> export default { prop: { //prop接收传过来的参数 dataLis 阅读全文
posted @ 2019-03-13 00:07 random_lee 阅读(1248) 评论(0) 推荐(0)
摘要:第一步:设置不同的接口地址 找到文件:/config/dev.env.js 代码修改为: 1 2 3 4 5 6 7 var merge = require('webpack-merge') var prodEnv = require('./prod.env') module.exports = m 阅读全文
posted @ 2019-03-12 12:21 random_lee 阅读(8360) 评论(0) 推荐(0)
摘要:{{title1}}{{title}} 阅读全文
posted @ 2019-02-13 09:13 random_lee 阅读(277) 评论(0) 推荐(0)
摘要:jQuery获取: jQuery.parent(expr),找父亲节点,可以传入expr进行过滤,比如$("span").parent()或者$("span").parent(".class") jQuery.parents(expr),类似于jQuery.parents(expr),但是是查找所有 阅读全文
posted @ 2019-01-23 14:51 random_lee 阅读(39190) 评论(0) 推荐(0)
摘要://设置默认全局baseURL axios.defaults.baseURL=process.env.BASE_API; //设置默认全局携带浏览器cookie axios.defaults.withCredentials=true; Vue.prototype.$http = axios; 阅读全文
posted @ 2018-12-24 10:37 random_lee 阅读(285) 评论(0) 推荐(0)
摘要:proxyTable: { '/zabbix_api': { target: 'http://10.88.22.8',//设置你调用的接口域名和端口号 别忘了加http changeOrigin: true, pathRewrite: { '^/zabbix_api/': '/zabbix_api/', ... 阅读全文
posted @ 2018-12-24 10:35 random_lee 阅读(261) 评论(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. //main.js在渲染的时候会被webpack引入变成app.js文件 app.js文件在index.html中会被... 阅读全文
posted @ 2018-12-21 01:10 random_lee 阅读(5905) 评论(1) 推荐(1)