chore(): run build to update picker readme (#23822)

This commit is contained in:
Liam DeBeasi
2021-08-25 18:57:26 -04:00
committed by GitHub
parent 9317f6eb41
commit 50b88b24c2

View File

@ -159,6 +159,63 @@ const PickerExample: React.FC = () => {
```
### Vue
```vue
<template>
<div>
<ion-button @click="openPicker">SHOW PICKER</ion-button>
<p v-if="picked.animal">picked: {{ picked.animal.text }}</p>
</div>
</template>
<script>
import { IonButton, pickerController } from "@ionic/vue";
export default {
components: {
IonButton,
},
data() {
return {
pickingOptions: {
name: "animal",
options: [
{ text: "Dog", value: "dog" },
{ text: "Cat", value: "cat" },
{ text: "Bird", value: "bird" },
],
},
picked: {
animal: "",
},
};
},
methods: {
async openPicker() {
const picker = await pickerController.create({
columns: [this.pickingOptions],
buttons: [
{
text: "Cancel",
role: "cancel",
},
{
text: "Confirm",
handler: (value) => {
this.picked = value;
console.log(`Got Value ${value}`);
},
},
],
});
await picker.present();
},
},
};
</script>
```
## Properties