1 line
2.9 KiB
JSON
1 line
2.9 KiB
JSON
{"ast":null,"code":"export function toList(val) {\n if (val === false) {\n return [false, false];\n }\n return Array.isArray(val) ? val : [val];\n}\nexport function getNode(dom, defaultNode, needDom) {\n if (dom === true || dom === undefined) {\n return defaultNode;\n }\n return dom || needDom && defaultNode;\n}\n/**\n * Get React of element with precision.\n * ref: https://github.com/ant-design/ant-design/issues/50143\n */\nexport function getEleSize(ele) {\n const rect = ele.getBoundingClientRect();\n const {\n offsetWidth,\n offsetHeight\n } = ele;\n let returnWidth = offsetWidth;\n let returnHeight = offsetHeight;\n if (Math.abs(offsetWidth - rect.width) < 1 && Math.abs(offsetHeight - rect.height) < 1) {\n returnWidth = rect.width;\n returnHeight = rect.height;\n }\n return [returnWidth, returnHeight];\n}","map":{"version":3,"names":["toList","val","Array","isArray","getNode","dom","defaultNode","needDom","undefined","getEleSize","ele","rect","getBoundingClientRect","offsetWidth","offsetHeight","returnWidth","returnHeight","Math","abs","width","height"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/typography/Base/util.js"],"sourcesContent":["export function toList(val) {\n if (val === false) {\n return [false, false];\n }\n return Array.isArray(val) ? val : [val];\n}\nexport function getNode(dom, defaultNode, needDom) {\n if (dom === true || dom === undefined) {\n return defaultNode;\n }\n return dom || needDom && defaultNode;\n}\n/**\n * Get React of element with precision.\n * ref: https://github.com/ant-design/ant-design/issues/50143\n */\nexport function getEleSize(ele) {\n const rect = ele.getBoundingClientRect();\n const {\n offsetWidth,\n offsetHeight\n } = ele;\n let returnWidth = offsetWidth;\n let returnHeight = offsetHeight;\n if (Math.abs(offsetWidth - rect.width) < 1 && Math.abs(offsetHeight - rect.height) < 1) {\n returnWidth = rect.width;\n returnHeight = rect.height;\n }\n return [returnWidth, returnHeight];\n}"],"mappings":"AAAA,OAAO,SAASA,MAAMA,CAACC,GAAG,EAAE;EAC1B,IAAIA,GAAG,KAAK,KAAK,EAAE;IACjB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;EACvB;EACA,OAAOC,KAAK,CAACC,OAAO,CAACF,GAAG,CAAC,GAAGA,GAAG,GAAG,CAACA,GAAG,CAAC;AACzC;AACA,OAAO,SAASG,OAAOA,CAACC,GAAG,EAAEC,WAAW,EAAEC,OAAO,EAAE;EACjD,IAAIF,GAAG,KAAK,IAAI,IAAIA,GAAG,KAAKG,SAAS,EAAE;IACrC,OAAOF,WAAW;EACpB;EACA,OAAOD,GAAG,IAAIE,OAAO,IAAID,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,UAAUA,CAACC,GAAG,EAAE;EAC9B,MAAMC,IAAI,GAAGD,GAAG,CAACE,qBAAqB,CAAC,CAAC;EACxC,MAAM;IACJC,WAAW;IACXC;EACF,CAAC,GAAGJ,GAAG;EACP,IAAIK,WAAW,GAAGF,WAAW;EAC7B,IAAIG,YAAY,GAAGF,YAAY;EAC/B,IAAIG,IAAI,CAACC,GAAG,CAACL,WAAW,GAAGF,IAAI,CAACQ,KAAK,CAAC,GAAG,CAAC,IAAIF,IAAI,CAACC,GAAG,CAACJ,YAAY,GAAGH,IAAI,CAACS,MAAM,CAAC,GAAG,CAAC,EAAE;IACtFL,WAAW,GAAGJ,IAAI,CAACQ,KAAK;IACxBH,YAAY,GAAGL,IAAI,CAACS,MAAM;EAC5B;EACA,OAAO,CAACL,WAAW,EAAEC,YAAY,CAAC;AACpC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |