Add support for Buefy 0.9.x
or: add hacks to continue supporting Buefy 0.8.x ..depending on your perspective
This commit is contained in:
parent
7ccd9ad896
commit
6fbc79fe5e
17 changed files with 753 additions and 119 deletions
|
@ -20,7 +20,9 @@
|
|||
% endif
|
||||
>
|
||||
|
||||
% if buefy_0_8:
|
||||
<template slot-scope="props">
|
||||
% endif
|
||||
% for i, column in enumerate(grid_columns):
|
||||
<b-table-column field="${column['field']}"
|
||||
% if not empty_labels:
|
||||
|
@ -28,6 +30,9 @@
|
|||
% elif i > 0:
|
||||
label=" "
|
||||
% endif
|
||||
% if not buefy_0_8:
|
||||
v-slot="props"
|
||||
% endif
|
||||
${'sortable' if column['sortable'] else ''}>
|
||||
% if empty_labels and i == 0:
|
||||
<template slot="header" slot-scope="{ column }"></template>
|
||||
|
@ -54,7 +59,12 @@
|
|||
% endfor
|
||||
|
||||
% if grid.main_actions or grid.more_actions:
|
||||
<b-table-column field="actions" label="Actions">
|
||||
<b-table-column field="actions"
|
||||
label="Actions"
|
||||
% if not buefy_0_8:
|
||||
v-slot="props"
|
||||
% endif
|
||||
>
|
||||
% for action in grid.main_actions:
|
||||
<a :href="props.row._action_url_${action.key}"
|
||||
% if action.link_class:
|
||||
|
@ -73,7 +83,9 @@
|
|||
% endfor
|
||||
</b-table-column>
|
||||
% endif
|
||||
% if buefy_0_8:
|
||||
</template>
|
||||
% endif
|
||||
|
||||
<template slot="empty">
|
||||
<div class="content has-text-grey has-text-centered">
|
||||
|
|
|
@ -218,10 +218,15 @@
|
|||
:hoverable="true"
|
||||
:narrowed="true">
|
||||
|
||||
% if buefy_0_8:
|
||||
<template slot-scope="props">
|
||||
% endif
|
||||
% for column in grid_columns:
|
||||
<b-table-column field="${column['field']}"
|
||||
label="${column['label']}"
|
||||
% if not buefy_0_8:
|
||||
v-slot="props"
|
||||
% endif
|
||||
:sortable="${json.dumps(column['sortable'])}"
|
||||
% if grid.is_searchable(column['field']):
|
||||
searchable
|
||||
|
@ -242,7 +247,12 @@
|
|||
% endfor
|
||||
|
||||
% if grid.main_actions or grid.more_actions:
|
||||
<b-table-column field="actions" label="Actions">
|
||||
<b-table-column field="actions"
|
||||
label="Actions"
|
||||
% if not buefy_0_8:
|
||||
v-slot="props"
|
||||
% endif
|
||||
>
|
||||
## TODO: we do not currently differentiate for "main vs. more"
|
||||
## here, but ideally we would tuck "more" away in a drawer etc.
|
||||
% for action in grid.main_actions + grid.more_actions:
|
||||
|
@ -260,7 +270,9 @@
|
|||
% endfor
|
||||
</b-table-column>
|
||||
% endif
|
||||
% if buefy_0_8:
|
||||
</template>
|
||||
% endif
|
||||
|
||||
<template #empty>
|
||||
<section class="section">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue