我想使用与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>发布于 2019-03-26 22:18:22
我想通了。显然,所有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>发布于 2020-11-10 01:54:21
对于那些正在寻找所有全局laravel nova vue组件列表的人,您可以在这里找到:
nova/resources/js/components.jshttps://stackoverflow.com/questions/55359255
复制相似问题