Adds experimental fab buttons for item creation.

This commit is contained in:
mateuswetah 2022-05-27 11:51:10 -03:00
parent a54832c8c7
commit b886536658
1 changed files with 29 additions and 4 deletions

View File

@ -9,6 +9,16 @@
> >
</ion-loading> </ion-loading>
<items-list :items="tainacanStore.collectionItems"></items-list> <items-list :items="tainacanStore.collectionItems"></items-list>
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button>
<ion-icon :icon="add"></ion-icon>
</ion-fab-button>
<ion-fab-list side="top" class="collection-page-actions">
<ion-button size="small">Criar um novo item</ion-button>
<ion-button size="small">Criar item com anexos selecionados</ion-button>
<ion-button size="small">Criar itens a partir de uma seleção</ion-button>
</ion-fab-list>
</ion-fab>
</base-layout> </base-layout>
</template> </template>
@ -18,11 +28,15 @@ import {
} from '../store/storeTainacan'; } from '../store/storeTainacan';
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { ref } from 'vue'; import { ref } from 'vue';
import { add } from "ionicons/icons";
import { import {
IonLoading, IonLoading,
IonRefresher, IonRefresher,
IonRefresherContent IonRefresherContent,
IonFab,
IonIcon,
IonFabList
} from '@ionic/vue'; } from '@ionic/vue';
import BaseLayout from '@/components/base/BaseLayout.vue'; import BaseLayout from '@/components/base/BaseLayout.vue';
@ -34,7 +48,10 @@ export default {
ItemsList, ItemsList,
IonLoading, IonLoading,
IonRefresher, IonRefresher,
IonRefresherContent IonRefresherContent,
IonFab,
IonIcon,
IonFabList
}, },
setup() { setup() {
const isLoading = ref(false); const isLoading = ref(false);
@ -58,7 +75,8 @@ export default {
setIsLoading, setIsLoading,
loadItemsByCollection, loadItemsByCollection,
doRefresh, doRefresh,
collectionId collectionId,
add
} }
}, },
async created() { async created() {
@ -68,3 +86,10 @@ export default {
}, },
} }
</script> </script>
<style>
.collection-page-actions {
right: 0;
align-items: flex-end;
}
</style>