<template>
  <view class="nana-form">
    <slot />
  </view>
</template>

<script setup lang="ts">
import type { PropType } from 'vue';
import type { FormDefineItem } from '..';

const props = defineProps({	
  model: {
    type: Object,
    default: () => ({})
  },
  rules: {
    type: Object as PropType<FormDefineItem['rules']>,
    default: () => ({}) 
  }
});

const formContext = {
  addFormItem: (item: {
    key: string,
  }) => {
    console.log('addFormItem', item);
  }
}

defineExpose({

})

</script>

<style lang="scss">
.nana-form {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}
</style>