UNPKG

mobile-more

Version:

基于 antd-mobile v5 扩展移动端 UI 组件

28 lines (27 loc) 941 B
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); var _ut = require("ut2"); var getNamePaths = function getNamePaths(name, parentListName) { var paths = []; if ((0, _ut.isArray)(parentListName) && parentListName.length > 0) { parentListName.forEach(function (parentItemPath) { if ((0, _ut.isArray)(parentItemPath)) { paths.push.apply(paths, (0, _toConsumableArray2.default)(parentItemPath)); } else { paths.push(parentItemPath); } }); } if ((0, _ut.isArray)(name)) { paths.push.apply(paths, (0, _toConsumableArray2.default)(name)); } else { paths.push(name); } return paths; }; var _default = exports.default = getNamePaths;