mobile.jsx 606 B

12345678910111213141516171819202122
  1. import { layoutProps } from '../layout-props'
  2. import { useFormLayoutOptions } from '../../hooks/use-form-layout'
  3. export default {
  4. name: 'BasicGridMobile',
  5. props: layoutProps,
  6. setup (props, { slots, emit }) {
  7. const { options, updateConfig, ...handler } = useFormLayoutOptions({ props, emit })
  8. return () => <div>
  9. {options.value.map(
  10. ({ children }, optionIndex) => <div key={optionIndex}>
  11. {slots.item({
  12. children,
  13. optionIndex,
  14. isShow: props.config._isShow,
  15. ...handler
  16. })}
  17. </div>
  18. )}
  19. </div>
  20. }
  21. }