@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`
39 lines (38 loc) • 1.25 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.executeFunction = executeFunction;
exports.getLowCodeCoreUtil = getLowCodeCoreUtil;
exports.isArrayNotEmpty = isArrayNotEmpty;
exports.isDesignMode = isDesignMode;
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject"));
var _get = _interopRequireDefault(require("lodash/get"));
function isDesignMode(props) {
var mode;
if ((0, _isPlainObject["default"])(props)) {
mode = props === null || props === void 0 ? void 0 : props.__designMode;
} else if (typeof props === 'string') {
mode = props;
}
return mode === 'design';
}
function executeFunction(func) {
if (typeof func === 'function') {
var result;
try {
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
rest[_key - 1] = arguments[_key];
}
result = func.apply(void 0, rest);
} catch (e) {
// ignore
}
return result;
}
}
function getLowCodeCoreUtil(path) {
return (0, _get["default"])(window.cnLowCodeUtils, path);
}
function isArrayNotEmpty(list) {
return Array.isArray(list) && list.length > 0;
}