Skip to content

Commit a137948

Browse files
committed
fix: force adding table elements and figure element to the purger whitelist
1 parent 5d0a04b commit a137948

File tree

3 files changed

+32
-18
lines changed

3 files changed

+32
-18
lines changed

helper/mappings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,12 @@
418418
"table",
419419
"table-container",
420420
"tag",
421+
"tbody",
422+
"td",
421423
"text",
424+
"th",
425+
"thead",
426+
"tr",
422427
"v-checkbox"
423428
],
424429
"optional": [
@@ -643,6 +648,7 @@
643648
},
644649
"VImage": {
645650
"always": [
651+
"figure",
646652
"image",
647653
"img"
648654
],

src/components/compounds/Table/Table.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,13 @@ export default {
182182
'is-fullwidth': fullwidth,
183183
},
184184
]"
185-
style="position: relative;">
186-
<thead>
187-
<tr>
188-
<td v-if="checkable" />
185+
style="position: relative">
186+
<thead class="thead">
187+
<tr class="tr">
188+
<td class="td" v-if="checkable" />
189189
<td v-if="expandable" />
190190
<th
191+
class="th"
191192
v-for="(column, idx) in data.getColumns()"
192193
:key="idx"
193194
:class="columnClasses(column)"
@@ -204,7 +205,7 @@ export default {
204205
</th>
205206
</tr>
206207
</thead>
207-
<tbody>
208+
<tbody class="tbody">
208209
<tr v-if="searchable">
209210
<td v-if="checkable" />
210211
<td v-if="expandable" />
Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
22
/* eslint-disable no-undef -- Access to Benchie variable/function */
33
import { onBeforeMount, ref } from 'vue'
4-
import { checkBenchieSupport } from "../../../utils/functions"
4+
import { checkBenchieSupport } from '../../../utils/functions'
55
66
const hasBenchieSupport = checkBenchieSupport()
77
@@ -19,28 +19,35 @@ export default {
1919
dataSrc: {
2020
type: String,
2121
},
22-
customClass: String
22+
customClass: String,
2323
},
2424
setup(props) {
2525
const source = ref(props.src || props.dataSrc)
26-
onBeforeMount(async() => {
26+
onBeforeMount(async () => {
2727
if (props.dataSrc && hasBenchieSupport) {
2828
source.value = await t(props.dataSrc, $__CDN)
29-
}
29+
}
3030
})
3131
return { source }
32-
}
32+
},
3333
}
3434
</script>
3535

3636
<template>
37-
<figure class="image" :class="[
38-
size,
39-
radio,
40-
{
41-
'container': centered
42-
}
43-
]">
44-
<img class="img" v-bind="$attrs" :src="source" :data-src="dataSrc" :class="[customClass,{'is-rounded': rounded }]" />
37+
<figure
38+
class="image figure"
39+
:class="[
40+
size,
41+
radio,
42+
{
43+
'container': centered,
44+
},
45+
]">
46+
<img
47+
class="img"
48+
v-bind="$attrs"
49+
:src="source"
50+
:data-src="dataSrc"
51+
:class="[customClass, { 'is-rounded': rounded }]" />
4552
</figure>
4653
</template>

0 commit comments

Comments
 (0)