Skip to content

Commit

Permalink
fix(h5): uni://form-field
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Apr 22, 2019
1 parent a8eaa0a commit b6d240b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/view/plugins/behaviors/form-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ export default {
name: 'uni://form-field',
init (options, vm) {
if (
!vm.constructor.options.props.name ||
!vm.constructor.options.props ||
!vm.constructor.options.props.name ||
!vm.constructor.options.props.value
) { // 未初始化 props
if (!vm.constructor.options.props) {
vm.constructor.options.props = {}
}
if (!vm.constructor.options.props.name) {
vm.constructor.options.props.name = options.props.name = {
type: String
Expand Down

0 comments on commit b6d240b

Please sign in to comment.