Skip to content

未定义元素a-form-model-item、 a-form-model #2957

@bosens-China

Description

@bosens-China
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-beta.10

Environment

win10,chrome87,vue3.0

Reproduction link

https://ant-design-vue.gitee.io/issue-helper

Steps to reproduce

// main,js
import antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';

export default (vm) => {
vm.use(antd);
};
// sign
<script>
import { ref } from 'vue';
import style from './style.module.less';

export default {
setup() {
const ruleForm = ref(null);
const form = ref({});
const rules = {};
const labelCol = { span: 4 };
const wrapperCol = { span: 14 };
return () => (
<div class={style['cs-bg']}>
<main class={style['cs-main']}>
<a-form-model
ref={ruleForm}
model={form}
rules={rules}
label-col={labelCol}
wrapper-col={wrapperCol}
>
<a-form-model-item label="请输入用户名" prop="name">
<a-input />
</a-form-model-item>
<a-form-model-item label="请输入密码" prop="password">
<a-input />
</a-form-model-item>
<a-form-model-item>
<a-button type="primary">Create</a-button>
<a-button>Reset</a-button>
</a-form-model-item>
</a-form-model>
</main>
</div>
);
},
};
</script>

What is expected?

期待元素正常解析,而不是只解析部分元素

What is actually happening?

form表单和item元素识别不了

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions