在新创建的子文件夹上渲染页面

问题描述 投票:0回答:1

各位程序员好,我需要一些建议,我哪里出了问题。似乎在我在页面目录上创建了一个新文件夹后,我似乎无法实时渲染页面,或者是否有可能,或者我应该滚动返回并将所有模板移回页面文件夹

**directory**
|_pages
    |_Accounting(new created folder)
       |_Journal.vue
       |_Cash Vouchers.vue
       |_CVPrint.vue
    |_Components
    |_Layouts
    |_Auth
|_dashboard.vue    

Web.php

Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
Route::get('/about', function () {
    return Inertia::render('About');
})->name('about');
Route::get('/settings', function () {
    return Inertia::render('Settings');
})->name('settings');
Route::get('/journal', function () {
    return Inertia::render('Accounting.Journal');
})->name('journal');
Route::get('/cvprint', function () {
    return Inertia::render('Accounting.CVPrint');
})->name('cvprint');
Route::get('/cashvoucher', function () {
    return Inertia::render('Accounting.CashVoucher');
})->name('cashvoucher');
});

侧边栏.vue

<li>
            <NavlinkCustom :href="route('cashvoucher')" class="flex items-center py-2 px-4  hover:bg-gray-950 hover:text-gray-100 rounded-md"
                    :active="$page.component==='CashVoucher'"
                >
                <i class="ri-money-dollar-circle-line"></i>
                <span class="text-sm">Cash Voucher</span>
            </NavlinkCustom>
        </li>
        <li>
            <NavlinkCustom :href="route('cvprint')" class="flex items-center py-2 px-4  hover:bg-gray-950 hover:text-gray-100 rounded-md"
                    :active="$page.component==='CVPrint'"
                >
                <i class="ri-currency-line"></i>
                <span class="text-sm">CV Printing</span>
            </NavlinkCustom>
        </li>
        <li>
            <NavlinkCustom :href="route('journal')" class="flex items-center py-2 px-4  hover:bg-gray-950 hover:text-gray-100 rounded-md"
                    :active="$page.component==='Journal'"
                >
                <i class="ri-currency-line"></i>
                <span class="text-sm">Journal Entry</span>
            </NavlinkCustom>
        </li>

那么我的错误是错误的,因为它用点(.)而不是(/)渲染

laravel vue.js hyperlink
1个回答
0
投票

尝试 Inertia::render('会计/期刊')

© www.soinside.com 2019 - 2024. All rights reserved.