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