fix: 移除冗余的注入代码

This commit is contained in:
gaoyunqi
2025-05-16 17:56:07 +08:00
parent 66ba7ad852
commit a7b81c46b8
2 changed files with 1 additions and 33 deletions

View File

@ -219,8 +219,7 @@
const tabActiveKey = inject<Ref<number>>('tabActiveKey', ref(0));
const activeKey = ref<number>(0);
const isCamelCase = inject<boolean>('isCamelCase', false);
// 注入整个表单的配置formProps是个计算属性不能修改formData则来自每个业务的表单页面。
const formData = inject('formData', { noInject: true });
watch(
() => tabActiveKey?.value,
(val) => {
@ -240,35 +239,6 @@
}
);
// watch(
// () => props.value,
// (val) => {
// if (!val) return;
// let { componentProps = {} } = props.schema;
// if (componentProps['events']) {
// for (const eventKey in componentProps['events']) {
// try {
// const event = new Function(
// 'schema',
// 'formModel',
// 'formActionType',
// `${componentProps['events'][eventKey]}`,
// );
// event(props.schema, formModel, props.formApi);
// } catch (error) {
// notification.error({
// message: 'Tip',
// description: '触发事件填写有误!',
// });
// }
// }
// }
// },
// {
// immediate: true,
// },
// );
const { notification } = useMessage();
const getSchema = computed(() => {
return props.schema as FormSchema;

View File

@ -53,8 +53,6 @@
const tabActiveKey = inject<Ref<number>>('tabActiveKey', ref(0));
const activeKey = ref<number>(0);
const isCamelCase = inject<boolean>('isCamelCase', false);
// 注入整个表单的配置formProps是个计算属性不能修改formData则来自每个业务的表单页面。
const formData = inject('formData', { noInject: true });
watch(
() => tabActiveKey?.value,
(val) => {