UNPKG

tdesign-vue

Version:
41 lines (38 loc) 1.58 kB
/** * tdesign v1.14.1 * (c) 2025 tdesign * @license MIT */ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (a) { for (var b, c = 1; c < arguments.length; c++) for (var d in b = arguments[c], b) Object.prototype.hasOwnProperty.call(b, d) && (a[d] = b[d]); return a; }, _extends.apply(this, arguments); } var normalMerge = ["attrs", "props", "domProps"], toArrayMerge = ["class", "style", "directives"], functionalMerge = ["on", "nativeOn"], mergeJsxProps = function mergeJsxProps(a) { return a.reduce(function (c, a) { for (var b in a) if (!c[b]) c[b] = a[b];else if (-1 !== normalMerge.indexOf(b)) c[b] = _extends({}, c[b], a[b]);else if (-1 !== toArrayMerge.indexOf(b)) { var d = c[b] instanceof Array ? c[b] : [c[b]], e = a[b] instanceof Array ? a[b] : [a[b]]; c[b] = [].concat(d, e); } else if (-1 !== functionalMerge.indexOf(b)) { for (var f in a[b]) if (c[b][f]) { var g = c[b][f] instanceof Array ? c[b][f] : [c[b][f]], h = a[b][f] instanceof Array ? a[b][f] : [a[b][f]]; c[b][f] = [].concat(g, h); } else c[b][f] = a[b][f]; } else if ("hook" === b) for (var i in a[b]) c[b][i] = c[b][i] ? mergeFn(c[b][i], a[b][i]) : a[b][i];else c[b] = a[b]; return c; }, {}); }, mergeFn = function mergeFn(a, b) { return function () { a && a.apply(this, arguments), b && b.apply(this, arguments); }; }; var helper = mergeJsxProps; export { helper as h }; //# sourceMappingURL=dep-6a4dc7bb.js.map