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