Update PTDoc.vue
parent
8b21f70b96
commit
6005b67be7
|
@ -62,7 +62,9 @@ export default {
|
||||||
basic: `
|
basic: `
|
||||||
<SpeedDial :model="items" direction="down" :style="{ left: 'calc(50% - 2rem)', top: 0 }"
|
<SpeedDial :model="items" direction="down" :style="{ left: 'calc(50% - 2rem)', top: 0 }"
|
||||||
:pt="{
|
:pt="{
|
||||||
action: ({ props, state, menuitemId }) => ({ class: actionClass(state, menuitemId) })
|
action: ({ props, state, context }) => ({
|
||||||
|
class: context.active ? 'bg-primary' : undefined
|
||||||
|
})
|
||||||
}"
|
}"
|
||||||
/>`,
|
/>`,
|
||||||
options: `
|
options: `
|
||||||
|
@ -71,7 +73,9 @@ export default {
|
||||||
<div :style="{ position: 'relative', height: '300px' }">
|
<div :style="{ position: 'relative', height: '300px' }">
|
||||||
<SpeedDial :model="items" direction="down" :style="{ left: 'calc(50% - 2rem)', top: 0 }"
|
<SpeedDial :model="items" direction="down" :style="{ left: 'calc(50% - 2rem)', top: 0 }"
|
||||||
:pt="{
|
:pt="{
|
||||||
action: ({ props, state, menuitemId }) => ({ class: actionClass(state, menuitemId) })
|
action: ({ props, state, context }) => ({
|
||||||
|
class: context.active ? 'bg-primary' : undefined
|
||||||
|
})
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -121,11 +125,6 @@ export default {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
actionClass(state, menuitemId) {
|
|
||||||
return menuitemId === state.focusedOptionIndex ? 'bg-primary' : undefined;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
<\/script>`,
|
<\/script>`,
|
||||||
|
@ -135,7 +134,9 @@ export default {
|
||||||
<div :style="{ position: 'relative', height: '300px' }">
|
<div :style="{ position: 'relative', height: '300px' }">
|
||||||
<SpeedDial :model="items" direction="down" :style="{ left: 'calc(50% - 2rem)', top: 0 }"
|
<SpeedDial :model="items" direction="down" :style="{ left: 'calc(50% - 2rem)', top: 0 }"
|
||||||
:pt="{
|
:pt="{
|
||||||
action: ({ props, state, menuitemId }) => ({ class: actionClass(state, menuitemId) })
|
action: ({ props, state, context }) => ({
|
||||||
|
class: context.active ? 'bg-primary' : undefined
|
||||||
|
})
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -151,10 +152,6 @@ import { useRouter } from 'vue-router';
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const actionClass => (state, menuitemId) = {
|
|
||||||
return menuitemId === state.focusedOptionIndex ? 'bg-primary' : undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
const items = ref([
|
const items = ref([
|
||||||
{
|
{
|
||||||
label: 'Add',
|
label: 'Add',
|
||||||
|
|
Loading…
Reference in New Issue