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

feat(BasicForm): prefix #3840

Merged
merged 1 commit into from
May 13, 2024
Merged

Conversation

electroluxcode
Copy link

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

  • 给 suffix 配对 ,添加prefix

以下是一个添加了prefix的最小示例

<template>
  <Alert message="bug" />
  <BasicForm @register="registerCustom" class="my-5" />
</template>

<script setup lang="ts">
  import { Alert } from 'ant-design-vue';
  import { BasicForm, useForm } from '@/components/Form';
  import { h } from 'vue';
  import { InfoCircleOutlined } from '@ant-design/icons-vue';
  import { Tooltip } from 'ant-design-vue';
  const [registerCustom] = useForm({
    baseColProps: { span: 24 },
    labelWidth: 124,
    schemas: [
      {
        field: 'field3',
        label: 'label',
        component: 'Input',
        prefix: () => {
          return h(Tooltip, { title: h('div', {}, 'ddd') }, [
            h(InfoCircleOutlined, { style: 'opacity:0.5' }, []),
          ]);
        },
      },
    ],
  });
</script>

@wangjue666 wangjue666 merged commit 265627f into vbenjs:main May 13, 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