mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Merged new Docs and Demos
This commit is contained in:
parent
296cc217fb
commit
dfcc8ef4e7
1235 changed files with 130757 additions and 122640 deletions
|
@ -1,270 +1,93 @@
|
|||
<template>
|
||||
<div>
|
||||
<Head>
|
||||
<Title>Vue SplitButton Component</Title>
|
||||
<Meta name="description" content="SplitButton groups a set of commands in an overlay with a default command." />
|
||||
</Head>
|
||||
|
||||
<div class="content-section introduction">
|
||||
<div class="feature-intro">
|
||||
<h1>SplitButton</h1>
|
||||
<p>SplitButton groups a set of commands in an overlay with a default command.</p>
|
||||
</div>
|
||||
<AppDemoActions />
|
||||
</div>
|
||||
|
||||
<div class="content-section implementation">
|
||||
<div class="card">
|
||||
<h5>Basic</h5>
|
||||
<SplitButton label="Save" icon="pi pi-plus" @click="save" :model="items" :buttonProps="{ 'aria-label': 'Default Action' }" :menuButtonProps="{ 'aria-label': 'More Options' }"></SplitButton>
|
||||
|
||||
<h5>Nested</h5>
|
||||
<SplitButton label="Save" icon="pi pi-plus" @click="save" :model="nestedItems"></SplitButton>
|
||||
|
||||
<h5>Severities</h5>
|
||||
<SplitButton label="Primary" :model="items" class="mb-2"></SplitButton>
|
||||
<SplitButton label="Secondary" :model="items" class="p-button-secondary mb-2"></SplitButton>
|
||||
<SplitButton label="Success" :model="items" class="p-button-success mb-2"></SplitButton>
|
||||
<SplitButton label="Info" :model="items" class="p-button-info mb-2"></SplitButton>
|
||||
<SplitButton label="Warning" :model="items" class="p-button-warning mb-2"></SplitButton>
|
||||
<SplitButton label="Help" :model="items" class="p-button-help mb-2"></SplitButton>
|
||||
<SplitButton label="Danger" :model="items" class="p-button-danger mb-2"></SplitButton>
|
||||
|
||||
<h5>Raised Buttons</h5>
|
||||
<SplitButton label="Primary" :model="items" class="p-button-raised mb-2"></SplitButton>
|
||||
<SplitButton label="Secondary" :model="items" class="p-button-raised p-button-secondary mb-2"></SplitButton>
|
||||
<SplitButton label="Success" :model="items" class="p-button-raised p-button-success mb-2"></SplitButton>
|
||||
<SplitButton label="Info" :model="items" class="p-button-raised p-button-info mb-2"></SplitButton>
|
||||
<SplitButton label="Warning" :model="items" class="p-button-raised p-button-warning mb-2"></SplitButton>
|
||||
<SplitButton label="Help" :model="items" class="p-button-raised p-button-help mb-2"></SplitButton>
|
||||
<SplitButton label="Danger" :model="items" class="p-button-raised p-button-danger mb-2"></SplitButton>
|
||||
|
||||
<h5>Rounded Buttons</h5>
|
||||
<SplitButton label="Primary" :model="items" class="p-button-rounded mb-2"></SplitButton>
|
||||
<SplitButton label="Secondary" :model="items" class="p-button-rounded p-button-secondary mb-2"></SplitButton>
|
||||
<SplitButton label="Success" :model="items" class="p-button-rounded p-button-success mb-2"></SplitButton>
|
||||
<SplitButton label="Info" :model="items" class="p-button-rounded p-button-info mb-2"></SplitButton>
|
||||
<SplitButton label="Warning" :model="items" class="p-button-rounded p-button-warning mb-2"></SplitButton>
|
||||
<SplitButton label="Help" :model="items" class="p-button-rounded p-button-help mb-2"></SplitButton>
|
||||
<SplitButton label="Danger" :model="items" class="p-button-rounded p-button-danger mb-2"></SplitButton>
|
||||
|
||||
<h5>Text Buttons</h5>
|
||||
<SplitButton label="Primary" :model="items" class="p-button-text mb-2"></SplitButton>
|
||||
<SplitButton label="Secondary" :model="items" class="p-button-text p-button-secondary mb-2"></SplitButton>
|
||||
<SplitButton label="Success" :model="items" class="p-button-text p-button-success mb-2"></SplitButton>
|
||||
<SplitButton label="Info" :model="items" class="p-button-text p-button-info mb-2"></SplitButton>
|
||||
<SplitButton label="Warning" :model="items" class="p-button-text p-button-warning mb-2"></SplitButton>
|
||||
<SplitButton label="Help" :model="items" class="p-button-text p-button-help mb-2"></SplitButton>
|
||||
<SplitButton label="Danger" :model="items" class="p-button-text p-button-danger mb-2"></SplitButton>
|
||||
|
||||
<h5>Raised Text Buttons</h5>
|
||||
<SplitButton label="Primary" :model="items" class="p-button-raised p-button-text mb-2"></SplitButton>
|
||||
<SplitButton label="Secondary" :model="items" class="p-button-raised p-button-text p-button-secondary mb-2"></SplitButton>
|
||||
<SplitButton label="Success" :model="items" class="p-button-raised p-button-text p-button-success mb-2"></SplitButton>
|
||||
<SplitButton label="Info" :model="items" class="p-button-raised p-button-text p-button-info mb-2"></SplitButton>
|
||||
<SplitButton label="Warning" :model="items" class="p-button-raised p-button-text p-button-warning mb-2"></SplitButton>
|
||||
<SplitButton label="Help" :model="items" class="p-button-raised p-button-text p-button-help mb-2"></SplitButton>
|
||||
<SplitButton label="Danger" :model="items" class="p-button-raised p-button-text p-button-danger mb-2"></SplitButton>
|
||||
|
||||
<h5>Outlined Buttons</h5>
|
||||
<SplitButton label="Primary" :model="items" class="p-button-outlined mb-2"></SplitButton>
|
||||
<SplitButton label="Secondary" :model="items" class="p-button-outlined p-button-secondary mb-2"></SplitButton>
|
||||
<SplitButton label="Success" :model="items" class="p-button-outlined p-button-success mb-2"></SplitButton>
|
||||
<SplitButton label="Info" :model="items" class="p-button-outlined p-button-info mb-2"></SplitButton>
|
||||
<SplitButton label="Warning" :model="items" class="p-button-outlined p-button-warning mb-2"></SplitButton>
|
||||
<SplitButton label="Help" :model="items" class="p-button-outlined p-button-help mb-2"></SplitButton>
|
||||
<SplitButton label="Danger" :model="items" class="p-button-outlined p-button-danger mb-2"></SplitButton>
|
||||
|
||||
<h5>Sizes</h5>
|
||||
<SplitButton label="Small" :model="items" class="p-button-sm mb-2"></SplitButton>
|
||||
<SplitButton label="Normal" :model="items" class="mb-2"></SplitButton>
|
||||
<SplitButton label="Large" :model="items" class="p-button-lg mb-2"></SplitButton>
|
||||
|
||||
<h5>Templating</h5>
|
||||
<SplitButton :model="items" class="bg-primary border-round">
|
||||
<Button @click="save">
|
||||
<img alt="logo" src="https://primefaces.org/cdn/primevue/images/logo.svg" style="width: 1rem" />
|
||||
<span class="ml-2 flex align-items-center font-bold">PrimeVue</span>
|
||||
</Button>
|
||||
</SplitButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<SplitButtonDoc />
|
||||
</div>
|
||||
<DocComponent title="Vue Split Button Component" header="SplitButton" description="SplitButton groups a set of commands in an overlay with a default command." :componentDocs="docs" :apiDocs="['SplitButton']" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SplitButtonDoc from './SplitButtonDoc';
|
||||
import AccessibilityDoc from '@/doc/splitbutton/AccessibilityDoc.vue';
|
||||
import BasicDoc from '@/doc/splitbutton/BasicDoc.vue';
|
||||
import DisabledDoc from '@/doc/splitbutton/DisabledDoc.vue';
|
||||
import ImportDoc from '@/doc/splitbutton/ImportDoc.vue';
|
||||
import OutlinedDoc from '@/doc/splitbutton/OutlinedDoc.vue';
|
||||
import RaisedDoc from '@/doc/splitbutton/RaisedDoc.vue';
|
||||
import RaisedTextDoc from '@/doc/splitbutton/RaisedTextDoc.vue';
|
||||
import RoundedDoc from '@/doc/splitbutton/RoundedDoc.vue';
|
||||
import SeverityDoc from '@/doc/splitbutton/SeverityDoc.vue';
|
||||
import SizesDoc from '@/doc/splitbutton/SizesDoc.vue';
|
||||
import StyleDoc from '@/doc/splitbutton/StyleDoc.vue';
|
||||
import TemplateDoc from '@/doc/splitbutton/TemplateDoc.vue';
|
||||
import TextDoc from '@/doc/splitbutton/TextDoc.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
items: [
|
||||
docs: [
|
||||
{
|
||||
label: 'Update',
|
||||
icon: 'pi pi-refresh',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'success', summary: 'Updated', detail: 'Data Updated', life: 3000 });
|
||||
}
|
||||
id: 'import',
|
||||
label: 'Import',
|
||||
component: ImportDoc
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
icon: 'pi pi-times',
|
||||
command: () => {
|
||||
this.$toast.add({ severity: 'warn', summary: 'Delete', detail: 'Data Deleted', life: 3000 });
|
||||
}
|
||||
id: 'basic',
|
||||
label: 'Basic',
|
||||
component: BasicDoc
|
||||
},
|
||||
{
|
||||
label: 'Vue Website',
|
||||
icon: 'pi pi-external-link',
|
||||
command: () => {
|
||||
window.location.href = 'https://vuejs.org/';
|
||||
}
|
||||
},
|
||||
{ label: 'Upload', icon: 'pi pi-upload', to: '/fileupload' }
|
||||
],
|
||||
nestedItems: [
|
||||
{
|
||||
label: 'File',
|
||||
icon: 'pi pi-fw pi-file',
|
||||
items: [
|
||||
{
|
||||
label: 'New',
|
||||
icon: 'pi pi-fw pi-plus',
|
||||
items: [
|
||||
{
|
||||
label: 'Bookmark',
|
||||
icon: 'pi pi-fw pi-bookmark'
|
||||
},
|
||||
{
|
||||
label: 'Video',
|
||||
icon: 'pi pi-fw pi-video'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
icon: 'pi pi-fw pi-trash'
|
||||
},
|
||||
{
|
||||
separator: true
|
||||
},
|
||||
{
|
||||
label: 'Export',
|
||||
icon: 'pi pi-fw pi-external-link'
|
||||
}
|
||||
]
|
||||
id: 'severity',
|
||||
label: 'Severity',
|
||||
component: SeverityDoc
|
||||
},
|
||||
{
|
||||
label: 'Edit',
|
||||
icon: 'pi pi-fw pi-pencil',
|
||||
items: [
|
||||
{
|
||||
label: 'Left',
|
||||
icon: 'pi pi-fw pi-align-left'
|
||||
},
|
||||
{
|
||||
label: 'Right',
|
||||
icon: 'pi pi-fw pi-align-right'
|
||||
},
|
||||
{
|
||||
label: 'Center',
|
||||
icon: 'pi pi-fw pi-align-center'
|
||||
},
|
||||
{
|
||||
label: 'Justify',
|
||||
icon: 'pi pi-fw pi-align-justify'
|
||||
}
|
||||
]
|
||||
id: 'outlined',
|
||||
label: 'Outlined',
|
||||
component: OutlinedDoc
|
||||
},
|
||||
{
|
||||
label: 'Users',
|
||||
icon: 'pi pi-fw pi-user',
|
||||
items: [
|
||||
{
|
||||
label: 'New',
|
||||
icon: 'pi pi-fw pi-user-plus'
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
icon: 'pi pi-fw pi-user-minus'
|
||||
},
|
||||
{
|
||||
label: 'Search',
|
||||
icon: 'pi pi-fw pi-users',
|
||||
items: [
|
||||
{
|
||||
label: 'Filter',
|
||||
icon: 'pi pi-fw pi-filter',
|
||||
items: [
|
||||
{
|
||||
label: 'Print',
|
||||
icon: 'pi pi-fw pi-print'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
icon: 'pi pi-fw pi-bars',
|
||||
label: 'List'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
id: 'raised',
|
||||
label: 'Raised',
|
||||
component: RaisedDoc
|
||||
},
|
||||
{
|
||||
label: 'Events',
|
||||
icon: 'pi pi-fw pi-calendar',
|
||||
items: [
|
||||
{
|
||||
label: 'Edit',
|
||||
icon: 'pi pi-fw pi-pencil',
|
||||
items: [
|
||||
{
|
||||
label: 'Save',
|
||||
icon: 'pi pi-fw pi-calendar-plus'
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
icon: 'pi pi-fw pi-calendar-minus'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Archieve',
|
||||
icon: 'pi pi-fw pi-calendar-times',
|
||||
items: [
|
||||
{
|
||||
label: 'Remove',
|
||||
icon: 'pi pi-fw pi-calendar-minus'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
id: 'text',
|
||||
label: 'Text',
|
||||
component: TextDoc
|
||||
},
|
||||
{
|
||||
separator: true
|
||||
id: 'raisedtext',
|
||||
label: 'Raised Text',
|
||||
component: RaisedTextDoc
|
||||
},
|
||||
{
|
||||
label: 'Quit',
|
||||
icon: 'pi pi-fw pi-power-off'
|
||||
id: 'rounded',
|
||||
label: 'Rounded',
|
||||
component: RoundedDoc
|
||||
},
|
||||
{
|
||||
id: 'sizes',
|
||||
label: 'Sizes',
|
||||
component: SizesDoc
|
||||
},
|
||||
{
|
||||
id: 'template',
|
||||
label: 'Template',
|
||||
component: TemplateDoc
|
||||
},
|
||||
{
|
||||
id: 'disabled',
|
||||
label: 'Disabled',
|
||||
component: DisabledDoc
|
||||
},
|
||||
{
|
||||
id: 'style',
|
||||
label: 'Style',
|
||||
component: StyleDoc
|
||||
},
|
||||
{
|
||||
id: 'accessibility',
|
||||
label: 'Accessibility',
|
||||
component: AccessibilityDoc
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
save() {
|
||||
this.$toast.add({ severity: 'success', summary: 'Success', detail: 'Data Saved', life: 3000 });
|
||||
}
|
||||
},
|
||||
components: {
|
||||
SplitButtonDoc: SplitButtonDoc
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.p-splitbutton {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue