style: prettier code

pull/422/head
tangjinzhou 2019-01-15 09:41:07 +08:00
parent 754c220eab
commit 67c31867d2
4 changed files with 14 additions and 14 deletions

View File

@ -149,8 +149,8 @@ const Form = {
this.$forceUpdate();
},
},
updated(){
if(this.autoFormCreate || this.form) {
updated() {
if (this.autoFormCreate || this.form) {
this.form.cleanUpUselessFields();
}
},

View File

@ -31,9 +31,9 @@ describe('Form', () => {
const wrapper = mount(Form1, {
sync: false,
});
await asyncExpect(()=>{
await asyncExpect(() => {
myForm.validateFields();
});
});
wrapper.vm.$forceUpdate();
expect(wrapper.html()).toMatchSnapshot();

View File

@ -235,15 +235,15 @@ const Form4 = {
<h2>situation 4</h2>
{this.useInput
? getFieldDecorator('name', {
initialValue: '',
trigger: 'input',
rules: [
{
required: true,
message: "What's your name 1?",
},
],
})(<input />)
initialValue: '',
trigger: 'input',
rules: [
{
required: true,
message: "What's your name 1?",
},
],
})(<input />)
: getFieldDecorator('name2', {
initialValue: '',
trigger: 'input',

View File

@ -632,7 +632,7 @@ function createBaseForm(option = {}, mixins = []) {
const formProps = {
[formPropName]: this.getForm(),
};
const {wrappedComponentRef, ...restProps} = getOptionProps(this);
const { wrappedComponentRef, ...restProps } = getOptionProps(this);
const wrappedComponentProps = {
props: mapProps.call(this, {
...formProps,