Vue--小知识整理

 
1. 自动获取空间属性
el-input ref="xx"
$.refs[''xx"].focus()
 
2.confirm确认框   
this.$confirm('<b>xxxxxx</b>:'+this.temp.summary+'<br/><b>yyyyyyyyyyy</b>:'+apires, '确认信息', {
          distinguishCancelAndClose: true,
          dangerouslyUseHTMLString:true,
          confirmButtonText: '替换',
          cancelButtonText: '放弃'
          
        })
          .then(() => {
            this.temp.summary=apires
          })
          .catch(action => { });
 
 
3. element datetimepicker 默认时间
[new Date(new Date().toLocaleDateString()).getTime(),
        new Date(new Date().toLocaleDateString()).getTime() + ((24 * 60 * 60 * 1000) - 1)]

4.
vue执行报错cannot find module 'core-js/modules/es6.regexp.constructor'

不识别es6语法

cnpm install core-js@2

安装淘宝镜像

原文地址:https://www.cnblogs.com/mailaidedt/p/12312999.html