|
29 | 29 | </template> |
30 | 30 |
|
31 | 31 | <script setup lang="ts"> |
32 | | - import { ref } from 'vue'; |
33 | | - import { |
34 | | - IonCheckbox, |
35 | | - IonContent, |
36 | | - IonHeader, |
37 | | - IonItem, |
38 | | - IonLabel, |
39 | | - IonList, |
40 | | - IonRefresher, |
41 | | - IonRefresherContent, |
42 | | - IonTitle, |
43 | | - IonToolbar, |
44 | | - RefresherCustomEvent, |
45 | | - RefresherPullEndCustomEvent, |
46 | | - } from '@ionic/vue'; |
| 32 | +import { ref } from 'vue'; |
| 33 | +import { |
| 34 | + IonCheckbox, |
| 35 | + IonContent, |
| 36 | + IonHeader, |
| 37 | + IonItem, |
| 38 | + IonLabel, |
| 39 | + IonList, |
| 40 | + IonRefresher, |
| 41 | + IonRefresherContent, |
| 42 | + IonTitle, |
| 43 | + IonToolbar, |
| 44 | + RefresherCustomEvent, |
| 45 | + RefresherPullEndCustomEvent, |
| 46 | +} from '@ionic/vue'; |
47 | 47 |
|
48 | | - const items = ref([ |
49 | | - { label: 'Finalize Q1 budget proposal', checked: false, disabled: false }, |
50 | | - { label: 'Review design mockups', checked: true, disabled: false }, |
51 | | - { label: 'Sync with engineering on API docs', checked: true, disabled: false }, |
52 | | - { label: 'Approve PTO requests for March', checked: false, disabled: false }, |
53 | | - { label: 'Draft monthly newsletter', checked: false, disabled: false }, |
54 | | - ]); |
| 48 | +const items = ref([ |
| 49 | + { label: 'Finalize Q1 budget proposal', checked: false, disabled: false }, |
| 50 | + { label: 'Review design mockups', checked: true, disabled: false }, |
| 51 | + { label: 'Sync with engineering on API docs', checked: true, disabled: false }, |
| 52 | + { label: 'Approve PTO requests for March', checked: false, disabled: false }, |
| 53 | + { label: 'Draft monthly newsletter', checked: false, disabled: false }, |
| 54 | +]); |
55 | 55 |
|
56 | | - const handlePullStart = () => { |
57 | | - console.log('Pull started'); |
| 56 | +const handlePullStart = () => { |
| 57 | + console.log('Pull started'); |
58 | 58 |
|
59 | | - // Disable the checkboxes when the pull starts |
60 | | - items.value.forEach((item) => { |
61 | | - item.disabled = true; |
62 | | - }); |
63 | | - }; |
| 59 | + // Disable the checkboxes when the pull starts |
| 60 | + items.value.forEach((item) => { |
| 61 | + item.disabled = true; |
| 62 | + }); |
| 63 | +}; |
64 | 64 |
|
65 | | - const handlePullEnd = (event: RefresherPullEndCustomEvent) => { |
66 | | - console.log('Pull ended with reason: "' + event.detail.reason + '"'); |
| 65 | +const handlePullEnd = (event: RefresherPullEndCustomEvent) => { |
| 66 | + console.log('Pull ended with reason: "' + event.detail.reason + '"'); |
67 | 67 |
|
68 | | - // Enable the checkboxes when the pull ends |
69 | | - items.value.forEach((item) => { |
70 | | - item.disabled = false; |
71 | | - }); |
72 | | - }; |
| 68 | + // Enable the checkboxes when the pull ends |
| 69 | + items.value.forEach((item) => { |
| 70 | + item.disabled = false; |
| 71 | + }); |
| 72 | +}; |
73 | 73 |
|
74 | | - const handleRefresh = (event: RefresherCustomEvent) => { |
75 | | - setTimeout(() => { |
76 | | - // Any calls to load data go here |
77 | | - event.target.complete(); |
78 | | - console.log('Refresh completed'); |
79 | | - }, 2000); |
80 | | - }; |
| 74 | +const handleRefresh = (event: RefresherCustomEvent) => { |
| 75 | + setTimeout(() => { |
| 76 | + // Any calls to load data go here |
| 77 | + event.target.complete(); |
| 78 | + console.log('Refresh completed'); |
| 79 | + }, 2000); |
| 80 | +}; |
81 | 81 | </script> |
82 | 82 | ``` |
0 commit comments