Проверен вывод информации на клиент
This commit is contained in:
1 parent
bae4547681
commit
ff92bca09c
3 files changed
+24
-29
No files matched your search
@@ -1,47 +1,42 @@
|
||||
<template>
|
||||
<v-row class="bg-red w-100">
|
||||
<v-col
|
||||
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
|
||||
>
|
||||
<v-col class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light">
|
||||
<!-- Безопасность -->
|
||||
|
||||
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-container class="bg-green">
|
||||
{{ safetyData }}
|
||||
<!-- <ul>
|
||||
<li v-for="item in safetyData">{{ item.id }}</li>
|
||||
</ul> -->
|
||||
<v-card v-for="safety in safetyData" :title="safety.name_chapter" max-width="470">
|
||||
<v-list :key="safety.id">
|
||||
<v-list-item :title="safety.document_category"></v-list-item>
|
||||
</v-list>
|
||||
|
||||
</v-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue';
|
||||
import {pagecounter} from '@/utils/universal_functions'
|
||||
<script setup>
|
||||
import { ref, onBeforeMount } from 'vue';
|
||||
import { pagecounter } from '@/utils/universal_functions'
|
||||
import { axiosApiInstance } from '@/utils/axios-api';
|
||||
|
||||
export default {
|
||||
pagecounter()
|
||||
|
||||
setup() {
|
||||
pagecounter()
|
||||
const safetyData = ref([])
|
||||
|
||||
const safetyData = ref([])
|
||||
onBeforeMount(() => {
|
||||
axiosApiInstance.get(`api/safety/files/`).then(result => {
|
||||
safetyData.value = result.data
|
||||
})
|
||||
})
|
||||
|
||||
const safety = () => {
|
||||
axiosApiInstance.get(`api/safety/files/`).then(result => {
|
||||
safetyData.value = result.data
|
||||
})
|
||||
}
|
||||
|
||||
// console.log('Должно прийти с сервера хоть что-то' ,safetyData)
|
||||
|
||||
return {
|
||||
safetyData,
|
||||
safety
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<style></style>
|
||||
Reference in new issue
Block a user