Baseurl added
parent
d813821241
commit
15ca050649
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div :class="['layout-sidebar', { active: active }]">
|
||||
<nuxt-link to="/" class="logo">
|
||||
<img :src="'/demo/images/primevue-logo-' + `${$appState.darkTheme ? 'light' : 'dark'}` + '.svg'" alt="primevue logo" />
|
||||
<img :src="'demo/images/primevue-logo-' + `${$appState.darkTheme ? 'light' : 'dark'}` + '.svg'" alt="primevue logo" />
|
||||
</nuxt-link>
|
||||
<div class="layout-sidebar-filter p-fluid">
|
||||
<AutoComplete
|
||||
|
@ -66,8 +66,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { FilterService, FilterMatchMode } from 'primevue/api';
|
||||
import menudata from '@/assets/menu/menu.json';
|
||||
import { FilterMatchMode, FilterService } from 'primevue/api';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
import { defineNuxtConfig } from 'nuxt';
|
||||
const path = require('path');
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
|
||||
// https://v3.nuxtjs.org/api/configuration/nuxt.config
|
||||
export default defineNuxtConfig({
|
||||
ssr: true,
|
||||
ssr: false,
|
||||
typescript: false,
|
||||
components: true,
|
||||
app: {
|
||||
baseURL: process.env.NODE_ENV === 'production' ? '/primevue-nuxt' : '/',
|
||||
head: {
|
||||
link: [
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<section :ref="containerRef" :class="['landing-header pad-section', { 'landing-header-active': menuActive }]">
|
||||
<span>
|
||||
<img :src="'/demo/images/primevue-logo-' + `${$appState.darkTheme ? 'light' : 'dark'}` + '.svg'" alt="primevue logo" class="landing-header-logo" />
|
||||
<img :src="'demo/images/primevue-logo-' + `${$appState.darkTheme ? 'light' : 'dark'}` + '.svg'" alt="primevue logo" class="landing-header-logo" />
|
||||
</span>
|
||||
|
||||
<div class="flex align-items-center">
|
||||
|
|
|
@ -3,7 +3,7 @@ const services = {
|
|||
export default class CountryService {
|
||||
|
||||
getCountries() {
|
||||
return useFetch('demo/data/countries.json').then(res => res.json())
|
||||
return fetch('demo/data/countries.json').then(res => res.json())
|
||||
.then(d => d.data);
|
||||
}
|
||||
}
|
||||
|
@ -12,28 +12,28 @@ export default class CountryService {
|
|||
export default class CustomerService {
|
||||
|
||||
getCustomersSmall() {
|
||||
return useFetch('demo/data/customers-small.json').then(res => res.json())
|
||||
return fetch('demo/data/customers-small.json').then(res => res.json())
|
||||
.then(d => d.data);
|
||||
}
|
||||
|
||||
getCustomersMedium() {
|
||||
return useFetch('demo/data/customers-medium.json').then(res => res.json())
|
||||
return fetch('demo/data/customers-medium.json').then(res => res.json())
|
||||
.then(d => d.data);
|
||||
}
|
||||
|
||||
getCustomersLarge() {
|
||||
return useFetch('demo/data/customers-large.json').then(res => res.json())
|
||||
return fetch('demo/data/customers-large.json').then(res => res.json())
|
||||
.then(d => d.data);
|
||||
}
|
||||
|
||||
getCustomersXLarge() {
|
||||
return useFetch('demo/data/customers-xlarge.json').then(res => res.json())
|
||||
return fetch('demo/data/customers-xlarge.json').then(res => res.json())
|
||||
.then(d => d.data);
|
||||
}
|
||||
|
||||
getCustomers(params) {
|
||||
const queryParams = params ? Object.keys(params).map(k => encodeURIComponent(k) + '=' + encodeURIComponent(params[k])).join('&') : '';
|
||||
return useFetch('https://www.primefaces.org/data/customers?' + queryParams).then(res => res.json())
|
||||
return fetch('https://www.primefaces.org/data/customers?' + queryParams).then(res => res.json())
|
||||
}
|
||||
}
|
||||
`,
|
||||
|
@ -41,7 +41,7 @@ export default class CustomerService {
|
|||
export default class EventService {
|
||||
|
||||
getEvents() {
|
||||
return useFetch('demo/data/events.json').then(res => res.json())
|
||||
return fetch('demo/data/events.json').then(res => res.json())
|
||||
.then(d => d.data);
|
||||
}
|
||||
}
|
||||
|
@ -50,12 +50,12 @@ export default class EventService {
|
|||
export default class NodeService {
|
||||
|
||||
getTreeTableNodes() {
|
||||
return useFetch('demo/data/treetablenodes.json').then(res => res.json())
|
||||
return fetch('demo/data/treetablenodes.json').then(res => res.json())
|
||||
.then(d => d.root);
|
||||
}
|
||||
|
||||
getTreeNodes() {
|
||||
return useFetch('demo/data/treenodes.json').then(res => res.json())
|
||||
return fetch('demo/data/treenodes.json').then(res => res.json())
|
||||
.then(d => d.root);
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ export default class NodeService {
|
|||
export default class PhotoService {
|
||||
|
||||
getImages() {
|
||||
return useFetch('demo/data/photos.json').then(res => res.json())
|
||||
return fetch('demo/data/photos.json').then(res => res.json())
|
||||
.then(d => d.data);
|
||||
}
|
||||
}
|
||||
|
@ -73,15 +73,15 @@ export default class PhotoService {
|
|||
export default class ProductService {
|
||||
|
||||
getProductsSmall() {
|
||||
return useFetch('demo/data/products-small.json').then(res => res.json()).then(d => d.data);
|
||||
return fetch('demo/data/products-small.json').then(res => res.json()).then(d => d.data);
|
||||
}
|
||||
|
||||
getProducts() {
|
||||
return useFetch('demo/data/products.json').then(res => res.json()).then(d => d.data);
|
||||
return fetch('demo/data/products.json').then(res => res.json()).then(d => d.data);
|
||||
}
|
||||
|
||||
getProductsWithOrdersSmall() {
|
||||
return useFetch('demo/data/products-orders-small.json').then(res => res.json()).then(d => d.data);
|
||||
return fetch('demo/data/products-orders-small.json').then(res => res.json()).then(d => d.data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
export default class NewsService {
|
||||
async fetchNews() {
|
||||
const data = await useFetch('https://www.primefaces.org/cdnnews/primevue.json', { cache: 'no-store' });
|
||||
|
||||
return await data.json();
|
||||
fetchNews() {
|
||||
return fetch('https://www.primefaces.org/cdn/news/primevue.json', { cache: 'no-store' }).then((res) => res.json());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue