n2ref/coreui-layout 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

n2ref/coreui-layout

最新稳定版本:v1.0.1

Composer 安装命令:

composer require n2ref/coreui-layout

包简介

PHP framework for web applications

README 文档

README

Composer install

composer install n2ref/coreui-layout-php

Example usage

    $layout = new \CoreUI\Layout('layout-id');
    
    $layout->justify($layout::JASTIFY_START)
        ->align($layout::ALIGN_START)
        ->direction($layout::DIRECTION_ROW)
        ->wrap($layout::WRAP_WRAP)
        ->overflow($layout::OVERFLOW_AUTO)
        ->overflowX($layout::OVERFLOW_AUTO)
        ->overflowY($layout::OVERFLOW_AUTO)
        ->width(500)
        ->minWidth(400)
        ->maxWidth(600)
        ->height(200)
        ->minHeight(100)
        ->maxHeight(300)
        ->gap(15);
        
    $layout->addSize($layout::SIZE_SM)
        ->direction($layout::DIRECTION_ROW)
        ->justify($layout::JASTIFY_START)
        ->align($layout::ALIGN_END)
        ->wrap($layout::WRAP_WRAP);
       
    
    $item1 = $layout->addItem('id-sidebar')->content('Left')->align($layout::ALIGN_START);
    $item2 = $layout->addItem('id-content')->content('Center')->fill(true);
    $item3 = $layout->addItem('id-right_bar')
        ->content('Right')
        ->align($layout::ALIGN_STRETCH)
        ->order($layout::ORDER_0)
        ->overflow($layout::OVERFLOW_AUTO)
        ->overflowX($layout::OVERFLOW_AUTO)
        ->overflowY($layout::OVERFLOW_AUTO);
        
    $item3->addSize($layout::SIZE_XXL)
        ->align($layout::ALIGN_END)
        ->fill(true)
        ->order($layout::ORDER_2);
    
    echo json_encode($layout->toArray());

Output

{
    "component": "coreui.layout",
    "id": "layout-id",
    "justify": "start",
    "align": "start",
    "direction": "row",
    "wrap": "wrap",
    "overflow" : "auto",
    "overflowX" : "auto",
    "overflowY" : "auto",
    "width": 500,
    "minWidth": 400,
    "maxWidth": 600,
    "height": 200,
    "minHeight": 100,
    "maxHeight": 300,
    "gap": 15,
    "sizes": {
      "sm": {
        "direction": "row",
        "justify": "start",
        "align": "start",
        "wrap": "wrap"
      }
    },
    "items": [
      { "id": "id-sidebar", "content": "Left",   "align": "start" },
      { "id": "id-content", "content": "Center", "fill": true },
      {
        "id": "id-right_bar",
        "align": "stretch",
        "content": "Right",
        "order": 0,
        "overflow" : "auto",
        "overflowX" : "auto",
        "overflowY" : "auto",
        "sizes": {
          "xxl": {
            "align": "end",
            "fill": true,
            "order": 2,
            "col": 0
          }
        }
      }
    ]
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-13