diff --git a/packages/taro-swan/src/create-component.js b/packages/taro-swan/src/create-component.js index 4e29a2605b19..8a2f9de6f02b 100644 --- a/packages/taro-swan/src/create-component.js +++ b/packages/taro-swan/src/create-component.js @@ -17,7 +17,7 @@ function bindProperties (weappComponentConf, ComponentClass) { if (defaultProps.hasOwnProperty(key)) { weappComponentConf.properties[key] = { type: null, - value: null + value: defaultProps[key] } } } diff --git a/packages/taro-tt/src/create-component.js b/packages/taro-tt/src/create-component.js index 4d51e7b44e92..d304ae6e8df0 100644 --- a/packages/taro-tt/src/create-component.js +++ b/packages/taro-tt/src/create-component.js @@ -17,7 +17,7 @@ function bindProperties (weappComponentConf, ComponentClass) { if (defaultProps.hasOwnProperty(key)) { weappComponentConf.properties[key] = { type: null, - value: null + value: defaultProps[key] } } }