提交 6b0ed69c 编写于 作者: zhujiamin's avatar zhujiamin

update:调整编辑器

上级 96aecdbc
......@@ -213,24 +213,28 @@ const selectArray: Ref<boolean> = computed(() => {
// return Object.is(props.editorType, 'LISTBOX') ? 'value' : props.deKeyField;
// });
const onChange = ($event: any[]) => {
const onChange = ($event: any) => {
let value: null | string | number = null;
if (Object.is(props.mode, 'string')) {
let _datas: string[] = [];
items.value.forEach((item: any) => {
const index = $event.findIndex((_key: any) => Object.is(item.value, _key));
if (index === -1) {
return;
}
_datas.push(item.value);
});
value = _datas.join(props.valueSeparator);
if (props.multiple == true) {
if (Object.is(props.mode, 'string')) {
let _datas: string[] = [];
items.value.forEach((item: any) => {
const index = $event.findIndex((_key: any) => Object.is(item.value, _key));
if (index === -1) {
return;
}
_datas.push(item.value);
});
value = _datas.join(props.valueSeparator);
} else {
let temp: number = 0;
$event.forEach((item: any) => {
temp = temp | parseInt(item, 10);
});
value = temp;
}
} else {
let temp: number = 0;
$event.forEach((item: any) => {
temp = temp | parseInt(item, 10);
});
value = temp;
value = $event.target.value;
}
emit('editorEvent', {
tag: props.name,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册