此问题是此处提供的 StackOverflow 答案的后续问题
如何在此 BootstrapVue 表的列标题中添加上标?
这是 BootstrapVue 表的原始代码。
这是向 BootstrapVue 表的列标题添加上标的答案。
{{ data.label }} 1
上面的答案对于原始代码来说效果很好。但是,如果原始键名 (age) 之间有空格和 % 字符 (%age new),则答案不起作用。这是当键名之间有空格时的代码。
在键名称之间添加这个新空格,相应的答案将变为
{{ data.label }} 1
我收到以下错误;
error Unexpected useless attribute on `` vue/no-useless-template-attributes error Unexpected useless attribute on `` vue/no-useless-template-attributes
如何修复这个错误?
我正在使用 vue v2.6 和 BootstrapVue。
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
您可以尝试使用字符串文字
或者只是用下划线替换空格,或者用驼峰式命名键