mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Passing computed value as a model prop fixed
This commit is contained in:
parent
c5c1e69a65
commit
5888f1d9e9
1 changed files with 11 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div :id="id" class="p-panelmenu p-component">
|
||||
<template v-for="(item, index) of model" :key="getPanelKey(index)">
|
||||
<template v-for="(item, index) of items" :key="getPanelKey(index)">
|
||||
<div v-if="isItemVisible(item)" :style="getItemProp(item, 'style')" :class="getPanelClass(item)">
|
||||
<div
|
||||
:id="getHeaderId(index)"
|
||||
|
@ -70,9 +70,18 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
activeItem: null
|
||||
activeItem: null,
|
||||
items: null
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
model: {
|
||||
immediate: true,
|
||||
handler(newValue) {
|
||||
this.items = reactive(newValue);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getItemProp(item, name) {
|
||||
return item ? ObjectUtils.getItemValue(item[name]) : undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue