UNPKG

@cainiaofe/cn-ui-layout

Version:

- 安装 cone-cli | [Cone-CLI 使用指引](https://alidocs.dingtalk.com/i/nodes/xdqZp24KneBJzvGM6XezJvyb7RA0Nr1E) - `tnpm i -g @alife/cone-cli@latest` - 安装依赖包 - `cone install` - 启动研发 - `cone start`

23 lines (22 loc) 804 B
import { events } from '@cainiaofe/cn-ui-utils'; export function emitEvent(eventName) { if (events && eventName) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } events === null || events === void 0 ? void 0 : events.emit.apply(events, [eventName].concat(args)); } } export function onEvent(eventName, func) { if (events && eventName && typeof func === 'function') { events === null || events === void 0 ? void 0 : events.on(eventName, func); } } /** * 页面响应式断点变化时触发 */ export var CnPageColumnChange = 'L2_CnPageColumnChange'; /** * 编辑页面强行重新计算布局事件 */ export var CnSectionCalculateLayout = 'L2_CnSectionCalculateLayout';