承接 jey/livewire-styleable 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jey/livewire-styleable

Composer 安装命令:

composer require jey/livewire-styleable

包简介

A package for defining scoped styles in Livewire components (Scss support)

README 文档

README

Installing:

composer require jey/livewire-styleable

Using:

In Component class:

<?php

namespace App\View\Component;

use App\Models\Post;
use Jey\LivewireStyleable\HasStyle;
use Livewire\Component;

class LatestPosts extends Component
{

    use HasStyle;

    public function render()
    {
        return view('components.latest-posts', [
            'posts' => Post::published()
                ->latest()
                ->take(3)
                ->get(),
        ]);
    }
}

In Blade template (latest-posts.blade.php):

<div>
    <div class="row">
        @foreach($posts as $post)
            <div class="col-xs-1 col-md-3 col-lg-4 mb-3">
                <div class="card">
                    <img src="{{ $post->image_url }}" alt="" class="card-img">
                    <div class="card-body" style="">
                        {{ $post->description }}
                    </div>
                </div>
            </div>
        @endforeach
    </div>
</div>
<style scoped lang="scss">
    .card {
        border-radius: 1rem;
        overflow: hidden;
        $card-color: red;
        .card-body {
            color: $card-color;
        }
    }
</style>

Module import support (Non-Webpack packages)

<style scoped lang="scss">
    @module('LatestPosts')
</style>

统计信息

  • 总下载量: 33
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-03-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固