图标停止在表格列内工作

问题描述 投票:0回答:1

我的偶像发生了奇怪的事情

    <b-table :data="myDir">
        <template slot-scope="props">
            <b-table-column>
                {{ props.row.icon }} <!-- Correct -->
                <i class="fas" :class="'fa-' + props.row.icon"></i> <!-- Wrong -->
                <b-icon :pack="props.row.iconPack" :icon="props.row.icon" :type="props.row.iconType"></b-icon>  <!-- Wrong -->
            </b-table-column>

enter image description here

myDir通过更新

        watch: {
            path: function () {
                this.getDir();
            }
        },

        mounted () {
            this.getDir();
        },

        methods: {
            getDir : function() {
                console.log("Loading " + this.path);
                axios
                    .get('?path=' + this.path + '&format=json')
                    .then(response => (this.myDir = response.data))
                    .catch(error => {
                        console.log(error)
                        });
            }
        }
vue.js axios font-awesome bulma buefy
1个回答
0
投票

我不知道为什么会这样,但确实如此

我使用的是FontAwesome的JavaScript版本。

<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>

当我切换到CSS版本时,事情开始起作用了

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" crossorigin="anonymous">
© www.soinside.com 2019 - 2024. All rights reserved.