提交 7dbf2fd1 编写于 作者: RedPig97's avatar RedPig97

update: 更新

上级 0a918a66
......@@ -17,8 +17,8 @@
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
{{#if item.psEditor.psAppDataEntity}}
deMajorField="{{item.psEditor.psAppDataEntity.majorPSAppDEField.codename}}"
deKeyField="{{item.psEditor.psAppDataEntity.codeName}}"
{{!-- deMajorField="getDeMajorField({{item.psEditor.psAppDataEntity.codeName}})" --}}
{{!-- deKeyField="{{item.psEditor.psAppDataEntity.codeName}}" --}}
{{/if}}
{{!-- :acParams="getAcParams({{item.psEditor}})" --}}
{{#if item.psEditor.editorParams.sort}}
......
......@@ -22,6 +22,9 @@
{{#if item.psEditor.psNavigateParams}}
localParam="{{item.psEditor.psNavigateParams}}"
{{/if}}
{{#eq item.psEditor.editorType "MDROPDOWNLIST"}}
:multiple="true"
{{/eq}}
:contextProp="state.context"
:viewParamsProp="state.viewParams"
@editorEvent="handleEditorEvent"/>
......@@ -4,6 +4,8 @@
{{#*inline "AC_FS_NOBUTTON"}}{{>@macro/editor/auto-complete.hbs}}{{/inline}}
{{#*inline "CHECKBOXLIST"}}{{>@macro/editor/checkbox-list.hbs}}{{/inline}}
{{#*inline "CHECKBOX"}}{{>@macro/editor/checkbox.hbs}}{{/inline}}
{{#*inline "LISTBOXPICKUP"}}{{>@macro/editor/checkbox-list.hbs}}{{/inline}}
{{#*inline "LISTBOX"}}{{>@macro/editor/checkbox-list.hbs}}{{/inline}}
{{#*inline "PICKEREX_LINKONLY"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKER"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
{{#*inline "PICKEREX_NOBUTTON"}}{{>@macro/editor/data-picker.hbs}}{{/inline}}
......
......@@ -16,11 +16,6 @@ interface AutoCompleteProps {
*/
name: string;
/**
* @description 值项
*/
valueItem: string;
/**
* @description 占位提示信息
*/
......@@ -67,14 +62,14 @@ interface AutoCompleteProps {
sort?: string;
/**
* @description 是否展开下拉框
* @description 外键值附加数据
*/
open: boolean;
pickUpData?: string;
/**
* @description 外键值附加数据
* @description 是否默认展开
*/
pickUpData?: string;
defaultOpen: boolean;
/**
* @description 禁用
......@@ -95,7 +90,7 @@ const props = withDefaults(defineProps<AutoCompleteProps>(), {
disabled: false,
readonly: false,
showButton: true,
open: true,
defaultOpen: true,
});
const emit = defineEmits<EditorEmit>();
const { navContext, navViewParam } = handleEditorNavParams(props);
......@@ -134,7 +129,7 @@ const onSearch = (value: string) => {
};
const filterOption= (inputValue: string,option: IParam) => {
return option[props.deMajorField].includes(inputValue);
return option[props.deMajorField].toUpperCase().indexOf(inputValue.toUpperCase()) >= 0;
}
const onSelect = (value: any) => {
......@@ -146,11 +141,6 @@ const onSelect = (value: any) => {
action: "valueChange",
data: selectItem[props.deMajorField],
});
emit("editorEvent", {
tag: props.valueItem,
action: "valueChange",
data: selectItem[props.deKeyField],
});
}
</script>
......@@ -159,15 +149,16 @@ const onSelect = (value: any) => {
<a-auto-complete
:class="['app-editor-container', `app-auto-complete-${name}`]"
:allowClear="true"
:value="value"
v-model:value="value"
:placeholder="placeholder"
:options="items"
:filterOption="filterOption"
:disabled="disabled || readonly"
@search="onSearch"
:defaultOpen="true"
>
<template #option="{ srfmajortext: caption,srfkey: value }">
<div @click="onSelect(value)">{{caption}}</div>
<div @click="onSelect(value)">\{{caption}}</div>
</template>
</a-auto-complete>
</template>
......
......@@ -107,10 +107,6 @@ const previewFile = (file: IParam) => {
}
const onChange = ($event: any) => {
if($event.fileList.length > props.limit) {
console.log(`当前限制选择 ${props.limit} 个文件, 共选择了 ${$event.fileList.length} 个文件`);
return;
}
fileList.value = $event.fileList;
emit("editorEvent", {
tag: props.name,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册