Skip to content

Instantly share code, notes, and snippets.

<template>
<div>
<b-form @submit.prevent="onSubmit" class="m50">
<b-row>
<b-col md="4">
<b-form-group>
<b-form-select @input="getCities(form.state.id)" id="states" required v-model="form.state" :options="states">
<template slot="first">
<option :value="null" disabled>UF *</option>
</template>
@nulldreams
nulldreams / Estados.vue
Last active June 5, 2024 20:53
VueJS - Select com todos os estados e cidades dinâmicas.
<template>
<b-container class="formulario">
<b-form>
<b-form-group label="Estados">
<b-form-select v-model="estado" :options="estados" class="mb-3"></b-form-select>
</b-form-group>
<b-form-group label="Cidade">
<b-form-select v-model="cidade" :options="cidades" class="mb-3"></b-form-select>