normalize autocomplete and spellcheck
This commit is contained in:
parent
427dd34f0a
commit
c17c5ad6cb
6 changed files with 28 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<form :class="classes"><slot></slot></form>
|
||||
<form :class="classes" :autocomplete="autocomplete"><slot></slot></form>
|
||||
</template>
|
||||
<script>
|
||||
// https://github.com/ElemeFE/element/blob/dev/packages/form/src/form.vue
|
||||
|
@ -32,6 +32,12 @@
|
|||
showMessage: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
autocomplete: {
|
||||
validator (value) {
|
||||
return oneOf(value, ['on', 'off']);
|
||||
},
|
||||
default: 'off'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
@ -67,14 +73,14 @@
|
|||
}
|
||||
if (++count === this.fields.length) {
|
||||
// all finish
|
||||
resolve(valid)
|
||||
resolve(valid);
|
||||
if (typeof callback === 'function') {
|
||||
callback(valid);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
});
|
||||
},
|
||||
validateField(prop, cb) {
|
||||
const field = this.fields.filter(field => field.prop === prop)[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue