mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-02 10:45:27 +08:00
v3.8.2 版本前端代码
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import type { RouteLocationNormalized, RouteRecordNormalized } from 'vue-router';
|
||||
import type { App, Plugin } from 'vue';
|
||||
import type { FormSchema } from "@/components/Form";
|
||||
import type { FormSchema, FormActionType } from "@/components/Form";
|
||||
|
||||
import { unref } from 'vue';
|
||||
import { isObject, isFunction, isString } from '/@/utils/is';
|
||||
@ -110,11 +110,12 @@ export function getValueType(props, field) {
|
||||
/**
|
||||
* 获取表单字段值数据类型
|
||||
* @param schema
|
||||
* @param formAction
|
||||
*/
|
||||
export function getValueTypeBySchema(schema: FormSchema) {
|
||||
export function getValueTypeBySchema(schema: FormSchema, formAction: FormActionType) {
|
||||
let valueType = 'string';
|
||||
if (schema) {
|
||||
const componentProps = schema.componentProps as Recordable;
|
||||
const componentProps = formAction.getSchemaComponentProps(schema);
|
||||
valueType = componentProps?.valueType ? componentProps?.valueType : valueType;
|
||||
}
|
||||
return valueType;
|
||||
|
||||
Reference in New Issue
Block a user