loader
This commit is contained in:
BIN
src/assets/images/loader.gif
Normal file
BIN
src/assets/images/loader.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 98 KiB |
28
src/components/Loader/BaseLoader.vue
Normal file
28
src/components/Loader/BaseLoader.vue
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<template lang="pug">
|
||||||
|
img(:src="img", :height="height", :width="width")
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import LoaderGif from "@/assets/images/loader.gif";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "BaseLoader",
|
||||||
|
props: {
|
||||||
|
width: {
|
||||||
|
type: Number,
|
||||||
|
default: 64,
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: Number,
|
||||||
|
default: 64,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
img: LoaderGif,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
BaseButton(@click="showModal = true") Открыть модалку
|
BaseButton(@click="showModal = true") Открыть модалку
|
||||||
base-modal(v-model="showModal", title="Тестовый заголовок окна" )
|
base-modal(v-model="showModal", title="Тестовый заголовок окна" )
|
||||||
base-button(@click="addNotification") Добавить уведомление
|
base-button(@click="addNotification") Добавить уведомление
|
||||||
|
base-loader
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -12,9 +13,16 @@ import BaseModal from "@/components/base/BaseModal";
|
|||||||
import BaseButton from "@/components/base/BaseButton";
|
import BaseButton from "@/components/base/BaseButton";
|
||||||
import TheNotificationProvider from "@/components/Notifications/TheNotificationProvider";
|
import TheNotificationProvider from "@/components/Notifications/TheNotificationProvider";
|
||||||
import { addNotification } from "@/components/Notifications/notificationContext";
|
import { addNotification } from "@/components/Notifications/notificationContext";
|
||||||
|
import BaseLoader from "@/components/Loader/BaseLoader";
|
||||||
export default {
|
export default {
|
||||||
name: "TheSettings",
|
name: "TheSettings",
|
||||||
components: { TheNotificationProvider, BaseButton, BaseModal, VSelect },
|
components: {
|
||||||
|
BaseLoader,
|
||||||
|
TheNotificationProvider,
|
||||||
|
BaseButton,
|
||||||
|
BaseModal,
|
||||||
|
VSelect,
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
items: [
|
items: [
|
||||||
@@ -37,7 +45,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addNotification() {
|
addNotification() {
|
||||||
addNotification(new Date().getTime(), "test", "test-text", "warning", 0);
|
addNotification(
|
||||||
|
new Date().getTime(),
|
||||||
|
"test",
|
||||||
|
"test-text",
|
||||||
|
"warning",
|
||||||
|
3000
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user