diff --git a/api-generator/components/dock.js b/api-generator/components/dock.js
index 3920dba71..c8800bfb1 100644
--- a/api-generator/components/dock.js
+++ b/api-generator/components/dock.js
@@ -41,6 +41,10 @@ const DockSlots = [
{
name: "item",
description: "Custom content for the item."
+ },
+ {
+ name: "icon",
+ description: "Custom content for the item."
}
];
diff --git a/src/components/dock/Dock.d.ts b/src/components/dock/Dock.d.ts
index 9ea7619bd..cef2af843 100644
--- a/src/components/dock/Dock.d.ts
+++ b/src/components/dock/Dock.d.ts
@@ -13,6 +13,7 @@ declare class Dock {
$props: DockProps;
$slots: {
'item': VNode[];
+ 'icon': VNode[];
}
}
diff --git a/src/components/dock/Dock.vue b/src/components/dock/Dock.vue
index 29a96a110..1f41aa9b9 100644
--- a/src/components/dock/Dock.vue
+++ b/src/components/dock/Dock.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/components/dock/DockSub.vue b/src/components/dock/DockSub.vue
index 458016d83..1a72683ed 100644
--- a/src/components/dock/DockSub.vue
+++ b/src/components/dock/DockSub.vue
@@ -2,25 +2,25 @@
@@ -36,8 +36,8 @@ export default {
type: Array,
default: null
},
- template: {
- type: Function,
+ templates: {
+ type: null,
default: null
},
exact: {
diff --git a/src/views/dock/DockDemo.vue b/src/views/dock/DockDemo.vue
index ae333e25e..58b7fc25b 100644
--- a/src/views/dock/DockDemo.vue
+++ b/src/views/dock/DockDemo.vue
@@ -13,10 +13,26 @@
Basic
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Advanced
@@ -129,20 +145,20 @@ export default {
],
dockBasicItems: [
{
- label: 'Finder',
- icon: () =>
+ label: "Finder",
+ icon: "demo/images/dock/finder.svg"
},
{
- label: 'App Store',
- icon: () =>
+ label: "App Store",
+ icon: "demo/images/dock/appstore.svg"
},
{
- label: 'Photos',
- icon: () =>
+ label: "Photos",
+ icon: "demo/images/dock/photos.svg"
},
{
- label: 'Trash',
- icon: () =>
+ label: "Trash",
+ icon: "demo/images/dock/trash.png"
}
],
menubarItems: [
diff --git a/src/views/dock/DockDoc.vue b/src/views/dock/DockDoc.vue
index 38d15aa08..e26cd8537 100644
--- a/src/views/dock/DockDoc.vue
+++ b/src/views/dock/DockDoc.vue
@@ -20,20 +20,20 @@ import Dock from 'primevue/dock';
return {
items: [
{
- label: 'Finder',
- icon: () => <img alt="Finder" src="demo/images/dock/finder.svg" style="width: 100%" />
+ label: "Finder",
+ icon: "demo/images/dock/finder.svg"
},
{
- label: 'App Store',
- icon: () => <img alt="App Store" src="demo/images/dock/appstore.svg" style="width: 100%" />
+ label: "App Store",
+ icon: "demo/images/dock/appstore.svg"
},
{
- label: 'Photos',
- icon: () => <img alt="Photos" src="demo/images/dock/photos.svg" style="width: 100%" />
+ label: "Photos",
+ icon: "demo/images/dock/photos.svg"
},
{
- label: 'Trash',
- icon: () => <img alt="trash" src="demo/images/dock/trash.png" style="width: 100%" />
+ label: "Trash",
+ icon: "demo/images/dock/trash.png"
}
]
}
@@ -140,6 +140,10 @@ import Dock from 'primevue/dock';
item |
item: Custom content for item |
+
+ icon |
+ item: Custom content for icon |
+
@@ -166,10 +170,26 @@ export default {
Basic
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Advanced
@@ -279,20 +299,20 @@ export default {
],
dockBasicItems: [
{
- label: 'Finder',
- icon: () =>
+ label: "Finder",
+ icon: "demo/images/dock/finder.svg"
},
{
- label: 'App Store',
- icon: () =>
+ label: "App Store",
+ icon: "demo/images/dock/appstore.svg"
},
{
- label: 'Photos',
- icon: () =>
+ label: "Photos",
+ icon: "demo/images/dock/photos.svg"
},
{
- label: 'Trash',
- icon: () =>
+ label: "Trash",
+ icon: "demo/images/dock/trash.png"
}
],
menubarItems: [
@@ -496,6 +516,7 @@ export default {
background-image: url("https://www.primefaces.org/wp-content/uploads/2021/02/primevue-blog.jpg");
background-repeat: no-repeat;
background-size: cover;
+ background-position: center;
z-index: 1;
}
@@ -550,10 +571,26 @@ export default {
Basic
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Advanced
@@ -678,20 +715,20 @@ export default {
]);
const dockBasicItems = ref([
{
- label: 'Finder',
- icon: () =>
+ label: "Finder",
+ icon: "demo/images/dock/finder.svg"
},
{
- label: 'App Store',
- icon: () =>
+ label: "App Store",
+ icon: "demo/images/dock/appstore.svg"
},
{
- label: 'Photos',
- icon: () =>
+ label: "Photos",
+ icon: "demo/images/dock/photos.svg"
},
{
- label: 'Trash',
- icon: () =>
+ label: "Trash",
+ icon: "demo/images/dock/trash.png"
}
]);
const menubarItems = ref([
@@ -915,6 +952,7 @@ export default {
background-image: url("https://www.primefaces.org/wp-content/uploads/2021/02/primevue-blog.jpg");
background-repeat: no-repeat;
background-size: cover;
+ background-position: center;
z-index: 1;
}
@@ -976,10 +1014,26 @@ export default {
Basic
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Advanced
@@ -1101,20 +1155,20 @@ export default {
]);
const dockBasicItems = ref([
{
- label: 'Finder',
- icon: () =>
+ label: "Finder",
+ icon: "demo/images/dock/finder.svg"
},
{
- label: 'App Store',
- icon: () =>
+ label: "App Store",
+ icon: "demo/images/dock/appstore.svg"
},
{
- label: 'Photos',
- icon: () =>
+ label: "Photos",
+ icon: "demo/images/dock/photos.svg"
},
{
- label: 'Trash',
- icon: () =>
+ label: "Trash",
+ icon: "demo/images/dock/trash.png"
}
]);
const menubarItems = ref([
@@ -1360,6 +1414,7 @@ export default {
background-image: url("https://www.primefaces.org/wp-content/uploads/2021/02/primevue-blog.jpg");
background-repeat: no-repeat;
background-size: cover;
+ background-position: center;
z-index: 1;
}