webakula/soa-extend

扩展 Owl Admin

dev-master 2018-02-22 13:12 UTC

This package is auto-updated.

Last update: 2024-09-07 20:27:42 UTC


README

'base_table' => [
    'attributes' => [
        'class' => 'table table-bordered table-striped'
    ],
    'disable_row_delete' => false,//необязательно, если true, то строки из таблицы удалять нельзя
    'data' => [
        //Any data-attributes. Can use data-* in 'attributes' section instead
    ],
    'style' => [
        //Any inline style key-pairs (e.g. 'color'=>'#fff')
    ],
],
'timetable' => [
    'extends' => 'base_table', //Имя таблицы, которую нужно отнаследовать
    //'exclude' => true, //array of field names from base table, if ===TRUE then all fields will be escluded, only attributes will be used
    'cols' => [
        'is_holiday' => [
            'type' => 'checkbox',
            'title' => 'Выходной день',
            'default_value' => 1,
            'options' => [
                'style' => [], //Список css-свойств, key=>value
                'data' => ['foo' => 'bar'], //Список data-атрибутов, key=>value,
                'attributes' => ['class' => 'fii'], //Список произвольных HTML-атрибутов, key-value
            ]
        ],
        'day_title' => [
            'type' => 'text',
            'title' => 'Название',
        ],
        'day_description' => [
            'type' => 'text',
            'title' => 'Описание'
        ],

// 'test_select' => [ // 'type' => 'select', // 'title' => 'Select', // 'values' => \App\Models\Store::class, //可以传入模型类 // // 'values'=>[1=>'是', 2=>'否'], //或者值数组 // 'default_option' => true, //如果未选择任何内容,是否显示"选择"选项,默认为true // 'scopes' => ['visible'], //如果指定了模型,则使用scopes // 'key' => 'id', //键,option value="" // 'value' => 'title' //显示的选项值 // ] //scopes, key, value 仅在指定模型作为数据源时使用 ] ]