| | |
| | | import XEUtils from 'xe-utils'; |
| | | import { componentMap } from '../componentMap'; |
| | | import { ComponentType } from '../componentType'; |
| | | import { createPlaceholderMessage } from '../helper'; |
| | | import { createPlaceholderMessage, sanitizeInputWhitespace } from '../helper'; |
| | | |
| | | /** |
| | | * @description: 获取组件 |
| | |
| | | }; |
| | | }); |
| | | if (inputFunc) { |
| | | ons[getOnName(modelEvent)] = function (targetEvnt: any) { |
| | | inputFunc(targetEvnt); |
| | | ons[getOnName(modelEvent)] = function (targetEvent: any) { |
| | | inputFunc(targetEvent); |
| | | if (events && events[modelEvent]) { |
| | | events[modelEvent](params, targetEvnt); |
| | | events[modelEvent](params, targetEvent); |
| | | } |
| | | if (isSameEvent && changeFunc) { |
| | | changeFunc(targetEvnt); |
| | | changeFunc(targetEvent); |
| | | } |
| | | }; |
| | | } |
| | |
| | | params, |
| | | (value: any) => { |
| | | // 处理 model 值双向绑定 |
| | | XEUtils.set(data, property, value); |
| | | XEUtils.set(data, property, sanitizeInputWhitespace(name as ComponentType, value)); |
| | | }, |
| | | () => { |
| | | // 处理 change 事件相关逻辑 |