add mount of menu
fix store usage add page loader
This commit is contained in:
@@ -42,7 +42,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@close="hideAddForm"
|
||||
>
|
||||
<div class="modal__content">
|
||||
<div v-for="(lang, key) in langs" :key="key">
|
||||
<div
|
||||
v-for="(lang, key) in langs"
|
||||
:key="key"
|
||||
>
|
||||
<span class="lang">{{ lang }}</span>
|
||||
<input
|
||||
v-model="newValue[lang]"
|
||||
@@ -66,7 +69,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@close="hideEditForm"
|
||||
>
|
||||
<div class="modal__content">
|
||||
<div v-for="(lang, key) in langs" :key="key">
|
||||
<div
|
||||
v-for="(lang, key) in langs"
|
||||
:key="key"
|
||||
>
|
||||
<span class="lang">{{ lang }}</span>
|
||||
<input
|
||||
v-model="editValue[lang]"
|
||||
|
||||
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const emit = defineEmit('input')
|
||||
const emit = defineEmits('input')
|
||||
const { value } = defineProps({
|
||||
value: {
|
||||
type: String,
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<div id="side-menu-loader">
|
||||
<div id="side-menu-loader-bar" :style="createStyle(width)"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const width = ref(0)
|
||||
const createStyle = (size) => {
|
||||
return {
|
||||
width: `${size}%`,
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener('beforeunload', () => {
|
||||
setInterval(() => {
|
||||
width.value = Math.min(width.value + 0.2, 100)
|
||||
}, 25)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user