|
@@ -85,6 +85,18 @@ module.exports = function compileProps (el, propOptions) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
prop.parentPath = value
|
|
prop.parentPath = value
|
|
|
|
|
+
|
|
|
|
|
+ // warn required two-way
|
|
|
|
|
+ if (
|
|
|
|
|
+ process.env.NODE_ENV !== 'production' &&
|
|
|
|
|
+ options.twoWay &&
|
|
|
|
|
+ prop.mode !== propBindingModes.TWO_WAY
|
|
|
|
|
+ ) {
|
|
|
|
|
+ _.warn(
|
|
|
|
|
+ 'Prop "' + name + '" expects a two-way binding type.'
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
} else if (options.required) {
|
|
} else if (options.required) {
|
|
|
// warn missing required
|
|
// warn missing required
|
|
|
process.env.NODE_ENV !== 'production' && _.warn(
|
|
process.env.NODE_ENV !== 'production' && _.warn(
|
|
@@ -93,17 +105,6 @@ module.exports = function compileProps (el, propOptions) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // warn required two-way
|
|
|
|
|
- if (
|
|
|
|
|
- process.env.NODE_ENV !== 'production' &&
|
|
|
|
|
- options.twoWay &&
|
|
|
|
|
- prop.mode !== propBindingModes.TWO_WAY
|
|
|
|
|
- ) {
|
|
|
|
|
- _.warn(
|
|
|
|
|
- 'Prop "' + name + '" expects a two-way binding type.'
|
|
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
// push prop
|
|
// push prop
|
|
|
props.push(prop)
|
|
props.push(prop)
|
|
|
}
|
|
}
|