Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(imgUpload): disabled not effect in the form #3809

Merged
merged 1 commit into from
May 6, 2024

Conversation

electroluxcode
Copy link

@electroluxcode electroluxcode commented May 6, 2024

General

✏️ Mark the necessary items without changing the structure of the PR template.

  • Pull request template structure not broken

Type

ℹ️ What types of changes does your code introduce?

👉 Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

发现imageUpload 的 disabled 不生效。下面是复现该问题的最小示例。设置了了disabled后这个表单项仍然可以进行点击

<template>
  <Alert message="嵌入表单,加入resultFiled自定义返回值" />
  <BasicForm @register="registerCustom" class="my-5" />
</template>

<script setup lang="ts">
  import { Alert } from 'ant-design-vue';
  import { BasicForm, FormSchema, useForm } from '@/components/Form';
  const schemasCustom: FormSchema[] = [
    {
      field: 'field4',
      component: 'ImageUpload',
      label: '字段4(ImageUpload)',
      colProps: {
        span: 8,
      },
      componentProps: {
        disabled:true,
        api: (file, progress) => {
          return new Promise((resolve) => {
            resolve({  
            });
          });
        },
      },
    },
  ];
  const [registerCustom] = useForm({
    labelWidth: 160,
    schemas: schemasCustom,
   
  });
</script>

@wangjue666 wangjue666 merged commit 4348d21 into vbenjs:main May 6, 2024
2 checks passed
@vbenjs vbenjs locked and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants