Merge branch 'prod'

pull/4755/head^2
Cagatay Civici 2023-11-04 13:04:20 +03:00
commit edb19d837d
8 changed files with 78 additions and 101 deletions

View File

@ -1,6 +1,6 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Breadcrumb requires a collection of menuitems as its <i>model</i>.</p>
<p>Breadcrumb requires a collection of menuitems as its <i>model</i>, the root item is defined with the <i>home</i> property.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items" />
@ -13,10 +13,9 @@ export default {
data() {
return {
home: {
icon: 'pi pi-home',
to: '/'
icon: 'pi pi-home'
},
items: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }],
items: [{ label: 'Electronics' }, { label: 'Computer' }, { label: 'Accessories' }, { label: 'Keyboard' }, { label: 'Wireless' }],
code: {
basic: `
<Breadcrumb :home="home" :model="items" />
@ -33,15 +32,14 @@ export default {
data() {
return {
home: {
icon: 'pi pi-home',
to: '/',
icon: 'pi pi-home'
},
items: [
{ label: 'Electronics' },
{ label: 'Computer' },
{label: 'Notebook'},
{ label: 'Accessories' },
{label: 'Backpacks'},
{label: 'Item'}
{ label: 'Keyboard' },
{ label: 'Wireless' }
]
}
}
@ -59,15 +57,14 @@ export default {
import { ref } from "vue";
const home = ref({
icon: 'pi pi-home',
to: '/',
icon: 'pi pi-home'
});
const items = ref([
{ label: 'Electronics' },
{ label: 'Computer' },
{label: 'Notebook'},
{ label: 'Accessories' },
{label: 'Backpacks'},
{label: 'Item'}
{ label: 'Keyboard' },
{ label: 'Wireless' }
]);
<\/script>
`

View File

@ -1,27 +1,23 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
Since v3.33.0 the vue-router dependency of menu components is deprecated and templating should be used to define router links instead. This approach provides flexibility to be able to use any kind of router link component such as
<i>NuxtLink</i> or <i>router-link</i>. Here is an example with vue-router.
</p>
<p>Items with navigation are defined with templating to be able to use a router link component, an external link or programmatic navigation.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items">
<template #item="{ label, item, props }">
<router-link v-if="item.route" v-slot="routerProps" :to="item.route" custom>
<a :href="routerProps.href" v-bind="props.action">
<span v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
<template #item="{ item, props }">
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
<a :href="href" v-bind="props.action" @click="navigate">
<span :class="[item.icon, 'text-color']" />
<span class="text-primary font-semibold">{{ item.label }}</span>
</a>
</router-link>
<a v-else :href="item.url" :target="item.target" v-bind="props.action">
<span v-if="item.icon" v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
<span class="text-color">{{ item.label }}</span>
</a>
</template>
</Breadcrumb>
</div>
<DocSectionCode :code="code" />
<DocSectionCode :code="code" hideStackBlitz hideCodeSandbox />
</template>
<script>
@ -30,22 +26,21 @@ export default {
return {
home: {
icon: 'pi pi-home',
route: '/'
route: '/installation'
},
items: [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }],
items: [{ label: 'Components' }, { label: 'Form' }, { label: 'InputText', route: '/inputtext' }],
code: {
basic: `
<Breadcrumb :home="home" :model="items">
<template #item="{ label, item, props }">
<router-link v-if="item.route" v-slot="routerProps" :to="item.route" custom>
<a :href="routerProps.href" v-bind="props.action">
<span v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
<template #item="{ item, props }">
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
<a :href="href" v-bind="props.action" @click="navigate">
<span :class="[item.icon, 'text-color']" />
<span class="text-primary font-semibold">{{ item.label }}</span>
</a>
</router-link>
<a v-else :href="item.url" :target="item.target" v-bind="props.action">
<span v-if="item.icon" v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
<span class="text-color">{{ item.label }}</span>
</a>
</template>
</Breadcrumb>
@ -54,16 +49,15 @@ export default {
<template>
<div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items">
<template #item="{ label, item, props }">
<router-link v-if="item.route" v-slot="routerProps" :to="item.route" custom>
<a :href="routerProps.href" v-bind="props.action">
<span v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
<template #item="{ item, props }">
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
<a :href="href" v-bind="props.action" @click="navigate">
<span :class="[item.icon, 'text-color']" />
<span class="text-primary font-semibold">{{ item.label }}</span>
</a>
</router-link>
<a v-else :href="item.url" :target="item.target" v-bind="props.action">
<span v-if="item.icon" v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
<span class="text-color">{{ item.label }}</span>
</a>
</template>
</Breadcrumb>
@ -76,14 +70,12 @@ export default {
return {
home: {
icon: 'pi pi-home',
route: '/'
route: '/installation'
},
items: [
{label: 'Computer'},
{label: 'Notebook'},
{label: 'Accessories'},
{label: 'Backpacks'},
{label: 'Item'}
{ label: 'Components' },
{ label: 'Form' },
{ label: 'InputText', route: '/inputtext' }
]
}
}
@ -94,16 +86,15 @@ export default {
<template>
<div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items">
<template #item="{ label, item, props }">
<router-link v-if="item.route" v-slot="routerProps" :to="item.route" custom>
<a :href="routerProps.href" v-bind="props.action">
<span v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
<template #item="{ item, props }">
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
<a :href="href" v-bind="props.action" @click="navigate">
<span :class="[item.icon, 'text-color']" />
<span class="text-primary font-semibold">{{ item.label }}</span>
</a>
</router-link>
<a v-else :href="item.url" :target="item.target" v-bind="props.action">
<span v-if="item.icon" v-bind="props.icon" />
<span v-bind="props.label">{{ label }}</span>
<span class="text-color">{{ item.label }}</span>
</a>
</template>
</Breadcrumb>
@ -115,14 +106,12 @@ import { ref } from "vue";
const home = ref({
icon: 'pi pi-home',
route: '/'
route: '/installation'
});
const items = ref([
{label: 'Computer'},
{label: 'Notebook'},
{label: 'Accessories'},
{label: 'Backpacks'},
{label: 'Item'}
{ label: 'Components' },
{ label: 'Form' },
{ label: 'InputText', route: '/inputtext' }
]);
<\/script>
`

View File

@ -1,14 +1,15 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Custom content can be placed inside the menuitem using the <i>item</i> templating.</p>
<p>Custom content can be placed inside the items using the <i>item</i> template. The divider between the items has its own <i>separator</i> template.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items">
<template #item="{ item }">
<a :class="item.class" :href="item.url">
<a class="cursor-pointer" :href="item.url">
<span :class="item.icon"></span>
</a>
</template>
<template #separator> / </template>
</Breadcrumb>
</div>
<DocSectionCode :code="code" />
@ -18,16 +19,19 @@
export default {
data() {
return {
home: { icon: 'pi pi-home', url: 'https://primevue.org/' },
home: { icon: 'pi pi-home' },
items: [{ icon: 'pi pi-sitemap' }, { icon: 'pi pi-book' }, { icon: 'pi pi-wallet' }, { icon: 'pi pi-shopping-bag' }, { icon: 'pi pi-calculator' }],
code: {
basic: `
<Breadcrumb :home="home" :model="items">
<template #item="item">
<a :class="item.class">
<template #item="{ item }">
<a class="cursor-pointer" :href="item.url">
<span :class="item.icon"></span>
</a>
</template>
<template #separator> / </template>
</template>
</Breadcrumb>
`,
options: `
@ -35,10 +39,11 @@ export default {
<div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items">
<template #item="{ item }">
<a :class="item.class">
<a class="cursor-pointer" :href="item.url">
<span :class="item.icon"></span>
</a>
</template>
<template #separator> / </template>
</Breadcrumb>
</div>
</template>
@ -47,7 +52,7 @@ export default {
export default {
data() {
return {
home: { icon: 'pi pi-home', url: 'https://primevue.org/' },
home: { icon: 'pi pi-home' },
items: [{ icon: 'pi pi-sitemap' }, { icon: 'pi pi-book' }, { icon: 'pi pi-wallet' }, { icon: 'pi pi-shopping-bag' }, { icon: 'pi pi-calculator' }]
}
}
@ -59,10 +64,11 @@ export default {
<div class="card flex justify-content-center">
<Breadcrumb :home="home" :model="items">
<template #item="{ item }">
<a :class="item.class">
<a class="cursor-pointer" :href="item.url">
<span :class="item.icon"></span>
</a>
</template>
<template #separator> / </template>
</Breadcrumb>
</div>
</template>
@ -70,9 +76,8 @@ export default {
<script setup>
import { ref } from "vue";
const home = ref({ icon: 'pi pi-home', url: 'https://primevue.org/' });
const home = ref({ icon: 'pi pi-home' });
const items = ref([{ icon: 'pi pi-sitemap' }, { icon: 'pi pi-book' }, { icon: 'pi pi-wallet' }, { icon: 'pi pi-shopping-bag' }, { icon: 'pi pi-calculator' }]);
}
<\/script>
`
}

View File

@ -1,6 +1,6 @@
<template>
<DocSectionText v-bind="$attrs">
<p>A sample macOS implementation using various components.</p>
<p>A sample desktop demo using various components.</p>
</DocSectionText>
<div class="card dock-demo">
<Toast position="top-center" group="tc" />

View File

@ -1,6 +1,6 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Menu requires a collection of menuitems as its <i>model</i>. Default location is <i>bottom</i> and other sides are also available when defined with the <i>position</i> property.</p>
<p>Menu requires a collection of menuitems as its <i>model</i> and an <i>icon</i> template. Default location is <i>bottom</i> and other edges are also available when defined with the <i>position</i> property.</p>
</DocSectionText>
<div class="card dock-demo">
<div class="flex flex-wrap gap-3 mb-5">

View File

@ -1,8 +0,0 @@
<template>
<DocSectionText v-bind="$attrs">
<p>
Since v3.33.0 the vue-router dependency of menu components is deprecated and templating should be used to define router links instead. This approach provides flexibility to be able to use any kind of router link component such as
<i>NuxtLink</i> or <i>router-link</i>.
</p>
</DocSectionText>
</template>

View File

@ -6,7 +6,7 @@
<Menu :model="items">
<template #item="{ item, props }">
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
<a :href="href" v-bind="props.action" @click="navigate">
<a v-ripple :href="href" v-bind="props.action" @click="navigate">
<span :class="item.icon" />
<span class="ml-2">{{ item.label }}</span>
</a>
@ -43,7 +43,7 @@ export default {
},
{
label: 'External',
icon: 'pi pi-external-link',
icon: 'pi pi-home',
url: 'https://vuejs.org/'
}
]
@ -54,7 +54,7 @@ export default {
<Menu :model="items">
<template #item="{ item, props }">
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
<a :href="href" v-bind="props.action" @click="navigate">
<a v-ripple :href="href" v-bind="props.action" @click="navigate">
<span :class="item.icon" />
<span class="ml-2">{{ item.label }}</span>
</a>
@ -72,7 +72,7 @@ export default {
<Menu :model="items">
<template #item="{ item, props }">
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
<a :href="href" v-bind="props.action" @click="navigate">
<a v-ripple :href="href" v-bind="props.action" @click="navigate">
<span :class="item.icon" />
<span class="ml-2">{{ item.label }}</span>
</a>
@ -105,7 +105,7 @@ export default {
},
{
label: 'External',
icon: 'pi pi-external-link',
icon: 'pi pi-home',
url: 'https://vuejs.org/'
}
]
@ -120,7 +120,7 @@ export default {
<Menu :model="items">
<template #item="{ item, props }">
<router-link v-if="item.route" v-slot="{ href, navigate }" :to="item.route" custom>
<a :href="href" v-bind="props.action" @click="navigate">
<a v-ripple :href="href" v-bind="props.action" @click="navigate">
<span :class="item.icon" />
<span class="ml-2">{{ item.label }}</span>
</a>
@ -155,7 +155,7 @@ const items = ref([
},
{
label: 'External',
icon: 'pi pi-external-link',
icon: 'pi pi-home',
url: 'https://vuejs.org/'
}
]);

View File

@ -7,7 +7,6 @@ import AccessibilityDoc from '@/doc/dock/AccessibilityDoc.vue';
import AdvancedDoc from '@/doc/dock/AdvancedDoc.vue';
import BasicDoc from '@/doc/dock/BasicDoc.vue';
import ImportDoc from '@/doc/dock/ImportDoc.vue';
import RouterDoc from '@/doc/dock/RouterDoc.vue';
import PTComponent from '@/doc/dock/pt/index.vue';
import ThemingDoc from '@/doc/dock/theming/index.vue';
@ -30,11 +29,6 @@ export default {
label: 'Advanced',
component: AdvancedDoc
},
{
id: 'router',
label: 'Router',
component: RouterDoc
},
{
id: 'accessibility',
label: 'Accessibility',