2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>Toolbar provides <i>start</i>, <i>center</i> and <i>end</i> properties to place content at these sections.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<div class="card">
|
|
|
|
<Toolbar>
|
|
|
|
<template #start>
|
|
|
|
<Button label="New" icon="pi pi-plus" class="mr-2" />
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button label="Upload" icon="pi pi-upload" severity="success" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<i class="pi pi-bars p-toolbar-separator mr-2" />
|
2023-03-03 12:41:43 +00:00
|
|
|
<SplitButton label="Save" icon="pi pi-check" :model="items" severity="warning"></SplitButton>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<template #end>
|
|
|
|
<Button icon="pi pi-search" class="mr-2" />
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button icon="pi pi-calendar" severity="success" class="mr-2" />
|
|
|
|
<Button icon="pi pi-times" severity="danger" />
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
</Toolbar>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Update',
|
|
|
|
icon: 'pi pi-refresh'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Delete',
|
|
|
|
icon: 'pi pi-times'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Vue Website',
|
|
|
|
icon: 'pi pi-external-link',
|
|
|
|
command: () => {
|
|
|
|
window.location.href = 'https://vuejs.org/';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Upload',
|
|
|
|
icon: 'pi pi-upload',
|
|
|
|
command: () => {
|
|
|
|
this.$router.push('fileupload');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
code: {
|
2023-08-16 13:58:31 +00:00
|
|
|
basic: `<Toolbar>
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #start>
|
|
|
|
<Button label="New" icon="pi pi-plus" class="mr-2" />
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button label="Upload" icon="pi pi-upload" severity="success" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<i class="pi pi-bars p-toolbar-separator mr-2" />
|
2023-03-03 12:41:43 +00:00
|
|
|
<SplitButton label="Save" icon="pi pi-check" :model="items" severity="warning"></SplitButton>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<template #end>
|
|
|
|
<Button icon="pi pi-search" class="mr-2" />
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button icon="pi pi-calendar" severity="success" class="mr-2" />
|
|
|
|
<Button icon="pi pi-times" severity="danger" />
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
</Toolbar>`,
|
2023-08-16 13:58:31 +00:00
|
|
|
options: `<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card">
|
|
|
|
<Toolbar>
|
|
|
|
<template #start>
|
|
|
|
<Button label="New" icon="pi pi-plus" class="mr-2" />
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button label="Upload" icon="pi pi-upload" severity="success" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<i class="pi pi-bars p-toolbar-separator mr-2" />
|
2023-03-03 12:41:43 +00:00
|
|
|
<SplitButton label="Save" icon="pi pi-check" :model="items" severity="warning"></SplitButton>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<template #end>
|
|
|
|
<Button icon="pi pi-search" class="mr-2" />
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button icon="pi pi-calendar" severity="success" class="mr-2" />
|
|
|
|
<Button icon="pi pi-times" severity="danger" />
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
</Toolbar>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: 'Update',
|
|
|
|
icon: 'pi pi-refresh'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Delete',
|
|
|
|
icon: 'pi pi-times'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Vue Website',
|
|
|
|
icon: 'pi pi-external-link',
|
|
|
|
command: () => {
|
|
|
|
window.location.href = 'https://vuejs.org/';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Upload',
|
|
|
|
icon: 'pi pi-upload',
|
|
|
|
command: () => {
|
|
|
|
this.$router.push('fileupload');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
<\/script>`,
|
2023-08-16 13:58:31 +00:00
|
|
|
composition: `<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card">
|
|
|
|
<Toolbar>
|
|
|
|
<template #start>
|
|
|
|
<Button label="New" icon="pi pi-plus" class="mr-2" />
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button label="Upload" icon="pi pi-upload" severity="success" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<i class="pi pi-bars p-toolbar-separator mr-2" />
|
2023-03-03 12:41:43 +00:00
|
|
|
<SplitButton label="Save" icon="pi pi-check" :model="items" severity="warning"></SplitButton>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<template #end>
|
|
|
|
<Button icon="pi pi-search" class="mr-2" />
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button icon="pi pi-calendar" severity="success" class="mr-2" />
|
|
|
|
<Button icon="pi pi-times" severity="danger" />
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
</Toolbar>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
const items = ref([
|
|
|
|
{
|
|
|
|
label: 'Update',
|
|
|
|
icon: 'pi pi-refresh'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Delete',
|
|
|
|
icon: 'pi pi-times'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Vue Website',
|
|
|
|
icon: 'pi pi-external-link',
|
|
|
|
command: () => {
|
|
|
|
window.location.href = 'https://vuejs.org/';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Upload',
|
|
|
|
icon: 'pi pi-upload',
|
|
|
|
command: () => {
|
|
|
|
this.$router.push('fileupload');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
])
|
|
|
|
<\/script>`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|