UNPKG

igi_orion_cignacmb

Version:

Censors words out of text

28 lines (24 loc) 816 B
var CentralWidget = require('./CentralWidget'); var inputFilter = require('../lib/inputFilter'); var input = $.extend({}, CentralWidget, { type: 'input', //组件的类别,用于service层动态对比配置进行实例化 historyValue: '', value: '', readonly: false, setValue: function (value) { //设置值 var that = this; that.value = value }, getValue: function () { //获取值 var that = this; return that.value; }, fix: function () { //自动修复,例如去除空格,大小写转换等逻辑 var that = this; // that.value = inputFilter.replaceSpace(that.value); if(that.value){ that.value = that.value.replace(/ /g, ""); } }, }); module.exports = input;