【发布时间】:2018-09-16 04:55:03
【问题描述】:
我的图标发生了奇怪的事情
<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>
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