wt-actions-bar.vue β
TIP
Π¦Π΅ΠΉ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ β Π½ΠΎΠ²Π° Π²Π΅ΡΡΡΡ wt-table-actions, Π· ΠΏΠ΅ΡΠ΅ΡΠΎΠ±Π»Π΅Π½ΠΈΠΌ ΡΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠΎΠΌ ΡΠ° Π½ΠΎΠ²ΠΈΠΌΠΈ ΠΌΠΎΠΆΠ»ΠΈΠ²ΠΎΡΡΡΠΌΠΈ. ΠΠ°ΠΌΡΡΡΡ wt-table-actions ΡΡΠ΅Π±Π° Π²ΠΈΠΊΠΎΡΠΈΡΡΠΎΠ²ΡΠ²Π°ΡΠΈ wt-actions-bar.
Specs β
Props
| Name | Required | Types | Default | Description | Example | Deprecated |
|---|---|---|---|---|---|---|
mode |
string |
'table' |
['table', 'section'] |
|||
size |
string |
- | Not implemented | |||
include |
IconActionValue[] |
() => [] |
Leave the default value for the mode only listed in includes prop | |||
exclude |
IconActionValue[] |
() => [] |
Leave the default values for the mode, except for those in exclude prop | |||
sort:order |
SortOrder |
null |
||||
disabled |
boolean |
false |
Built dynamically on disabled:[IconAction] pattern for all available IconActions. |
Slots
| Name | Scope | Description |
|---|---|---|
search-bar |
{ size<ComponentSize> } |
searchbar here |
switcher |
{ size<ComponentSize> } |
switcher here |
default |
{ size<ComponentSize> } |
custom actions here |
action |
{ action<IconAction>, size<ComponentSize>, onClick: () => emit('click:[action]') } |
May be useful to set complex component which draws the same wt-icon-action |
Events β
Events are built dynamically on click:[IconAction] pattern for all available IconActions.
Actions Order, depending on mode prop β
Code
ts
import { IconAction } from '../../enums';
export const tableActionsOrder: IconAction[] = [
IconAction.ADD,
IconAction.ADD_CONTACT,
IconAction.COPY,
IconAction.DOWNLOAD_PDF,
IconAction.DOWNLOAD,
IconAction.LOGOUT,
IconAction.UPLOAD,
IconAction.COLUMNS,
IconAction.VARIABLES,
IconAction.FILTERS,
IconAction.REFRESH,
IconAction.RESET_MEMBERS,
IconAction.DELETE,
IconAction.SORT,
];
// TODO
export const sectionActionsOrder: IconAction[] = tableActionsOrder;Example Table Actions Bar (All table actions) β
Code
vue
<template>
<wt-action-bar :include="tableActionsOrder" />
</template>
<script setup>
import { tableActionsOrder } from '__lib__/components/wt-action-bar/WtActionBarActionsOrder';
</script>
<style lang="scss" scoped>
.example-table-action-bar {
}
</style>Example Slotted Table Actions Bar β
searchbar slot default slot delete action slot
Code
vue
<template>
<wt-action-bar
:include="tableActionsOrder"
mode="table"
>
<template> default slot </template>
<template #search-bar> searchbar slot </template>
<template #delete> delete action slot </template>
</wt-action-bar>
</template>
<script setup>
import { tableActionsOrder } from '__lib__/components/wt-action-bar/WtActionBarActionsOrder';
</script>
<style lang="scss" scoped>
.example-table-action-bar {
}
</style>Example Slotted Table Actions Bar β
searchbar slot default slot delete action slot
Code
vue
<template>
<wt-action-bar
:include="tableActionsOrder"
mode="table"
>
<template> default slot </template>
<template #search-bar> searchbar slot </template>
<template #delete> delete action slot </template>
</wt-action-bar>
</template>
<script setup>
import { tableActionsOrder } from '__lib__/components/wt-action-bar/WtActionBarActionsOrder';
</script>
<style lang="scss" scoped>
.example-table-action-bar {
}
</style>Example Disabled Actions Bar β
Code
vue
<template>
<wt-action-bar
:include="tableActionsOrder"
disabled:add="true"
disabled:delete="true"
disabled:refresh="true"
mode="table"
/>
</template>
<script setup>
import { tableActionsOrder } from '__lib__/components/wt-action-bar/WtActionBarActionsOrder';
</script>
<style lang="scss" scoped>
.example-table-action-bar {
}
</style>