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

update:调整编辑器

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