2
こんにちはみんなは、単一のファイルテンプレートを使用してフィルター上のミックスインを使用しようと、私はいくつかのハードの時間に私はVue Jsシングルファイルテンプレートでミックスインを使用する方法は?
Unknown custom element: <side-bar-one> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
component.jsを取得しています
エラーを抱えているVueのJSとイムに新しいイム
Vue.component('sideBarOne', require('./component/sidebars/sideBarOne.vue'));
sideBarOne.vue
import { default as config } from '../../../config';
import { filters as filter } from '../../../mixins/filters';
export default {
mixins: [
filter,
],
mounted: function() {
}
}
フィルタ.jsファイル
import { default as config } from '../config';
module.exports = {
filters: {
useLGLogo(str) {
if(str) {
return config.LG_LOGO + str.replace(/\s+/g, '-').toUpperCase() + '.png';
}
},
useMDLogo(str) {
if(str) {
return config.MD_LOGO + str.replace(/\s+/g, '-').toUpperCase() + '.png';
}
},
useSMLogo(str) {
if(str) {
return config.SM_LOGO + str.replace(/\s+/g, '-').toUpperCase() + '.png';
}
},
}
};
作業作りました単一の名前で。 'import {filter as default} 'の代わりに' import filters'から ' –