primevue-mirror/doc/toolbar/BasicDoc.vue

142 lines
3.6 KiB
Vue
Raw Normal View History

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>
2023-10-23 16:17:47 +00:00
<Button icon="pi pi-plus" class="mr-2" />
<Button icon="pi pi-print" class="mr-2" />
<Button icon="pi pi-upload" />
2023-02-28 08:29:30 +00:00
</template>
2023-10-23 16:17:47 +00:00
<template #center>
<span class="p-input-icon-left">
<i class="pi pi-search" />
<InputText placeholder="Search" />
</span>
2023-02-28 08:29:30 +00:00
</template>
2023-10-23 16:17:47 +00:00
<template #end> <SplitButton label="Save" icon="pi pi-check" :model="items"></SplitButton></template>
2023-02-28 08:29:30 +00:00
</Toolbar>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
items: [
{
label: 'Update',
icon: 'pi pi-refresh'
},
{
label: 'Delete',
icon: 'pi pi-times'
}
],
code: {
2023-09-22 12:54:14 +00:00
basic: `
<Toolbar>
2023-02-28 08:29:30 +00:00
<template #start>
2023-10-23 16:17:47 +00:00
<Button icon="pi pi-plus" class="mr-2" />
<Button icon="pi pi-print" class="mr-2" />
<Button icon="pi pi-upload" />
2023-02-28 08:29:30 +00:00
</template>
2023-10-23 16:17:47 +00:00
<template #center>
<span class="p-input-icon-left">
<i class="pi pi-search" />
<InputText placeholder="Search" />
</span>
2023-02-28 08:29:30 +00:00
</template>
2023-10-23 16:17:47 +00:00
<template #end> <SplitButton label="Save" icon="pi pi-check" :model="items"></SplitButton></template>
2023-10-15 09:38:39 +00:00
</Toolbar>
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
<Toolbar>
<template #start>
2023-10-23 16:17:47 +00:00
<Button icon="pi pi-plus" class="mr-2" />
<Button icon="pi pi-print" class="mr-2" />
<Button icon="pi pi-upload" />
2023-02-28 08:29:30 +00:00
</template>
2023-10-23 16:17:47 +00:00
<template #center>
<span class="p-input-icon-left">
<i class="pi pi-search" />
<InputText placeholder="Search" />
</span>
2023-02-28 08:29:30 +00:00
</template>
2023-10-23 16:17:47 +00:00
<template #end> <SplitButton label="Save" icon="pi pi-check" :model="items"></SplitButton></template>
2023-02-28 08:29:30 +00:00
</Toolbar>
</div>
</template>
<script>
export default {
data() {
return {
items: [
{
label: 'Update',
icon: 'pi pi-refresh'
},
{
label: 'Delete',
icon: 'pi pi-times'
}
]
};
}
};
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
<Toolbar>
<template #start>
2023-10-23 16:17:47 +00:00
<Button icon="pi pi-plus" class="mr-2" />
<Button icon="pi pi-print" class="mr-2" />
<Button icon="pi pi-upload" />
2023-02-28 08:29:30 +00:00
</template>
2023-10-23 16:17:47 +00:00
<template #center>
<span class="p-input-icon-left">
<i class="pi pi-search" />
<InputText placeholder="Search" />
</span>
2023-02-28 08:29:30 +00:00
</template>
2023-10-23 16:17:47 +00:00
<template #end> <SplitButton label="Save" icon="pi pi-check" :model="items"></SplitButton></template>
2023-02-28 08:29:30 +00:00
</Toolbar>
</div>
</template>
<script setup>
import { ref } from 'vue';
const items = ref([
{
label: 'Update',
icon: 'pi pi-refresh'
},
{
label: 'Delete',
icon: 'pi pi-times'
}
])
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>