add: loading and empty status componments

This commit is contained in:
Hakadao
2022-04-19 03:02:43 +08:00
parent 8ee8fdd11e
commit 96833946a8
5 changed files with 33 additions and 1 deletions

9
src/components/Empty.vue Normal file
View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
const emptyImg = browser.runtime.getURL('/assets/empty.png')
</script>
<template>
<div flex="~" justify="center" items="center">
<img :src="emptyImg" w="200px" h="auto">
</div>
</template>

View File

@@ -0,0 +1,23 @@
<script setup lang="ts">
const imgURL = browser.runtime.getURL('/assets/loading.gif')
</script>
<template>
<div
w="full"
h="46px"
p="y-8"
flex="~"
justify="center"
items="center"
>
<img
:src="imgURL"
alt="loading"
w="46px"
h="46px"
m="r-2"
/>
{{ $t('home.loading_more') }}
</div>
</template>