props.js 229 B

12345678910
  1. export const defineProps = (type, props) => {
  2. for(let key in props){
  3. if (uni.$u && uni.$u.props && uni.$u.props[type] && uni.$u.props[type][key]) {
  4. props[key].default = uni.$u.props[type][key];
  5. }
  6. }
  7. return { props }
  8. }