Skip to content

How to dynamically load data?

vue
<script setup>
import { ref, onMounted } from 'vue';


const formRule = ref([
  {
    type: 'select',
    field: 'country',
    title: 'Select Country',
    options: []
  }
]);


onMounted(() => {
  formRule.value[0].options = [
    { label: 'United States', value: 'USA' },
    { label: 'China', value: 'China' }
  ];
});
</script>

Load Remote DataLoad External Data

FormCreate is an open-source project released under the MIT License. Free for personal and commercial use.