| | |
| | | output: 'true', |
| | | required: 'false', |
| | | type: 'text', |
| | | noValue: 'true', |
| | | uuid: Utils.getuuid() |
| | | } |
| | | |
| | | if (item.type === 'number') { |
| | | cell.type = 'number' |
| | | cell.decimal = item.decimal |
| | | |
| | | if (item.noValue === 'hide') { |
| | | cell.noValue = 'false' |
| | | } |
| | | } |
| | | |
| | | columns.push(cell) |
| | |
| | | console.warn(e) |
| | | _item.value = '' |
| | | } |
| | | } else if (item.interception === 'charTure') { |
| | | let str = _item.value.replace(/(^\s*|\s*$)/g, '') |
| | | let result = '' |
| | | for (let i = 0 ; i < str.length; i++) { |
| | | let code = str.charCodeAt(i) |
| | | if (code >= 65281 && code <= 65373) { |
| | | result += String.fromCharCode(str.charCodeAt(i) - 65248) |
| | | } else if (code === 12288) { |
| | | result += String.fromCharCode(str.charCodeAt(i) - 12288 + 32) |
| | | } else { |
| | | result += str.charAt(i) |
| | | } |
| | | } |
| | | _item.value = result |
| | | } else { |
| | | _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') |
| | | } |
| | |
| | | console.warn(e) |
| | | _item.value = '' |
| | | } |
| | | } else if (item.interception === 'charTure') { |
| | | let str = _item.value.replace(/(^\s*|\s*$)/g, '') |
| | | let result = '' |
| | | for (let i = 0 ; i < str.length; i++) { |
| | | let code = str.charCodeAt(i) |
| | | if (code >= 65281 && code <= 65373) { |
| | | result += String.fromCharCode(str.charCodeAt(i) - 65248) |
| | | } else if (code === 12288) { |
| | | result += String.fromCharCode(str.charCodeAt(i) - 12288 + 32) |
| | | } else { |
| | | result += str.charAt(i) |
| | | } |
| | | } |
| | | _item.value = result |
| | | } else { |
| | | _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') |
| | | } |
| | |
| | | console.warn(e) |
| | | _item.value = '' |
| | | } |
| | | } else if (item.interception === 'charTure') { |
| | | let str = _item.value.replace(/(^\s*|\s*$)/g, '') |
| | | let result = '' |
| | | for (let i = 0 ; i < str.length; i++) { |
| | | let code = str.charCodeAt(i) |
| | | if (code >= 65281 && code <= 65373) { |
| | | result += String.fromCharCode(str.charCodeAt(i) - 65248) |
| | | } else if (code === 12288) { |
| | | result += String.fromCharCode(str.charCodeAt(i) - 12288 + 32) |
| | | } else { |
| | | result += str.charAt(i) |
| | | } |
| | | } |
| | | _item.value = result |
| | | } else { |
| | | _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') |
| | | } |
| | |
| | | key: 'inputType', |
| | | label: '加密显示', |
| | | initVal: card.inputType || 'text', |
| | | tooltip: '输入框内容以 ****** 显示。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'text', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | type: 'select', |
| | | key: 'interception', |
| | | label: '截取方式', |
| | | label: '文本预处理', |
| | | initVal: card.interception || 'true', |
| | | tooltip: '提交时的文本处理方式,空白字符指开头或结尾的空白字符。', |
| | | tooltip: '提交时的文本处理方式。注:全角转半角时会去除首尾空格', |
| | | options: [{ |
| | | value: 'false', |
| | | text: '无' |
| | | }, { |
| | | value: 'true', |
| | | text: '空白字符' |
| | | text: '去掉首尾空格' |
| | | // }, { |
| | | // value: 'char', |
| | | // text: '全角转半角' |
| | | }, { |
| | | value: 'charTure', |
| | | text: '全角转半角' |
| | | }, { |
| | | value: 'func', |
| | | text: '自定义函数' |