【发布时间】:2020-03-21 21:05:13
【问题描述】:
我想在 Quasar 框架中添加自定义属性,但是当我设置它时,ESlint 向我显示此错误:
Array prototype is read only, properties should not be added
我想为 Array 添加一个扩展方法:
Array.prototype.extend = function (other_array) {
/* You should include a test to check whether other_array really is an array */
other_array.forEach(function(v) {this.push(v)}, this)
}
【问题讨论】:
标签: javascript vue.js vuejs2 quasar-framework quasar