在我的Laravel 5.8 / vuejs 2.6应用程序中,我安装了https://github.com/samturrell/vue-breadcrumbs个组件。 我在resources / js / routes.js中添加了定义,但出现错误:
<template>
<div class="app_header_container">
<vue-breadcrumbs></vue-breadcrumbs>
</div>
</template>
<script>
import {bus} from '../../app';
import appMixin from '../../appMixin';
import Vue from 'vue';
import VueBreadcrumbs from 'vue-breadcrumbs';
// Vue.use(VueBreadcrumbs)
Vue.use(VueBreadcrumbs, {
template: '<nav class="breadcrumb" v-if="$breadcrumbs.length"> ' +
'<router-link class="breadcrumb-item" v-for="(crumb, key) in $breadcrumbs" :to="linkProp(crumb)" :key="key">{{ crumb | crumbText }}</router-link> ' +
'</nav>'
});
export default {
components: {
VueBreadcrumbs // Register your component
},
data: function () {
...
当我尝试在标头组件resources / js / components / BS4 / AppHeader.vue中使用此组件时:
library(magrittr)
df1 <- data.frame(stringsAsFactors = FALSE,
name = c("John Lennon", "Mick Jagger", "Ringo Starr", "Keith Richards"),
instrument = c("guitar", "vocals", "drums", "guitar"))
df2 <- data.frame(stringsAsFactors = FALSE,
name = c("John Lennon", "Ringo Starr", "George Harrison",
"Paul McCartney"),
beatles = c(1, 1, 1, 1))
df1 %>%
dplyr::left_join(y = df2,
by = "name") %>%
tidyr::replace_na(replace = list(beatles = 0))
#> name instrument beatles
#> 1 John Lennon guitar 1
#> 2 Mick Jagger vocals 0
#> 3 Ringo Starr drums 1
#> 4 Keith Richards guitar 0
是否有一些必须在定义中设置的参数
?