@@ -116,12 +116,20 @@ const encrypt = (fields: string, useFormField: boolean, encryptMsg: Array<string
})
}
+/**
+ * @description: 获取表单数据
+ */
+const getFormData = () => {
+ return dialogFormRef.value?.getFormData()
+}
+
onMounted(() => {
dialogConfig.title = dialogConfigInfo.title
addUrl.value = props.config.reqConfig.url // 保存一下新增的URL
defineExpose({
+ getFormData,
addForm,
editForm,
encrypt
@@ -212,6 +212,7 @@ defineExpose({
:placeholder="item.otherOptions.placeholder"
size="default"
:id="item.name"
+ :filterable="item.otherOptions.searchSelected"
>
<el-option
v-for="val in item.otherOptions.options"
@@ -20,6 +20,7 @@ export interface FormField {
otherOptions?: {
placeholder?: string
tip?: string | (() => string | VNode)
+ searchSelected?: boolean // 选择框是否可搜索,此选项只对select生效
options?: Array<{ name: string; label: string; value: any }>