bitrix-ui
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBitrix UI Library
Bitrix UI库
Modern admin and public interfaces use JS extensions from and modules. Load via in PHP, import classes in modular JS.
uimainExtension::load()现代后台界面和公共界面使用来自和模块的JS扩展。在PHP中通过加载,在模块化JS中导入类。
uimainExtension::load()Choosing a Component
组件选择
| Scenario | Extension |
|---|---|
| Full modern dialog (title, content, custom layout) | |
| Simple confirm / alert / message box | |
| Context/dropdown menu (modern) | |
| Popup with custom positioning, legacy | |
| Slide-over panel (CRM-style) | |
| Toast notifications | |
| Alerts/banners (inline UI alerts) | |
| Form inputs (modern) | |
| Pick users/departments/custom entities | |
| Data table: columns, sorting, paging, row actions | PHP component |
| Search + filter fields with presets above a list | PHP component |
| Icons | |
| Loading skeleton | |
| Hints/tooltips | |
| Lottie animations | |
| Keyboard focus, focus trap, screen-reader live region | |
| 使用场景 | 扩展组件 |
|---|---|
| 完整的现代对话框(标题、内容、自定义布局) | |
| 简单确认/警告/消息框 | |
| 上下文/下拉菜单(现代版) | |
| 支持自定义定位的弹出层(旧版) | |
| 滑入式面板(CRM风格) | |
| 提示通知框 | |
| 警告/横幅(内联UI提示) | |
| 表单输入组件(现代版) | |
| 选择用户/部门/自定义实体 | |
| 数据表格:列、排序、分页、行操作 | PHP组件 |
| 列表上方的搜索+筛选字段(含预设) | PHP组件 |
| 图标 | |
| 加载骨架屏 | |
| 提示/工具提示 | |
| Lottie动画 | |
| 键盘焦点、焦点陷阱、屏幕阅读器实时区域 | |
ui.system.dialog
vs ui.dialogs.messagebox
ui.system.dialogui.dialogs.messageboxui.system.dialog
vs ui.dialogs.messagebox
ui.system.dialogui.dialogs.messagebox- — modern system
ui.system.dialogcomponent (structured dialog UI for new admin screens).Dialog - — classic
ui.dialogs.messageboxhelpers (MessageBox,confirm,alert) for quick confirmations. Use MessageBox for simple prompts, Dialog for richer UI.show
There is no extension — use .
ui.system.alertui.alerts- —— 现代系统
ui.system.dialog组件(为新后台页面设计的结构化对话框UI)。Dialog - —— 经典
ui.dialogs.messagebox辅助工具(MessageBox、confirm、alert),用于快速确认操作。简单提示用MessageBox,复杂UI用Dialog。show
不存在**扩展,请使用**。
ui.system.alertui.alertsLoading Pattern
加载方式
php
\Bitrix\Main\UI\Extension::load(['ui.system.dialog', 'ui.alerts', 'ui.notification']);javascript
import { Dialog } from 'ui.system.dialog';
import { MessageBox } from 'ui.dialogs.messagebox';
import { Alert, AlertColor } from 'ui.alerts';
// ui.notification is non-modular — use the global BX.UI.Notification.CenterLazy-load in JS when needed: .
Runtime.loadExtension('ui.entity-selector').then((exports) => { ... })php
\Bitrix\Main\UI\Extension::load(['ui.system.dialog', 'ui.alerts', 'ui.notification']);javascript
import { Dialog } from 'ui.system.dialog';
import { MessageBox } from 'ui.dialogs.messagebox';
import { Alert, AlertColor } from 'ui.alerts';
// ui.notification为非模块化组件 —— 使用全局对象BX.UI.Notification.Center按需延迟加载JS扩展:。
Runtime.loadExtension('ui.entity-selector').then((exports) => { ... })System Dialog / Message Box / Alerts
系统对话框/消息框/警告组件
javascript
import { Dialog } from 'ui.system.dialog';
new Dialog({ title: 'Settings', content: contentNode /* HTMLElement */, rightButtons: [...] }).show();
// other options: subtitle, hasCloseButton, hasOverlay, closeByEsc, closeByClickOutside, width, background
import { MessageBox } from 'ui.dialogs.messagebox';
MessageBox.confirm('Delete item?', () => { /* on confirm */ });
MessageBox.alert('Done');
import { Alert, AlertColor } from 'ui.alerts';
const alert = new Alert({ text: 'Saved', color: AlertColor.SUCCESS });javascript
import { Dialog } from 'ui.system.dialog';
new Dialog({ title: '设置', content: contentNode /* HTMLElement */, rightButtons: [...] }).show();
// 其他配置项:subtitle、hasCloseButton、hasOverlay、closeByEsc、closeByClickOutside、width、background
import { MessageBox } from 'ui.dialogs.messagebox';
MessageBox.confirm('确定删除该项目?', () => { /* 确认后的操作 */ });
MessageBox.alert('操作完成');
import { Alert, AlertColor } from 'ui.alerts';
const alert = new Alert({ text: '已保存', color: AlertColor.SUCCESS });Popup (legacy/base) and Side Panel
弹出层(旧版/基础版)和侧边面板
javascript
import { Popup } from 'main.popup';
new Popup({ id: 'my-popup', content: 'Saved', closeIcon: true }).show();
// main.sidepanel:
BX.SidePanel.Instance.open('/local/admin/custom-page.php', { width: 800, cacheable: false });javascript
import { Popup } from 'main.popup';
new Popup({ id: 'my-popup', content: '已保存', closeIcon: true }).show();
// main.sidepanel用法:
BX.SidePanel.Instance.open('/local/admin/custom-page.php', { width: 800, cacheable: false });Notifications (toasts)
提示通知(Toast)
Extension (global API, no ES exports):
ui.notificationjavascript
BX.UI.Notification.Center.notify({ content: 'Saved', autoHide: true, autoHideDelay: 8000, position: 'top-right' });Do not confuse with — a separate extension (, in ) for cross-tab/desktop notifications with categories and buttons, not for simple toasts.
ui.notification-managerNotificationNotifierBX.UI.NotificationManager扩展组件(全局API,无ES导出):
ui.notificationjavascript
BX.UI.Notification.Center.notify({ content: '已保存', autoHide: true, autoHideDelay: 8000, position: 'top-right' });请勿与混淆——这是一个独立扩展(中的、),用于跨标签页/桌面通知,支持分类和按钮,不适用于简单Toast提示。
ui.notification-managerBX.UI.NotificationManagerNotificationNotifierEntity Selector (ui.entity-selector
)
ui.entity-selector实体选择器(ui.entity-selector
)
ui.entity-selectorTwo widgets: (popup picker) and (field showing selected items as tags). Items are identified by the pair + ; minimal local item: .
DialogTagSelectorentityIdid{ id, entityId, title }javascript
import { Dialog, TagSelector } from 'ui.entity-selector';
const dialog = new Dialog({
targetNode: button, // must be an existing DOM node
context: 'MY_MODULE_RESPONSIBLE', // separate context per form — recent items don't mix
multiple: false,
enableSearch: true,
entities: [{ id: 'user' }, { id: 'department' }], // server-side load via PHP providers
events: { 'Item:onSelect': (e) => { const { item } = e.getData(); } },
});
button.addEventListener('click', () => dialog.show());TagSelectordialogOptionsDialogpreselectedItems: [['user', 1]]selector.renderTo(container)Provider entity ids come from installed modules — each registers them in its under the key (e.g. from iblock, / from catalog). Bitrix24 modules (intranet/socialnetwork/im) add , , , , etc. Check the target module's for the exact id before using it.
.settings.phpui.entity-selectoriblock-elementproductstoreuserdepartmentprojectmeta-userim-chat.settings.phpCustom provider — PHP class extending (implement — must check rights, ; optionally , ), registered in module :
Bitrix\UI\EntitySelector\BaseProviderisAvailable()getItems()fillDialog()doSearch().settings.phpphp
'ui.entity-selector' => [
'value' => [
'entities' => [[
'entityId' => 'project',
'provider' => ['moduleId' => 'my.module', 'className' => ProjectProvider::class],
]],
],
'readonly' => true,
],Rules: in JS must equal the registered ; / only work when a PHP provider is registered and available.
entities[].identityIddynamicLoaddynamicSearch包含两个组件:(弹出选择器)和(以标签形式展示已选项目的字段)。项目通过 + 的组合标识;最简本地项目格式:。
DialogTagSelectorentityIdid{ id, entityId, title }javascript
import { Dialog, TagSelector } from 'ui.entity-selector';
const dialog = new Dialog({
targetNode: button, // 必须是已存在的DOM节点
context: 'MY_MODULE_RESPONSIBLE', // 每个表单使用独立上下文——避免最近选择项混淆
multiple: false,
enableSearch: true,
entities: [{ id: 'user' }, { id: 'department' }], // 通过PHP提供者从服务端加载
events: { 'Item:onSelect': (e) => { const { item } = e.getData(); } },
});
button.addEventListener('click', () => dialog.show());关联对话框的:传入(与相同的配置项);从服务端加载已选项目;通过渲染。
TagSelectordialogOptionsDialogpreselectedItems: [['user', 1]]selector.renderTo(container)提供者实体ID来自已安装的模块——每个模块会在其的键下注册实体ID(例如iblock模块的,catalog模块的/)。Bitrix24模块(intranet/socialnetwork/im)会添加、、、、等。使用前请查看目标模块的获取准确ID。
.settings.phpui.entity-selectoriblock-elementproductstoreuserdepartmentprojectmeta-userim-chat.settings.php自定义提供者——继承的PHP类(实现——必须检查权限,;可选实现、),在模块中注册:
Bitrix\UI\EntitySelector\BaseProviderisAvailable()getItems()fillDialog()doSearch().settings.phpphp
'ui.entity-selector' => [
'value' => [
'entities' => [[
'entityId' => 'project',
'provider' => ['moduleId' => 'my.module', 'className' => ProjectProvider::class],
]],
],
'readonly' => true,
],规则:JS中的必须与注册的一致;仅当PHP提供者已注册且可用时, / 才能生效。
entities[].identityIddynamicLoaddynamicSearchGrid and Filter (main.ui.grid
/ main.ui.filter
)
main.ui.gridmain.ui.filter表格与筛选器(main.ui.grid
/ main.ui.filter
)
main.ui.gridmain.ui.filterPHP components for admin-style lists. They render UI and store user settings only — your server code fetches, filters, sorts and limits the data before . To link filter with grid, pass the same id to and .
IncludeComponent()FILTER_IDGRID_IDphp
use Bitrix\Main\UI\Filter\Options as FilterOptions;
use Bitrix\Main\Grid\Options as GridOptions;
$gridId = 'orders_grid';
$filterFields = [
['id' => 'FIND', 'name' => 'Search'],
['id' => 'STATUS', 'name' => 'Status', 'type' => 'list', 'items' => ['' => 'Any', 'new' => 'New']],
];
$filter = (new FilterOptions($gridId))->getFilter($filterFields); // user values
$sorting = (new GridOptions($gridId))->getSorting(['sort' => ['ID' => 'desc']]);
// build $ormFilter from $filter, run query with $sorting['sort'], build $rows
$APPLICATION->IncludeComponent('bitrix:main.ui.filter', '', [
'FILTER_ID' => $gridId, 'GRID_ID' => $gridId, 'FILTER' => $filterFields, 'ENABLE_LABEL' => true,
]);
$APPLICATION->IncludeComponent('bitrix:main.ui.grid', '', [
'GRID_ID' => $gridId,
'COLUMNS' => [['id' => 'ID', 'name' => 'ID', 'sort' => 'ID', 'default' => true]],
'ROWS' => $rows, // each: ['id' => 42, 'data' => [...], 'actions' => [...]]
'SORT' => $sorting['sort'], 'ALLOW_SORT' => true,
'AJAX_MODE' => 'Y', 'AJAX_OPTION_JUMP' => 'N', 'AJAX_OPTION_HISTORY' => 'N',
]);- Filter field types: ,
string,textarea(multiple vialist),params.multiple = 'Y',number(datefor datetime; hide subtypes viatime => true+exclude),Bitrix\Main\UI\Filter\DateType::*,custom_date(dialog options inentity_selector;params.dialogOptionswhen several entity types share one field). Preferparams.addEntityIdToResult = 'Y'over legacyentity_selector/dest_selectorin new UI. Ranges return suffixed keys:custom_entity,_from,_to,_datesel._numsel - Presets: . Settings are stored by
FILTER_PRESETS => ['key' => ['name' => ..., 'fields' => [...], 'default' => true]]/FILTER_ID— changing the id loses saved user presets/columns.GRID_ID - Pagination: in
Bitrix\Main\UI\PageNavigation+NAV_OBJECT; applyTOTAL_ROWS_COUNTto the query yourself. Pass$nav->getLimit()/getOffset()/PAGE_SIZES/SHOW_PAGESIZEwhen the list is paged.SHOW_PAGINATION - Columns: use in new code (
COLUMNSis compatibility-only).HEADERSdisables column/row sorting. Row HTML goes intoROW_LAYOUT— escape user data withROWS[]['columns'].HtmlFilter::encode() - Group actions: +
ACTION_PANEL/SHOW_ROW_CHECKBOXES/SHOW_ACTION_PANEL. Re-check rights server-side.SHOW_SELECTED_COUNTER - For module-level grids with a subclass, pass
Bitrix\Main\Grid\Grid(fromComponentParams::get($grid)) as component params. A dedicatedBitrix\Main\Grid\Component\ComponentParams+ provider is optional;Bitrix\Main\Filter\Filteris enough for a plain component page.FilterOptions::getFilter()
用于后台风格列表的PHP组件。它们仅负责渲染UI和存储用户设置——服务端代码需在之前完成数据的获取、筛选、排序和分页限制。要关联筛选器和表格,需为和传入相同的ID。
IncludeComponent()FILTER_IDGRID_IDphp
use Bitrix\Main\UI\Filter\Options as FilterOptions;
use Bitrix\Main\Grid\Options as GridOptions;
$gridId = 'orders_grid';
$filterFields = [
['id' => 'FIND', 'name' => '搜索'],
['id' => 'STATUS', 'name' => '状态', 'type' => 'list', 'items' => ['' => '全部', 'new' => '新建']],
];
$filter = (new FilterOptions($gridId))->getFilter($filterFields); // 用户输入的筛选值
$sorting = (new GridOptions($gridId))->getSorting(['sort' => ['ID' => 'desc']]);
// 根据$filter构建$ormFilter,结合$sorting['sort']执行查询,构建$rows
$APPLICATION->IncludeComponent('bitrix:main.ui.filter', '', [
'FILTER_ID' => $gridId, 'GRID_ID' => $gridId, 'FILTER' => $filterFields, 'ENABLE_LABEL' => true,
]);
$APPLICATION->IncludeComponent('bitrix:main.ui.grid', '', [
'GRID_ID' => $gridId,
'COLUMNS' => [['id' => 'ID', 'name' => 'ID', 'sort' => 'ID', 'default' => true]],
'ROWS' => $rows, // 每条数据格式:['id' => 42, 'data' => [...], 'actions' => [...]]
'SORT' => $sorting['sort'], 'ALLOW_SORT' => true,
'AJAX_MODE' => 'Y', 'AJAX_OPTION_JUMP' => 'N', 'AJAX_OPTION_HISTORY' => 'N',
]);- 筛选器字段类型:、
string、textarea(通过list支持多选)、params.multiple = 'Y'、number(date支持日期时间;通过time => true+exclude隐藏子类型)、Bitrix\Main\UI\Filter\DateType::*、custom_date(对话框配置项在entity_selector中;当多个实体类型共享一个字段时,设置params.dialogOptions)。新UI中优先使用params.addEntityIdToResult = 'Y',而非旧版的entity_selector/dest_selector。范围筛选会返回带后缀的键:custom_entity、_from、_to、_datesel。_numsel - 预设:。设置信息通过
FILTER_PRESETS => ['key' => ['name' => ..., 'fields' => [...], 'default' => true]]/FILTER_ID存储——修改ID会导致用户保存的预设/列配置丢失。GRID_ID - 分页:在中使用
NAV_OBJECT+Bitrix\Main\UI\PageNavigation;需自行将TOTAL_ROWS_COUNT应用到查询中。当列表支持分页时,传入$nav->getLimit()/getOffset()/PAGE_SIZES/SHOW_PAGESIZE。SHOW_PAGINATION - 列:新代码中使用(
COLUMNS仅用于兼容)。HEADERS会禁用列/行排序。行HTML需放入ROW_LAYOUT中——使用ROWS[]['columns']转义用户数据。HtmlFilter::encode() - 批量操作:+
ACTION_PANEL/SHOW_ROW_CHECKBOXES/SHOW_ACTION_PANEL。服务端需重新检查权限。SHOW_SELECTED_COUNTER - 对于使用子类的模块级表格,传入
Bitrix\Main\Grid\Grid(来自ComponentParams::get($grid))作为组件参数。专用的Bitrix\Main\Grid\Component\ComponentParams+ 提供者为可选;普通组件页面使用Bitrix\Main\Filter\Filter即可。FilterOptions::getFilter()
Lottie (ui.lottie
)
ui.lottieLottie动画(ui.lottie
)
ui.lottieBased on Lottie 5.13 ( or global ):
import { Lottie } from 'ui.lottie'BX.UI.Lottiejavascript
const animation = BX.UI.Lottie.loadAnimation({
container: node, // must exist in DOM
path: '/local/assets/loader.json', // or animationData: {...} — pass one source
renderer: 'svg', loop: true, autoplay: true,
});Returns an : , , , , , , , , (call on teardown). Optional lets you call later. Events via .
AnimationItemplay()stop()pause()togglePause()setSpeed()setDirection()goToAndStop()goToAndPlay()destroy()nameBX.UI.Lottie.play(name)animation.addEventListener('complete' | 'loopComplete' | 'data_ready' | 'data_failed' | 'DOMLoaded' | 'destroy', ...)基于Lottie 5.13版本(可通过导入,或使用全局对象):
import { Lottie } from 'ui.lottie'BX.UI.Lottiejavascript
const animation = BX.UI.Lottie.loadAnimation({
container: node, // 必须已存在于DOM中
path: '/local/assets/loader.json', // 或传入animationData: {...} —— 二选一
renderer: 'svg', loop: true, autoplay: true,
});返回对象,支持方法:、、、、、、、、(组件销毁时需调用)。可选的参数可用于后续调用。通过监听事件。
AnimationItemplay()stop()pause()togglePause()setSpeed()setDirection()goToAndStop()goToAndPlay()destroy()nameBX.UI.Lottie.play(name)animation.addEventListener('complete' | 'loopComplete' | 'data_ready' | 'data_failed' | 'DOMLoaded' | 'destroy', ...)Accessibility (ui.a11y
)
ui.a11y无障碍访问(ui.a11y
)
ui.a11yUse when a dialog, menu, or live UI must keep keyboard focus or announce changes to a screen reader. Load ( runs on import).
ui.a11yFocusMonitor.initialize()| Need | Class |
|---|---|
| Restore focus after close / DOM redraw | |
| Move focus to the next/previous focusable node | |
| Trap Tab inside a modal/dialog | |
| Arrow / Home / End keys inside a widget | |
| Keyboard vs mouse vs touch vs stylus | |
| Is the node visible / enabled / focusable | |
| Speak a message without moving focus | |
| Visually hide, keep for AT | |
javascript
import { FocusTrap, LiveAnnouncer } from 'ui.a11y';
const trap = new FocusTrap(dialogNode);
trap.activate();
// on close:
trap.deactivate();
LiveAnnouncer.announce('Saved', 'polite'); // or 'assertive'Optional kernel config ( in the extension ):
Configuration::getValue('ui')['a11y']config.phpphp
'ui' => [
'value' => [
'a11y' => [
'restoreLostFocus' => true,
'useFocusTrapInDialogs' => true,
],
],
'readonly' => false,
],On a regular product install both flags default to (they default to only when exists). Do not assume traps are on globally — activate in your dialog.
falsetrue\Dev\Main\Migrator\ModuleUpdaterFocusTrap当对话框、菜单或动态UI需要保持键盘焦点,或需向屏幕阅读器播报变更时使用。加载(导入时会自动执行)。
ui.a11yFocusMonitor.initialize()| 需求 | 类 |
|---|---|
| 关闭/重绘DOM后恢复焦点 | |
| 将焦点移动到下一个/上一个可聚焦节点 | |
| 在模态框/对话框中捕获Tab键 | |
| 组件内支持方向键/Home/End键 | |
| 区分输入方式:键盘/鼠标/触摸/手写笔 | |
| 判断节点是否可见/启用/可聚焦 | |
| 播报消息但不移动焦点 | |
| 视觉隐藏但保留给辅助技术 | |
javascript
import { FocusTrap, LiveAnnouncer } from 'ui.a11y';
const trap = new FocusTrap(dialogNode);
trap.activate();
// 关闭时:
trap.deactivate();
LiveAnnouncer.announce('已保存', 'polite'); // 或使用'assertive'可选内核配置(扩展中的):
config.phpConfiguration::getValue('ui')['a11y']php
'ui' => [
'value' => [
'a11y' => [
'restoreLostFocus' => true,
'useFocusTrapInDialogs' => true,
],
],
'readonly' => false,
],常规产品安装时,两个标志默认均为(仅当存在时默认设为)。请勿假设全局标志已开启——需在你的对话框中主动激活。
false\Dev\Main\Migrator\ModuleUpdatertrueui.a11yFocusTrapIcons (ui.icon-set
)
ui.icon-set图标(ui.icon-set
)
ui.icon-setJS API is (class + name sets); each set also needs its CSS extension loaded, or the icon won't render. Sets (exported from ): , , , , , , , , , , / (fixed colors, ignored), — CSS extensions , , , etc.
ui.icon-set.api.coreIconui.icon-set.api.coreActionsMainOutlineSolidSocialCRMEditorContactCenterAnimatedSpecialDiskDiskCompactcolorSmallOutlineui.icon-set.actionsui.icon-set.mainui.icon-set.outlinejavascript
import { Icon, Outline, IconHoverMode } from 'ui.icon-set.api.core';
import 'ui.icon-set.outline';
new Icon({ icon: Outline.CHECK_L, size: 24, color: 'var(--ui-color-base-70)' }).renderTo(container);- Vue: from
BIcon(propsui.icon-set.api.vue,name,size,color,hoverable).responsive - Static HTML (no JS control): ; size/color via CSS vars
<div class="ui-icon-set --check-l"></div>,--ui-icon-set__icon-size.--ui-icon-set__icon-color - Use named icons from the sets, not inline SVG copies. Load / typography extensions for consistent styling.
ui.design-tokens
JS API为(包含类和图标集);每个图标集还需加载对应的CSS扩展,否则图标无法渲染。可用图标集(从导出):、、、、、、、、、、/(固定颜色,参数无效)、——对应的CSS扩展为、、等。
ui.icon-set.api.coreIconui.icon-set.api.coreActionsMainOutlineSolidSocialCRMEditorContactCenterAnimatedSpecialDiskDiskCompactcolorSmallOutlineui.icon-set.actionsui.icon-set.mainui.icon-set.outlinejavascript
import { Icon, Outline, IconHoverMode } from 'ui.icon-set.api.core';
import 'ui.icon-set.outline';
new Icon({ icon: Outline.CHECK_L, size: 24, color: 'var(--ui-color-base-70)' }).renderTo(container);- Vue框架:使用中的
ui.icon-set.api.vue(属性包括BIcon、name、size、color、hoverable)。responsive - 静态HTML(无需JS控制):;通过CSS变量
<div class="ui-icon-set --check-l"></div>、--ui-icon-set__icon-size设置尺寸/颜色。--ui-icon-set__icon-color - 使用图标集中的命名图标,而非内联SVG副本。加载/ 排版扩展以保持样式一致性。
ui.design-tokens
Checklist
检查清单
- Prefer /
ui.system.dialogover legacyui.system.*for new admin UI;main.popupfor simple confirms.ui.dialogs.messagebox - Alerts via , not a non-existent
ui.alerts.ui.system.alert - Extensions loaded in PHP before inline scripts; modular JS uses , not global
importwhere avoidable.BX - Entity selector: matches the registered provider
entities[].id; providerentityIdchecks rights; distinctisAvailable()per form.context - Grid/filter share one ; server code applies filter, sort and nav limits itself; row HTML escaped via
GRID_ID.HtmlFilter::encode() - Icons: plus the set's CSS extension (e.g.
ui.icon-set.api.core) — both loaded.ui.icon-set.outline - Lottie instances ed on teardown; side panel URLs are real routes with proper auth.
destroy() - Dialogs/menus that steal focus use (
ui.a11y/FocusTrap); do not assume globalLiveAnnouncerflags are on.ui.a11y - Notifications for transient feedback, dialogs/message boxes for confirmations.
- 新后台UI优先使用/
ui.system.dialog,而非旧版ui.system.*;简单确认操作使用main.popup。ui.dialogs.messagebox - 使用实现警告功能,而非不存在的
ui.alerts。ui.system.alert - 内联脚本执行前在PHP中加载扩展;模块化JS优先使用,避免全局
import对象(除非必要)。BX - 实体选择器:需与注册的提供者
entities[].id匹配;提供者entityId需检查权限;每个表单使用独立的isAvailable()。context - 表格/筛选器使用相同的;服务端代码自行应用筛选、排序和分页限制;行HTML通过
GRID_ID转义。HtmlFilter::encode() - 图标:同时加载和对应图标集的CSS扩展(例如
ui.icon-set.api.core)。ui.icon-set.outline - Lottie实例在组件销毁时调用;侧边面板URL为带正确权限校验的真实路由。
destroy() - 抢占焦点的对话框/菜单使用(
ui.a11y/FocusTrap);请勿假设全局LiveAnnouncer标志已开启。ui.a11y - 临时反馈使用通知组件,确认操作使用对话框/消息框。