我想使用与Laravel Nova在加载组件时使用的加载器相同的加载器。我无法编译它。它永远不会识别从何处加载LoadingCard组件。任何帮助将不胜感激。
<template>
<div>
<heading class="mb-6">Tax Calculator</heading>
<loading-card :loading="loading" class="card relative overflow-hidden w-1/3">
<div v-if="countries.length">
<!--Make form-->
</div>
</loading-card>
</div>
</template>
<script>
import LoadingCard from 'laravel-nova'
export default {
mounted() {
let vue = this;
Nova.request().get('/nova-vendor/tax-calculator/mount')
.then(response => {
vue.countries = response.data.countries;
vue.states = response.data.states;
});
},
}
</script>
<style>
/* Scoped Styles */
</style>
答案 0 :(得分:1)
弄清楚了。显然,所有Nova内置组件都在全球范围内可用。没意识到这一点。我需要做的只是删除import语句。我将代码修改如下:
<template>
<div>
<heading class="mb-6">Tax Calculator</heading>
<loading-card :loading="loading" class="card relative overflow-hidden w-1/3">
<!--Make form-->
</loading-card>
</div>
</template>
<script>
export default {
mounted() {
let vue = this;
Nova.request().get('/nova-vendor/tax-calculator/mount')
.then(response => {
vue.countries = response.data.countries;
vue.states = response.data.states;
});
},
}
</script>
<style>
/* Scoped Styles */
</style>
答案 1 :(得分:1)
对于那些寻找所有全球laravel nova vue组件列表的人,您可以在这里找到:
nova/resources/js/components.js