🌐 AI搜索 & 代理 主页
Skip to content

Commit b68dd4e

Browse files
authored
Update mixin-tbody-row.js
1 parent 14bebd0 commit b68dd4e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/components/table/helpers/mixin-tbody-row.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,19 @@ export default {
185185
// Add in rowSelected scope property if selectable rows supported
186186
slotScope.rowSelected = this.isRowSelected(rowIndex)
187187
}
188-
let $childNodes = this.normalizeSlot([`[${key}]`, '[]'], slotScope) || toString(formatted)
188+
// The new `v-slot` syntax doesn't like a slot name starting with
189+
// a square bracket and if using in-document HTML templates, the
190+
// v-slot attributes are lower-cased by the browser.
191+
const slotNames = [
192+
`CELL[${key}]`,
193+
`cell[${key.toLowerCase()}]`,
194+
`[${key}]`,
195+
`[${key.toLowerCase()}]`
196+
'CELL[]',
197+
'cell[]',
198+
'[]'
199+
]
200+
let $childNodes = this.normalizeSlot(slotNames, slotScope) || toString(formatted)
189201
if (this.isStacked) {
190202
// We wrap in a DIV to ensure rendered as a single cell when visually stacked!
191203
$childNodes = [h('div', {}, [$childNodes])]

0 commit comments

Comments
 (0)