File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1+ import { setup } from '@storybook/vue3'
2+ import DsfrTag from '../DsfrTag/DsfrTag.vue'
13import DsfrTable from './DsfrTable.vue'
24import DsfrTableHeaders from './DsfrTableHeaders.vue'
35import DsfrTableCell from './DsfrTableCell.vue'
46
7+ setup ( app => {
8+ app . component ( 'DsfrTag' , DsfrTag ) // Composant utilisé dans les stories CelluleDeTableauAvecComposant et CelluleDeTableauComplexe
9+ } )
10+
511export default {
612 component : DsfrTableCell ,
713 title : 'Composants/Tableau/Cellule de tableau - DsfrTableCell' ,
@@ -16,7 +22,7 @@ export default {
1622 description : 'Contenu du champ. Peut être une string ou bien un objet' ,
1723 } ,
1824 onClickCell : {
19- action : 'Clicked on cell ' ,
25+ action : 'Clic sur l’étiquette ! ' ,
2026 description : 'Fonction pour montrer le clic sur une cellule (Ici seulement pour "Cellule de tableau complexe")' ,
2127 } ,
2228 } ,
@@ -70,7 +76,6 @@ export const CelluleDeTableauSimple = (args) => ({
7076 </DsfrTable>
7177 ` ,
7278
73-
7479} )
7580CelluleDeTableauSimple . args = {
7681 title,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default defineComponent({
1919 isObject () {
2020 return typeof this .field === ' object' && this .field !== null
2121 },
22- isComponent () {
22+ component () {
2323 return (this .isObject && this .field .component ) ? this .field .component : false
2424 },
2525 isString () {
@@ -32,8 +32,8 @@ export default defineComponent({
3232<template >
3333 <td v-bind =" cellAttrs" >
3434 <component
35- :is =" isComponent "
36- v-if =" isComponent "
35+ :is =" component "
36+ v-if =" component "
3737 v-bind =" field"
3838 >
3939 {{ field.text }}
You can’t perform that action at this time.
0 commit comments