|
@@ -37,286 +37,265 @@
|
|
</Row>
|
|
</Row>
|
|
</Form>
|
|
</Form>
|
|
</template>
|
|
</template>
|
|
-<script lang="ts">
|
|
|
|
|
|
+<script lang="ts" setup>
|
|
import type { FormActionType, FormProps, FormSchemaInner as FormSchema } from './types/form';
|
|
import type { FormActionType, FormProps, FormSchemaInner as FormSchema } from './types/form';
|
|
import type { AdvanceState } from './types/hooks';
|
|
import type { AdvanceState } from './types/hooks';
|
|
import type { Ref } from 'vue';
|
|
import type { Ref } from 'vue';
|
|
|
|
|
|
- import { defineComponent, reactive, ref, computed, unref, onMounted, watch, nextTick } from 'vue';
|
|
|
|
|
|
+ import { reactive, ref, computed, unref, onMounted, watch, nextTick, useAttrs } from 'vue';
|
|
import { Form, Row, type FormProps as AntFormProps } from 'ant-design-vue';
|
|
import { Form, Row, type FormProps as AntFormProps } from 'ant-design-vue';
|
|
import FormItem from './components/FormItem.vue';
|
|
import FormItem from './components/FormItem.vue';
|
|
import FormAction from './components/FormAction.vue';
|
|
import FormAction from './components/FormAction.vue';
|
|
|
|
|
|
import { dateItemType } from './helper';
|
|
import { dateItemType } from './helper';
|
|
- import { dateUtil } from '/@/utils/dateUtil';
|
|
|
|
|
|
+ import { dateUtil } from '@/utils/dateUtil';
|
|
|
|
|
|
- import { deepMerge } from '/@/utils';
|
|
|
|
|
|
+ import { deepMerge } from '@/utils';
|
|
|
|
|
|
import { useFormValues } from './hooks/useFormValues';
|
|
import { useFormValues } from './hooks/useFormValues';
|
|
import useAdvanced from './hooks/useAdvanced';
|
|
import useAdvanced from './hooks/useAdvanced';
|
|
import { useFormEvents } from './hooks/useFormEvents';
|
|
import { useFormEvents } from './hooks/useFormEvents';
|
|
import { createFormContext } from './hooks/useFormContext';
|
|
import { createFormContext } from './hooks/useFormContext';
|
|
import { useAutoFocus } from './hooks/useAutoFocus';
|
|
import { useAutoFocus } from './hooks/useAutoFocus';
|
|
- import { useModalContext } from '/@/components/Modal';
|
|
|
|
|
|
+ import { useModalContext } from '@/components/Modal';
|
|
import { useDebounceFn } from '@vueuse/core';
|
|
import { useDebounceFn } from '@vueuse/core';
|
|
|
|
|
|
import { basicProps } from './props';
|
|
import { basicProps } from './props';
|
|
- import { useDesign } from '/@/hooks/web/useDesign';
|
|
|
|
|
|
+ import { useDesign } from '@/hooks/web/useDesign';
|
|
import { cloneDeep } from 'lodash-es';
|
|
import { cloneDeep } from 'lodash-es';
|
|
|
|
|
|
- export default defineComponent({
|
|
|
|
- name: 'BasicForm',
|
|
|
|
- components: { FormItem, Form, Row, FormAction },
|
|
|
|
- props: basicProps,
|
|
|
|
- emits: ['advanced-change', 'reset', 'submit', 'register', 'field-value-change'],
|
|
|
|
- setup(props, { emit, attrs }) {
|
|
|
|
- const formModel = reactive({});
|
|
|
|
- const modalFn = useModalContext();
|
|
|
|
-
|
|
|
|
- const advanceState = reactive<AdvanceState>({
|
|
|
|
- isAdvanced: true,
|
|
|
|
- hideAdvanceBtn: false,
|
|
|
|
- isLoad: false,
|
|
|
|
- actionSpan: 6,
|
|
|
|
- });
|
|
|
|
|
|
+ defineOptions({ name: 'BasicForm' });
|
|
|
|
|
|
- const defaultValueRef = ref({});
|
|
|
|
- const isInitedDefaultRef = ref(false);
|
|
|
|
- const propsRef = ref<Partial<FormProps>>();
|
|
|
|
- const schemaRef = ref<FormSchema[] | null>(null);
|
|
|
|
- const formElRef = ref<FormActionType | null>(null);
|
|
|
|
|
|
+ const props = defineProps(basicProps);
|
|
|
|
|
|
- const { prefixCls } = useDesign('basic-form');
|
|
|
|
|
|
+ const emit = defineEmits([
|
|
|
|
+ 'advanced-change',
|
|
|
|
+ 'reset',
|
|
|
|
+ 'submit',
|
|
|
|
+ 'register',
|
|
|
|
+ 'field-value-change',
|
|
|
|
+ ]);
|
|
|
|
|
|
- // Get the basic configuration of the form
|
|
|
|
- const getProps = computed(() => {
|
|
|
|
- return { ...props, ...unref(propsRef) } as FormProps;
|
|
|
|
- });
|
|
|
|
|
|
+ const attrs = useAttrs();
|
|
|
|
|
|
- const getFormClass = computed(() => {
|
|
|
|
- return [
|
|
|
|
- prefixCls,
|
|
|
|
- {
|
|
|
|
- [`${prefixCls}--compact`]: unref(getProps).compact,
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- });
|
|
|
|
|
|
+ const formModel = reactive({});
|
|
|
|
+ const modalFn = useModalContext();
|
|
|
|
|
|
- // Get uniform row style and Row configuration for the entire form
|
|
|
|
- const getRow = computed(() => {
|
|
|
|
- const { baseRowStyle = {}, rowProps } = unref(getProps);
|
|
|
|
- return {
|
|
|
|
- style: baseRowStyle,
|
|
|
|
- ...rowProps,
|
|
|
|
- };
|
|
|
|
- });
|
|
|
|
|
|
+ const advanceState = reactive<AdvanceState>({
|
|
|
|
+ isAdvanced: true,
|
|
|
|
+ hideAdvanceBtn: false,
|
|
|
|
+ isLoad: false,
|
|
|
|
+ actionSpan: 6,
|
|
|
|
+ });
|
|
|
|
|
|
- const getBindValue = computed(
|
|
|
|
- () => ({ ...attrs, ...props, ...unref(getProps) }) as AntFormProps,
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- const getSchema = computed((): FormSchema[] => {
|
|
|
|
- const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any);
|
|
|
|
- for (const schema of schemas) {
|
|
|
|
- const {
|
|
|
|
- defaultValue,
|
|
|
|
- component,
|
|
|
|
- componentProps,
|
|
|
|
- isHandleDateDefaultValue = true,
|
|
|
|
- } = schema;
|
|
|
|
- // handle date type
|
|
|
|
- if (
|
|
|
|
- isHandleDateDefaultValue &&
|
|
|
|
- defaultValue &&
|
|
|
|
- component &&
|
|
|
|
- dateItemType.includes(component)
|
|
|
|
- ) {
|
|
|
|
- const valueFormat = componentProps ? componentProps['valueFormat'] : null;
|
|
|
|
- if (!Array.isArray(defaultValue)) {
|
|
|
|
- schema.defaultValue = valueFormat
|
|
|
|
- ? dateUtil(defaultValue).format(valueFormat)
|
|
|
|
- : dateUtil(defaultValue);
|
|
|
|
- } else {
|
|
|
|
- const def: any[] = [];
|
|
|
|
- defaultValue.forEach((item) => {
|
|
|
|
- def.push(valueFormat ? dateUtil(item).format(valueFormat) : dateUtil(item));
|
|
|
|
- });
|
|
|
|
- schema.defaultValue = def;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (unref(getProps).showAdvancedButton) {
|
|
|
|
- return cloneDeep(
|
|
|
|
- schemas.filter((schema) => schema.component !== 'Divider') as FormSchema[],
|
|
|
|
- );
|
|
|
|
|
|
+ const defaultValueRef = ref({});
|
|
|
|
+ const isInitedDefaultRef = ref(false);
|
|
|
|
+ const propsRef = ref<Partial<FormProps>>();
|
|
|
|
+ const schemaRef = ref<FormSchema[] | null>(null);
|
|
|
|
+ const formElRef = ref<FormActionType | null>(null);
|
|
|
|
+
|
|
|
|
+ const { prefixCls } = useDesign('basic-form');
|
|
|
|
+
|
|
|
|
+ // Get the basic configuration of the form
|
|
|
|
+ const getProps = computed(() => {
|
|
|
|
+ return { ...props, ...unref(propsRef) } as FormProps;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ const getFormClass = computed(() => {
|
|
|
|
+ return [
|
|
|
|
+ prefixCls,
|
|
|
|
+ {
|
|
|
|
+ [`${prefixCls}--compact`]: unref(getProps).compact,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ // Get uniform row style and Row configuration for the entire form
|
|
|
|
+ const getRow = computed(() => {
|
|
|
|
+ const { baseRowStyle = {}, rowProps } = unref(getProps);
|
|
|
|
+ return {
|
|
|
|
+ style: baseRowStyle,
|
|
|
|
+ ...rowProps,
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) }) as AntFormProps);
|
|
|
|
+
|
|
|
|
+ const getSchema = computed((): FormSchema[] => {
|
|
|
|
+ const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any);
|
|
|
|
+ for (const schema of schemas) {
|
|
|
|
+ const { defaultValue, component, componentProps, isHandleDateDefaultValue = true } = schema;
|
|
|
|
+ // handle date type
|
|
|
|
+ if (
|
|
|
|
+ isHandleDateDefaultValue &&
|
|
|
|
+ defaultValue &&
|
|
|
|
+ component &&
|
|
|
|
+ dateItemType.includes(component)
|
|
|
|
+ ) {
|
|
|
|
+ const valueFormat = componentProps ? componentProps['valueFormat'] : null;
|
|
|
|
+ if (!Array.isArray(defaultValue)) {
|
|
|
|
+ schema.defaultValue = valueFormat
|
|
|
|
+ ? dateUtil(defaultValue).format(valueFormat)
|
|
|
|
+ : dateUtil(defaultValue);
|
|
} else {
|
|
} else {
|
|
- return cloneDeep(schemas as FormSchema[]);
|
|
|
|
|
|
+ const def: any[] = [];
|
|
|
|
+ defaultValue.forEach((item) => {
|
|
|
|
+ def.push(valueFormat ? dateUtil(item).format(valueFormat) : dateUtil(item));
|
|
|
|
+ });
|
|
|
|
+ schema.defaultValue = def;
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (unref(getProps).showAdvancedButton) {
|
|
|
|
+ return cloneDeep(schemas.filter((schema) => schema.component !== 'Divider') as FormSchema[]);
|
|
|
|
+ } else {
|
|
|
|
+ return cloneDeep(schemas as FormSchema[]);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
- const { handleToggleAdvanced, fieldsIsAdvancedMap } = useAdvanced({
|
|
|
|
- advanceState,
|
|
|
|
- emit,
|
|
|
|
- getProps,
|
|
|
|
- getSchema,
|
|
|
|
- formModel,
|
|
|
|
- defaultValueRef,
|
|
|
|
- });
|
|
|
|
|
|
+ const { handleToggleAdvanced, fieldsIsAdvancedMap } = useAdvanced({
|
|
|
|
+ advanceState,
|
|
|
|
+ emit,
|
|
|
|
+ getProps,
|
|
|
|
+ getSchema,
|
|
|
|
+ formModel,
|
|
|
|
+ defaultValueRef,
|
|
|
|
+ });
|
|
|
|
|
|
- const { handleFormValues, initDefault } = useFormValues({
|
|
|
|
- getProps,
|
|
|
|
- defaultValueRef,
|
|
|
|
- getSchema,
|
|
|
|
- formModel,
|
|
|
|
- });
|
|
|
|
|
|
+ const { handleFormValues, initDefault } = useFormValues({
|
|
|
|
+ getProps,
|
|
|
|
+ defaultValueRef,
|
|
|
|
+ getSchema,
|
|
|
|
+ formModel,
|
|
|
|
+ });
|
|
|
|
|
|
- useAutoFocus({
|
|
|
|
- getSchema,
|
|
|
|
- getProps,
|
|
|
|
- isInitedDefault: isInitedDefaultRef,
|
|
|
|
- formElRef: formElRef as Ref<FormActionType>,
|
|
|
|
- });
|
|
|
|
|
|
+ useAutoFocus({
|
|
|
|
+ getSchema,
|
|
|
|
+ getProps,
|
|
|
|
+ isInitedDefault: isInitedDefaultRef,
|
|
|
|
+ formElRef: formElRef as Ref<FormActionType>,
|
|
|
|
+ });
|
|
|
|
|
|
- const {
|
|
|
|
- handleSubmit,
|
|
|
|
- setFieldsValue,
|
|
|
|
- clearValidate,
|
|
|
|
- validate,
|
|
|
|
- validateFields,
|
|
|
|
- getFieldsValue,
|
|
|
|
- updateSchema,
|
|
|
|
- resetSchema,
|
|
|
|
- appendSchemaByField,
|
|
|
|
- removeSchemaByField,
|
|
|
|
- resetFields,
|
|
|
|
- scrollToField,
|
|
|
|
- } = useFormEvents({
|
|
|
|
- emit,
|
|
|
|
- getProps,
|
|
|
|
- formModel,
|
|
|
|
- getSchema,
|
|
|
|
- defaultValueRef,
|
|
|
|
- formElRef: formElRef as Ref<FormActionType>,
|
|
|
|
- schemaRef: schemaRef as Ref<FormSchema[]>,
|
|
|
|
- handleFormValues,
|
|
|
|
- });
|
|
|
|
|
|
+ const {
|
|
|
|
+ handleSubmit,
|
|
|
|
+ setFieldsValue,
|
|
|
|
+ clearValidate,
|
|
|
|
+ validate,
|
|
|
|
+ validateFields,
|
|
|
|
+ getFieldsValue,
|
|
|
|
+ updateSchema,
|
|
|
|
+ resetSchema,
|
|
|
|
+ appendSchemaByField,
|
|
|
|
+ removeSchemaByField,
|
|
|
|
+ resetFields,
|
|
|
|
+ scrollToField,
|
|
|
|
+ } = useFormEvents({
|
|
|
|
+ emit,
|
|
|
|
+ getProps,
|
|
|
|
+ formModel,
|
|
|
|
+ getSchema,
|
|
|
|
+ defaultValueRef,
|
|
|
|
+ formElRef: formElRef as Ref<FormActionType>,
|
|
|
|
+ schemaRef: schemaRef as Ref<FormSchema[]>,
|
|
|
|
+ handleFormValues,
|
|
|
|
+ });
|
|
|
|
|
|
- createFormContext({
|
|
|
|
- resetAction: resetFields,
|
|
|
|
- submitAction: handleSubmit,
|
|
|
|
- });
|
|
|
|
|
|
+ createFormContext({
|
|
|
|
+ resetAction: resetFields,
|
|
|
|
+ submitAction: handleSubmit,
|
|
|
|
+ });
|
|
|
|
|
|
- watch(
|
|
|
|
- () => unref(getProps).model,
|
|
|
|
- () => {
|
|
|
|
- const { model } = unref(getProps);
|
|
|
|
- if (!model) return;
|
|
|
|
- setFieldsValue(model);
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- immediate: true,
|
|
|
|
- },
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- watch(
|
|
|
|
- () => unref(getProps).schemas,
|
|
|
|
- (schemas) => {
|
|
|
|
- resetSchema(schemas ?? []);
|
|
|
|
- },
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- watch(
|
|
|
|
- () => getSchema.value,
|
|
|
|
- (schema) => {
|
|
|
|
- nextTick(() => {
|
|
|
|
- // Solve the problem of modal adaptive height calculation when the form is placed in the modal
|
|
|
|
- modalFn?.redoModalHeight?.();
|
|
|
|
- });
|
|
|
|
- if (unref(isInitedDefaultRef)) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (schema?.length) {
|
|
|
|
- initDefault();
|
|
|
|
- isInitedDefaultRef.value = true;
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- watch(
|
|
|
|
- () => formModel,
|
|
|
|
- useDebounceFn(() => {
|
|
|
|
- unref(getProps).submitOnChange && handleSubmit();
|
|
|
|
- }, 300),
|
|
|
|
- { deep: true },
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- async function setProps(formProps: Partial<FormProps>): Promise<void> {
|
|
|
|
- propsRef.value = deepMerge(unref(propsRef) || {}, formProps);
|
|
|
|
- }
|
|
|
|
|
|
+ watch(
|
|
|
|
+ () => unref(getProps).model,
|
|
|
|
+ () => {
|
|
|
|
+ const { model } = unref(getProps);
|
|
|
|
+ if (!model) return;
|
|
|
|
+ setFieldsValue(model);
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ immediate: true,
|
|
|
|
+ },
|
|
|
|
+ );
|
|
|
|
|
|
- function setFormModel(key: string, value: any, schema: FormSchema) {
|
|
|
|
- formModel[key] = value;
|
|
|
|
- emit('field-value-change', key, value);
|
|
|
|
- // TODO 优化验证,这里如果是autoLink=false手动关联的情况下才会再次触发此函数
|
|
|
|
- if (schema && schema.itemProps && !schema.itemProps.autoLink) {
|
|
|
|
- validateFields([key]).catch((_) => {});
|
|
|
|
- }
|
|
|
|
|
|
+ watch(
|
|
|
|
+ () => unref(getProps).schemas,
|
|
|
|
+ (schemas) => {
|
|
|
|
+ resetSchema(schemas ?? []);
|
|
|
|
+ },
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ watch(
|
|
|
|
+ () => getSchema.value,
|
|
|
|
+ (schema) => {
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ // Solve the problem of modal adaptive height calculation when the form is placed in the modal
|
|
|
|
+ modalFn?.redoModalHeight?.();
|
|
|
|
+ });
|
|
|
|
+ if (unref(isInitedDefaultRef)) {
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
-
|
|
|
|
- function handleEnterPress(e: KeyboardEvent) {
|
|
|
|
- const { autoSubmitOnEnter } = unref(getProps);
|
|
|
|
- if (!autoSubmitOnEnter) return;
|
|
|
|
- if (e.key === 'Enter' && e.target && e.target instanceof HTMLElement) {
|
|
|
|
- const target: HTMLElement = e.target as HTMLElement;
|
|
|
|
- if (target && target.tagName && target.tagName.toUpperCase() == 'INPUT') {
|
|
|
|
- handleSubmit();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ if (schema?.length) {
|
|
|
|
+ initDefault();
|
|
|
|
+ isInitedDefaultRef.value = true;
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ watch(
|
|
|
|
+ () => formModel,
|
|
|
|
+ useDebounceFn(() => {
|
|
|
|
+ unref(getProps).submitOnChange && handleSubmit();
|
|
|
|
+ }, 300),
|
|
|
|
+ { deep: true },
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ async function setProps(formProps: Partial<FormProps>): Promise<void> {
|
|
|
|
+ propsRef.value = deepMerge(unref(propsRef) || {}, formProps);
|
|
|
|
+ }
|
|
|
|
|
|
- const formActionType: Partial<FormActionType> = {
|
|
|
|
- getFieldsValue,
|
|
|
|
- setFieldsValue,
|
|
|
|
- resetFields,
|
|
|
|
- updateSchema,
|
|
|
|
- resetSchema,
|
|
|
|
- setProps,
|
|
|
|
- removeSchemaByField,
|
|
|
|
- appendSchemaByField,
|
|
|
|
- clearValidate,
|
|
|
|
- validateFields,
|
|
|
|
- validate,
|
|
|
|
- submit: handleSubmit,
|
|
|
|
- scrollToField: scrollToField,
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- onMounted(() => {
|
|
|
|
- initDefault();
|
|
|
|
- emit('register', formActionType);
|
|
|
|
- });
|
|
|
|
|
|
+ function setFormModel(key: string, value: any, schema: FormSchema) {
|
|
|
|
+ formModel[key] = value;
|
|
|
|
+ emit('field-value-change', key, value);
|
|
|
|
+ // TODO 优化验证,这里如果是autoLink=false手动关联的情况下才会再次触发此函数
|
|
|
|
+ if (schema && schema.itemProps && !schema.itemProps.autoLink) {
|
|
|
|
+ validateFields([key]).catch((_) => {});
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
- return {
|
|
|
|
- getBindValue,
|
|
|
|
- handleToggleAdvanced,
|
|
|
|
- handleEnterPress,
|
|
|
|
- formModel,
|
|
|
|
- defaultValueRef,
|
|
|
|
- advanceState,
|
|
|
|
- getRow,
|
|
|
|
- getProps,
|
|
|
|
- formElRef,
|
|
|
|
- getSchema,
|
|
|
|
- formActionType: formActionType as any,
|
|
|
|
- setFormModel,
|
|
|
|
- getFormClass,
|
|
|
|
- getFormActionBindProps: computed(
|
|
|
|
- () =>
|
|
|
|
- ({ ...getProps.value, ...advanceState }) as InstanceType<typeof FormAction>['$props'],
|
|
|
|
- ),
|
|
|
|
- fieldsIsAdvancedMap,
|
|
|
|
- ...formActionType,
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
|
|
+ function handleEnterPress(e: KeyboardEvent) {
|
|
|
|
+ const { autoSubmitOnEnter } = unref(getProps);
|
|
|
|
+ if (!autoSubmitOnEnter) return;
|
|
|
|
+ if (e.key === 'Enter' && e.target && e.target instanceof HTMLElement) {
|
|
|
|
+ const target: HTMLElement = e.target as HTMLElement;
|
|
|
|
+ if (target && target.tagName && target.tagName.toUpperCase() == 'INPUT') {
|
|
|
|
+ handleSubmit();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const formActionType: Partial<FormActionType> = {
|
|
|
|
+ getFieldsValue,
|
|
|
|
+ setFieldsValue,
|
|
|
|
+ resetFields,
|
|
|
|
+ updateSchema,
|
|
|
|
+ resetSchema,
|
|
|
|
+ setProps,
|
|
|
|
+ removeSchemaByField,
|
|
|
|
+ appendSchemaByField,
|
|
|
|
+ clearValidate,
|
|
|
|
+ validateFields,
|
|
|
|
+ validate,
|
|
|
|
+ submit: handleSubmit,
|
|
|
|
+ scrollToField: scrollToField,
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ const getFormActionBindProps = computed(
|
|
|
|
+ () => ({ ...getProps.value, ...advanceState }) as InstanceType<typeof FormAction>['$props'],
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ onMounted(() => {
|
|
|
|
+ initDefault();
|
|
|
|
+ emit('register', formActionType);
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
<style lang="less">
|
|
<style lang="less">
|