Vue2 Element dom.js 详解
标签: ElementVue2 | 分类:Vue | 评论数:0
一个 dom.js 模块功能比较简单,把一些常用的 dom 操作封装在这里。比如:类的添加删除,样式的设置等。 dom.js /* istanbul ignore next */ import Vue from 'vue'; // 运行环境 const isServer = Vue.prototype.$isServer; // 匹配 “:”,“-”,“_” 中的任意一个,但每一个都可以重复,并且连带后面的一个字符(用于改为大写) const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g; // 匹配 moz开头...