refactor(Common): adjust props type (#2842)

This commit is contained in:
rex 2020-03-09 17:38:22 +08:00 committed by GitHub
parent 25705fdee5
commit 3a52bb0ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,15 @@ function VantComponent<Data, Props, Methods>(
options.behaviors.push('wx://form-field');
}
if (options.properties) {
Object.keys(options.properties).forEach(name => {
if (Array.isArray(options.properties[name])) {
// miniprogram do not allow multi type
options.properties[name] = null;
}
});
}
// add default options
options.options = {
multipleSlots: true,