Refactored composable

This commit is contained in:
Cagatay Civici
2022-11-29 08:49:09 +03:00
parent c6ff257662
commit c80bbf8f70
11 changed files with 3910 additions and 19 deletions

View File

@@ -1,9 +1,9 @@
<script setup>
import { onMounted, reactive, ref, watch } from 'vue';
import ProductService from '@/layout/service/ProductService';
import { useLayoutService } from '@/layout/composables/layoutService';
import { useLayout } from '@/layout/composables/layout';
const { isDarkTheme } = useLayoutService();
const { isDarkTheme } = useLayout();
const products = ref(null);
const lineData = reactive({

View File

@@ -1,7 +1,7 @@
<script setup>
import { useLayoutService } from '@/layout/composables/layoutService';
import { useLayout } from '@/layout/composables/layout';
import AppConfig from '@/layout/AppConfig.vue';
const { isDarkTheme } = useLayoutService();
const { isDarkTheme } = useLayout();
const smoothScroll = (id) => {
document.querySelector(id).scrollIntoView({

View File

@@ -1,9 +1,9 @@
<script setup>
import { useLayoutService } from '@/layout/composables/layoutService';
import { useLayout } from '@/layout/composables/layout';
import { ref } from 'vue';
import AppConfig from '@/layout/AppConfig.vue';
const { isDarkTheme } = useLayoutService();
const { isDarkTheme } = useLayout();
const email = ref('');
const password = ref('');

View File

@@ -1,8 +1,8 @@
<script setup>
import { ref, watch } from 'vue';
import { useLayoutService } from '@/layout/composables/layoutService';
import { useLayout } from '@/layout/composables/layout';
const { layoutConfig } = useLayoutService();
const { layoutConfig } = useLayout();
let documentStyle = getComputedStyle(document.documentElement);
let textColor = documentStyle.getPropertyValue('--text-color');
let textColorSecondary = documentStyle.getPropertyValue('--text-color-secondary');