chore: update n-form to form-model

pull/1886/head
tanjinzhou 2020-03-16 12:06:55 +08:00
parent 6c4b8ec187
commit 3a16bb3ad4
15 changed files with 72 additions and 72 deletions

View File

@ -19,7 +19,7 @@
- 🔥🔥🔥 [Descriptions](https://antdv.com/components/descriptions/) Display multiple read-only fields in groups.
- 🔥🔥🔥 [PageHeader](https://antdv.com/components/page-header/) can be used to declare the topic of the page, display important information about the page that the user is concerned about, and carry the operation items related to the current page.
- 🔥🔥🔥 [Result](https://antdv.com/components/result) is used to feedback the processing results of a series of operation tasks.
- 🔥🔥🔥 [NewForm](https://antdv.com/components/n-form) Form components that use v-model for automatic validation are more concise than v-decorator forms.
- 🔥🔥🔥 [FormModel](https://antdv.com/components/form-model) Form components that use v-model for automatic validation are more concise than v-decorator forms.
- 🔥 Descriptions supports vertical layout.
- 🔥 Progress.Circle supports gradient colors.
- 🔥 Progress.Line supports gradient colors.

View File

@ -19,7 +19,7 @@
- 🔥🔥🔥 [Descriptions](https://antdv.com/components/descriptions-cn/) 成组展示多个只读字段。
- 🔥🔥🔥 [PageHeader](https://antdv.com/components/page-header-cn/) 可用于声明页面主题、展示用户所关注的页面重要信息,以及承载与当前页相关的操作项。
- 🔥🔥🔥 [Result](https://antdv.com/components/result) 用于反馈一系列操作任务的处理结果。
- 🔥🔥🔥 [NewForm](https://antdv.com/components/n-form) 使用 v-model 进行自动校验的表单组件,相较于 v-decorator 形式的表单,更加简洁。
- 🔥🔥🔥 [FormModel](https://antdv.com/components/form-model) 使用 v-model 进行自动校验的表单组件,相较于 v-decorator 形式的表单,更加简洁。
- 🔥 Descriptions 支持垂直布局。
- 🔥 Progress.Circle 支持渐变色。
- 🔥 Progress.Line 支持渐变色。

@ -1 +1 @@
Subproject commit a7bf651dafd694e8390c57e86eff2a2592000e86
Subproject commit 8c9dee7ff6a3a18f335fba08073f14178fffb8b0

View File

@ -46,7 +46,7 @@ export const ValidationRule = {
};
const Form = {
name: 'ANForm',
name: 'AFormModel',
props: initDefaultProps(FormProps, {
layout: 'horizontal',
hideRequiredMark: false,
@ -58,7 +58,7 @@ const Form = {
},
provide() {
return {
FormContext: this,
FormModelContext: this,
};
},
inject: {
@ -96,7 +96,7 @@ const Form = {
},
resetFields() {
if (!this.model) {
warning(false, 'NewForm', 'model is required for resetFields to work.');
warning(false, 'FormModel', 'model is required for resetFields to work.');
return;
}
this.fields.forEach(field => {
@ -115,7 +115,7 @@ const Form = {
},
validate(callback) {
if (!this.model) {
warning(false, 'NewForm', 'model is required for resetFields to work.');
warning(false, 'FormModel', 'model is required for resetFields to work.');
return;
}
let promise;
@ -153,7 +153,7 @@ const Form = {
props = [].concat(props);
const fields = this.fields.filter(field => props.indexOf(field.prop) !== -1);
if (!fields.length) {
warning(false, 'NewForm', 'please pass correct props!');
warning(false, 'FormModel', 'please pass correct props!');
return;
}
fields.forEach(field => {

View File

@ -62,7 +62,7 @@ export const FormItemProps = {
};
export default {
name: 'ANFormItem',
name: 'AFormModelItem',
__ANT_NEW_FORM_ITEM: true,
mixins: [BaseMixin],
props: initDefaultProps(FormItemProps, {
@ -71,12 +71,12 @@ export default {
}),
provide() {
return {
NewFormItemContext: this,
FormModelItemContext: this,
};
},
inject: {
configProvider: { default: () => ConfigConsumerProps },
FormContext: { default: () => ({}) },
FormModelContext: { default: () => ({}) },
},
data() {
return {
@ -89,7 +89,7 @@ export default {
computed: {
fieldValue() {
const model = this.FormContext.model;
const model = this.FormModelContext.model;
if (!model || !this.prop) {
return;
}
@ -121,13 +121,13 @@ export default {
},
mounted() {
if (this.prop) {
const { addField } = this.FormContext;
const { addField } = this.FormModelContext;
addField && addField(this);
this.initialValue = cloneDeep(this.fieldValue);
}
},
beforeDestroy() {
const { removeField } = this.FormContext;
const { removeField } = this.FormModelContext;
removeField && removeField(this);
},
methods: {
@ -153,13 +153,13 @@ export default {
this.validateState = errors ? 'error' : 'success';
this.validateMessage = errors ? errors[0].message : '';
callback(this.validateMessage, invalidFields);
this.FormContext &&
this.FormContext.$emit &&
this.FormContext.$emit('validate', this.prop, !errors, this.validateMessage || null);
this.FormModelContext &&
this.FormModelContext.$emit &&
this.FormModelContext.$emit('validate', this.prop, !errors, this.validateMessage || null);
});
},
getRules() {
let formRules = this.FormContext.rules;
let formRules = this.FormModelContext.rules;
const selfRules = this.rules;
const requiredRule =
this.required !== undefined ? { required: !!this.required, trigger: 'change' } : [];
@ -198,7 +198,7 @@ export default {
resetField() {
this.validateState = '';
this.validateMessage = '';
let model = this.FormContext.model || {};
let model = this.FormModelContext.model || {};
let value = this.fieldValue;
let path = this.prop;
if (path.indexOf(':') !== -1) {

View File

@ -1,18 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./antdv-demo/docs/n-form/demo/basic.md correctly 1`] = `
exports[`renders ./antdv-demo/docs/form-model/demo/basic.md correctly 1`] = `
<form class="ant-form ant-form-horizontal">
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity name" class="">Activity name</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity name" class="">Activity name</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><input type="text" class="ant-input"></span>
<!---->
</div>
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity zone" class="">Activity zone</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity zone" class="">Activity zone</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><div tabindex="0" class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-controls="test-uuid" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div unselectable="on" class="ant-select-selection__placeholder" style="display: block; user-select: none;">please select your zone</div></div><span unselectable="on" class="ant-select-arrow" style="user-select: none;"><i aria-label="icon: down" class="ant-select-arrow-icon anticon anticon-down"><svg viewBox="64 64 896 896" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></i></span></div>
</div></span>
<!---->
@ -20,24 +20,24 @@ exports[`renders ./antdv-demo/docs/n-form/demo/basic.md correctly 1`] = `
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity time" class="">Activity time</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity time" class="">Activity time</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><span class="ant-calendar-picker" style="min-width: 195px; width: 100%;" type="date"><div class=""><input readonly="true" placeholder="Pick a date" class="ant-calendar-picker-input ant-input"><i aria-label="icon: calendar" class="ant-calendar-picker-icon anticon anticon-calendar"><svg viewBox="64 64 896 896" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></i></div></span></span>
<!---->
</div>
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Instant delivery" class="">Instant delivery</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Instant delivery" class="">Instant delivery</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><button type="button" role="switch" class="ant-switch"><span class="ant-switch-inner"></span></button></span>
<!---->
</div>
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity type" class="">Activity type</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity type" class="">Activity type</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-checkbox-group"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value="1"><span class="ant-checkbox-inner"></span></span><span>
Online
</span></label> <label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value="2"><span class="ant-checkbox-inner"></span></span><span>
@ -50,8 +50,8 @@ exports[`renders ./antdv-demo/docs/n-form/demo/basic.md correctly 1`] = `
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Resources" class="">Resources</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Resources" class="">Resources</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-radio-group ant-radio-group-outline ant-radio-group-default"><label class="ant-radio-wrapper"><span class="ant-radio"><input type="radio" class="ant-radio-input" value="1"><span class="ant-radio-inner"></span></span><span>
Sponsor
</span></label><label class="ant-radio-wrapper"><span class="ant-radio"><input type="radio" class="ant-radio-input" value="2"><span class="ant-radio-inner"></span></span><span>
@ -62,8 +62,8 @@ exports[`renders ./antdv-demo/docs/n-form/demo/basic.md correctly 1`] = `
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity form" class="">Activity form</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity form" class="">Activity form</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><textarea class="ant-input"></textarea></span>
<!---->
</div>
@ -79,27 +79,27 @@ exports[`renders ./antdv-demo/docs/n-form/demo/basic.md correctly 1`] = `
</form>
`;
exports[`renders ./antdv-demo/docs/n-form/demo/custom-validation.md correctly 1`] = `
exports[`renders ./antdv-demo/docs/form-model/demo/custom-validation.md correctly 1`] = `
<form class="ant-form ant-form-horizontal">
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Password" class="">Password</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Password" class="">Password</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><input type="password" autocomplete="off" class="ant-input"></span>
<!---->
</div>
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Confirm" class="">Confirm</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Confirm" class="">Confirm</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><input type="password" autocomplete="off" class="ant-input"></span>
<!---->
</div>
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Age" class="">Age</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Age" class="">Age</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><input type="text" class="ant-input"></span>
<!---->
</div>
@ -115,7 +115,7 @@ exports[`renders ./antdv-demo/docs/n-form/demo/custom-validation.md correctly 1`
</form>
`;
exports[`renders ./antdv-demo/docs/n-form/demo/dynamic-form-item.md correctly 1`] = `
exports[`renders ./antdv-demo/docs/form-model/demo/dynamic-form-item.md correctly 1`] = `
<form class="ant-form ant-form-horizontal">
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-xs-24 ant-col-xs-offset-0 ant-col-sm-20 ant-col-sm-offset-4 ant-form-item-control-wrapper">
@ -134,7 +134,7 @@ exports[`renders ./antdv-demo/docs/n-form/demo/dynamic-form-item.md correctly 1`
</form>
`;
exports[`renders ./antdv-demo/docs/n-form/demo/horizontal-login.md correctly 1`] = `
exports[`renders ./antdv-demo/docs/form-model/demo/horizontal-login.md correctly 1`] = `
<form class="ant-form ant-form-inline">
<div class="ant-row ant-form-item">
<div class="ant-col ant-form-item-control-wrapper">
@ -160,11 +160,11 @@ exports[`renders ./antdv-demo/docs/n-form/demo/horizontal-login.md correctly 1`]
</form>
`;
exports[`renders ./antdv-demo/docs/n-form/demo/layout.md correctly 1`] = `
exports[`renders ./antdv-demo/docs/form-model/demo/layout.md correctly 1`] = `
<form class="ant-form ant-form-horizontal">
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Form Layout" class="">Form Layout</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Form Layout" class="">Form Layout</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-radio-group ant-radio-group-outline ant-radio-group-default"><label class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"><span class="ant-radio-button ant-radio-button-checked"><input type="radio" class="ant-radio-button-input" value="horizontal"><span class="ant-radio-button-inner"></span></span><span>
Horizontal
</span></label><label class="ant-radio-button-wrapper"><span class="ant-radio-button"><input type="radio" class="ant-radio-button-input" value="vertical"><span class="ant-radio-button-inner"></span></span><span>
@ -177,16 +177,16 @@ exports[`renders ./antdv-demo/docs/n-form/demo/layout.md correctly 1`] = `
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Field A" class="">Field A</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Field A" class="">Field A</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><input placeholder="input placeholder" type="text" class="ant-input"></span>
<!---->
</div>
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Field B" class="">Field B</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Field B" class="">Field B</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><input placeholder="input placeholder" type="text" class="ant-input"></span>
<!---->
</div>
@ -202,19 +202,19 @@ exports[`renders ./antdv-demo/docs/n-form/demo/layout.md correctly 1`] = `
</form>
`;
exports[`renders ./antdv-demo/docs/n-form/demo/validation.md correctly 1`] = `
exports[`renders ./antdv-demo/docs/form-model/demo/validation.md correctly 1`] = `
<form class="ant-form ant-form-horizontal">
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity name" class="ant-form-item-required">Activity name</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity name" class="ant-form-item-required">Activity name</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><input type="text" class="ant-input"></span>
<!---->
</div>
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity zone" class="ant-form-item-required">Activity zone</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity zone" class="ant-form-item-required">Activity zone</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><div tabindex="0" class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-controls="test-uuid" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div unselectable="on" class="ant-select-selection__placeholder" style="display: block; user-select: none;">please select your zone</div></div><span unselectable="on" class="ant-select-arrow" style="user-select: none;"><i aria-label="icon: down" class="ant-select-arrow-icon anticon anticon-down"><svg viewBox="64 64 896 896" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></i></span></div>
</div></span>
<!---->
@ -222,24 +222,24 @@ exports[`renders ./antdv-demo/docs/n-form/demo/validation.md correctly 1`] = `
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity time" class="ant-form-item-required">Activity time</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity time" class="ant-form-item-required">Activity time</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><span class="ant-calendar-picker" style="min-width: 195px; width: 100%;" type="date"><div class=""><input readonly="true" placeholder="Pick a date" class="ant-calendar-picker-input ant-input"><i aria-label="icon: calendar" class="ant-calendar-picker-icon anticon anticon-calendar"><svg viewBox="64 64 896 896" data-icon="calendar" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class=""><path d="M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"></path></svg></i></div></span></span>
<!---->
</div>
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Instant delivery" class="">Instant delivery</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Instant delivery" class="">Instant delivery</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><button type="button" role="switch" class="ant-switch"><span class="ant-switch-inner"></span></button></span>
<!---->
</div>
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity type" class="ant-form-item-required">Activity type</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity type" class="ant-form-item-required">Activity type</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-checkbox-group"><label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value="1"><span class="ant-checkbox-inner"></span></span><span>
Online
</span></label> <label class="ant-checkbox-wrapper"><span class="ant-checkbox"><input type="checkbox" class="ant-checkbox-input" value="2"><span class="ant-checkbox-inner"></span></span><span>
@ -252,8 +252,8 @@ exports[`renders ./antdv-demo/docs/n-form/demo/validation.md correctly 1`] = `
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Resources" class="ant-form-item-required">Resources</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Resources" class="ant-form-item-required">Resources</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-radio-group ant-radio-group-outline ant-radio-group-default"><label class="ant-radio-wrapper"><span class="ant-radio"><input type="radio" class="ant-radio-input" value="1"><span class="ant-radio-inner"></span></span><span>
Sponsor
</span></label><label class="ant-radio-wrapper"><span class="ant-radio"><input type="radio" class="ant-radio-input" value="2"><span class="ant-radio-inner"></span></span><span>
@ -264,8 +264,8 @@ exports[`renders ./antdv-demo/docs/n-form/demo/validation.md correctly 1`] = `
</div>
</div>
<div class="ant-row ant-form-item">
<div class="ant-col ant-col-4 ant-form-item-label"><label title="Activity form" class="ant-form-item-required">Activity form</label></div>
<div class="ant-col ant-col-14 ant-form-item-control-wrapper">
<div class="ant-col ant-form-item-label"><label title="Activity form" class="ant-form-item-required">Activity form</label></div>
<div class="ant-col ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><textarea class="ant-input"></textarea></span>
<!---->
</div>

View File

@ -1,3 +1,3 @@
import demoTest from '../../../tests/shared/demoTest';
demoTest('n-form');
demoTest('form-model');

View File

@ -56,7 +56,7 @@ import { default as Divider } from './divider';
import { default as Dropdown } from './dropdown';
import { default as Form } from './form';
import { default as NewForm } from './n-form';
import { default as FormModel } from './form-model';
import { default as Icon } from './icon';
@ -167,7 +167,7 @@ const components = [
Divider,
Dropdown,
Form,
NewForm,
FormModel,
Icon,
Input,
InputNumber,
@ -256,7 +256,7 @@ export {
Divider,
Dropdown,
Form,
NewForm,
FormModel,
Icon,
Input,
InputNumber,

View File

@ -59,4 +59,4 @@ import './statistic/style';
import './result/style';
import './descriptions/style';
import './page-header/style';
import './n-form/style';
import './form-model/style';

View File

@ -1,6 +1,6 @@
{
"name": "ant-design-vue",
"version": "1.5.0-rc.1",
"version": "1.5.0-rc.2",
"title": "Ant Design Vue",
"description": "An enterprise-class UI design language and Vue-based implementation",
"keywords": [

View File

@ -27,7 +27,7 @@ Array [
"Divider",
"Dropdown",
"Form",
"NewForm",
"FormModel",
"Icon",
"Input",
"InputNumber",