简体   繁体   English

laravel刀片模板和vue.js点组合布局

[英]laravel blade template and vue.js spot combination for layout

up untill now i used the blade template for making my master layout and i used to make some thing like this code in my layout.blade.php 直到现在,我一直使用刀片模板来制作我的主版面,并且我以前在我的layout.blade.php中制作了类似此代码的内容

<div class="m-grid__item m-grid__item--fluid m-wrapper">
        @yield('content')
    </div>

and some thing like this in every other file that i wanted 还有我想要的其他所有文件中的类似内容

@extends('layouts.app')

@section('content')

<div class="m-subheader ">


    <div class="d-flex align-items-center">
...

and i made a layout for my admin panel for example but now that i want to use vue.js i want to know how can i make a master template and include other sections and parts and the more important question is should i do it at all or no ? 例如,我为管理面板做了一个布局,但是现在我想使用vue.js,我想知道如何制作主模板并包括其他部分和部分,更重要的问题是我是否应该这样做或者没有 ?

You can use Vue JS components anywhere in your blade layouts. 您可以在刀片布局中的任何位置使用Vue JS组件。

There is a good example of how to integrate Vue JS components into your Laravel frontend in the Laravel documentation: Laravel文档中有一个很好的示例,说明了如何将Vue JS组件集成到您的Laravel前端中:

https://laravel.com/docs/5.8/frontend https://laravel.com/docs/5.8/frontend

Read the section titled: "Writing Vue Components" 阅读标题为“编写Vue组件”的部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM