|
41 | 41 | :sort-by="[{ key: 'name', order: 'asc' }]" |
42 | 42 | > |
43 | 43 | <template #[`item.name`]="{ item }"> |
44 | | - <span> |
45 | | - <span |
46 | | - :id="`props-${sectionId ? `${sectionId}-${item.raw.name}` : item.raw.name}`" |
47 | | - class="name-item text-mono ml-n2" |
48 | | - > |
49 | | - <span class="text-primary">#</span> |
50 | | - <a |
51 | | - class="text-primary" |
52 | | - :class="classes.appLink" |
53 | | - :href="`#props-${sectionId ? `${sectionId}-${item.raw.name}` : item.raw.name}`" |
54 | | - >{{ item.raw.name }}</a> |
55 | | - </span> |
56 | | - </span> |
| 44 | + <div |
| 45 | + :id="slugifyString(sectionId, item.raw.name)" |
| 46 | + class="name-item text-mono ml-n2" |
| 47 | + > |
| 48 | + <span class="text-primary">#</span> |
| 49 | + <a |
| 50 | + class="text-primary" |
| 51 | + :class="classes.appLink" |
| 52 | + :href="`#${slugifyString(sectionId, item.raw.name)}`" |
| 53 | + >{{ item.raw.name }}</a> |
| 54 | + </div> |
57 | 55 | </template> |
58 | 56 |
|
59 | 57 | <template #[`item.type`]="{ item }"> |
60 | | - <span class="text-success"> |
| 58 | + <div class="text-success"> |
61 | 59 | {{ item.raw.type }} |
62 | | - </span> |
| 60 | + </div> |
63 | 61 | </template> |
64 | 62 |
|
65 | 63 | <template #[`item.default`]="{ item }"> |
66 | | - <span |
| 64 | + <div |
67 | 65 | class="text-accent" |
68 | 66 | v-html="item.raw.default" |
69 | | - ></span> |
| 67 | + ></div> |
70 | 68 | </template> |
71 | 69 |
|
72 | 70 | <template #[`item.desc`]="{ item }"> |
73 | | - <span v-html="item.raw.desc"></span> |
| 71 | + <div v-html="item.raw.desc"></div> |
74 | 72 | </template> |
75 | 73 | </v-data-table> |
76 | 74 | </v-card> |
|
80 | 78 |
|
81 | 79 | <script setup> |
82 | 80 | import { inject } from 'vue'; |
| 81 | +import { useSlugifyString } from '@/documentation/composables/slugifyStringHelper'; |
83 | 82 |
|
84 | 83 |
|
85 | 84 | const classes = inject('classes'); |
@@ -112,13 +111,22 @@ defineProps({ |
112 | 111 | }); |
113 | 112 |
|
114 | 113 | const search = ref(''); |
| 114 | +
|
| 115 | +function slugifyString(sectionId, name) { |
| 116 | + const id = sectionId ? `${sectionId}-${name}` : name; |
| 117 | +
|
| 118 | + return useSlugifyString(id); |
| 119 | +} |
115 | 120 | </script> |
116 | 121 |
|
117 | 122 | <style lang="scss"> |
118 | 123 | .features-table { |
119 | 124 | td { |
120 | 125 | line-height: 2rem !important; |
121 | | - padding: 0.5rem 16px !important; |
| 126 | +
|
| 127 | + > div { |
| 128 | + padding: 0.5rem 0 !important; |
| 129 | + } |
122 | 130 | } |
123 | 131 | } |
124 | 132 | </style> |
0 commit comments