Component Overview
Thinkrix PHP schema components live in src/Schema/Components and generate JSON Schema that Trix/vschema-ui can render.
Groups
NaiveUI: wrappers for Naive UI components such asButton,Input,DataTable, andCard.Business: composed business widgets such asCrudPage,OptForm,OneImgUp, andMarkdownEditor.Common: admin layout widgets such asHeaderNotification,HeaderCustomItem, andThemeButton.Custom: Trix custom components such asSvgIcon,Icon,Html, andVueECharts.
Basic Usage
php
use Thinkrix\Schema\Components\NaiveUI\Card;
use Thinkrix\Schema\Components\NaiveUI\Button;
use Thinkrix\Schema\Actions\CallAction;
return Card::make()
->props(['title' => 'Demo'])
->children([
Button::make()
->type('primary')
->text('Save')
->on('click', CallAction::make('$message.success', ['Saved'])),
])
->toArray();All components should finally output arrays through toArray() or business component build().