摘要:
vue组件引入 方法内使用 参考: https://blog.csdn.net/u013344993/article/details/79984968 阅读全文
摘要:
// 输入框部分宽度 从10px到600px 相隔10像素 .generate-widths(600); .generate-widths(@n, @i: 10) when (@i =< @n) { .width@{i} { width: 0px + @i; } .generate-widths(@n, (@i+10)); } .width10 { width: 10... 阅读全文
摘要:
import constant from './const' export function getRouters (files) { let filenames = files.keys() let list = mapToList(filenames) let routerArr = getTree(list) return routerArr } function get... 阅读全文
摘要:
新建一个js校验文件validate.js 使用的时候在vue文件中引入该js及需要用的函数 阅读全文
摘要:
主体函数 调用方式 两种方式都可以获取到祖先节点的值 阅读全文
摘要:
/** * @description textarea换行符转指定字符 * @param str:要放到textarea的字符串 * @param code:要转换成换行的字符,默认为',' */ export const textareaToString = (str, code = ',') => { let lineFeed = '\n' let reg = new Reg... 阅读全文
摘要:
在用iview的时候发现iview的树中获取半选和全选的函数getCheckedAndIndeterminateNodes在我使用的iview版本里面是没有提供的, 于是自己写了一下获取全选和半选节点的数据 这个是最最笨的方法 阅读全文
摘要:
this.axios({ methods: 'get', url: url, responseType: 'blob' }).then(res => { const blob = new Blob([res]) const fileName = '导出信息.xls' if ('download' in document.createElement('a')) { // 非... 阅读全文
摘要:
常用于iview日期组件时间处理 阅读全文
摘要:
解析:1.Object.assign() 方法用于将所有可枚举属性的值从一个或多个源对象复制到目标对象。它将返回目标对象。 Object.assign(target, …sources); 参数: target => 目标对象。 sources => 源对象。 返回值: 目标对象。 2.this.$ 阅读全文