Closed fairking closed 5 years ago
Not sure if I fixed the issue but errors disappeared since I corrected layout names:
File: /layouts/layout-auth.vue
<script lang="ts">
export default { name: "auth" };
</script>
File: /layouts/layout-loading.vue
<script lang="ts">
export default { name: "loading" };
</script>
File: /layouts/layout-default.vue
<script lang="ts">
export default { name: "default" };
</script>
File: App.vue
<template>
<div id="app">
<vue-extend-layouts path="layouts" loading="loading" prefix="layout-" />
</div>
</template>
File: /modules/LayoutsModule.ts
const state = {
layout: "loading"
};
const getters = {
layout(state) {
return state.layout;
}
};
const mutations = {
SET_LAYOUT(state, payload) {
state.layout = payload;
}
};
export const layouts = {
namespaced: true,
state,
getters,
mutations
};
Yes @denis-pujdak-adm-it
Vue-extend-layout uses the name of the layout to decide which component (layout) to load
Thanks Alan.
Thanks for using
Thanks for making a great stuff Alan.
I have the following js errors in my browser:
File not found: /layout-components-AppEventbar-vue.4dd61a39707f32e43959.hot-update.js
in the html source I can see the following lines:<link href="/layout-components-AppEventbar-vue.4dd61a39707f32e43959.hot-update.js" rel="prefetch"><link href="/layout-components-AppEventbar-vue.js" rel="prefetch"><link href="/layout-components-AppFooter-vue.js" rel="prefetch">...
Should I worry about those errors? Is the any way to supress them?
Please let me know if you need my code examples but as far the code is mostly same as your examples. Thanks.