Files
supplier-dispatch-h5/node_modules/.cache/babel-loader/3ea2e66cb0d0a98421ffd4de7df483fbf102f7c4855f77b1e7e4d78a1c9632bf.json
2023-08-11 10:45:20 +08:00

1 line
3.0 KiB
JSON

{"ast":null,"code":"/**\n * bem helper\n * b() // 'button'\n * b('text') // 'button__text'\n * b({ disabled }) // 'button button--disabled'\n * b('text', { disabled }) // 'button__text button__text--disabled'\n * b(['disabled', 'primary']) // 'button button--disabled button--primary'\n */\nfunction gen(name, mods) {\n if (!mods) {\n return '';\n }\n if (typeof mods === 'string') {\n return \" \" + name + \"--\" + mods;\n }\n if (Array.isArray(mods)) {\n return mods.reduce(function (ret, item) {\n return ret + gen(name, item);\n }, '');\n }\n return Object.keys(mods).reduce(function (ret, key) {\n return ret + (mods[key] ? gen(name, key) : '');\n }, '');\n}\nexport function createBEM(name) {\n return function (el, mods) {\n if (el && typeof el !== 'string') {\n mods = el;\n el = '';\n }\n el = el ? name + \"__\" + el : name;\n return \"\" + el + gen(el, mods);\n };\n}","map":{"version":3,"names":["gen","name","mods","Array","isArray","reduce","ret","item","Object","keys","key","createBEM","el"],"sources":["E:/work/sino/sino-h5/node_modules/vant/es/utils/create/bem.js"],"sourcesContent":["/**\n * bem helper\n * b() // 'button'\n * b('text') // 'button__text'\n * b({ disabled }) // 'button button--disabled'\n * b('text', { disabled }) // 'button__text button__text--disabled'\n * b(['disabled', 'primary']) // 'button button--disabled button--primary'\n */\nfunction gen(name, mods) {\n if (!mods) {\n return '';\n }\n\n if (typeof mods === 'string') {\n return \" \" + name + \"--\" + mods;\n }\n\n if (Array.isArray(mods)) {\n return mods.reduce(function (ret, item) {\n return ret + gen(name, item);\n }, '');\n }\n\n return Object.keys(mods).reduce(function (ret, key) {\n return ret + (mods[key] ? gen(name, key) : '');\n }, '');\n}\n\nexport function createBEM(name) {\n return function (el, mods) {\n if (el && typeof el !== 'string') {\n mods = el;\n el = '';\n }\n\n el = el ? name + \"__\" + el : name;\n return \"\" + el + gen(el, mods);\n };\n}"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,GAAGA,CAACC,IAAI,EAAEC,IAAI,EAAE;EACvB,IAAI,CAACA,IAAI,EAAE;IACT,OAAO,EAAE;EACX;EAEA,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IAC5B,OAAO,GAAG,GAAGD,IAAI,GAAG,IAAI,GAAGC,IAAI;EACjC;EAEA,IAAIC,KAAK,CAACC,OAAO,CAACF,IAAI,CAAC,EAAE;IACvB,OAAOA,IAAI,CAACG,MAAM,CAAC,UAAUC,GAAG,EAAEC,IAAI,EAAE;MACtC,OAAOD,GAAG,GAAGN,GAAG,CAACC,IAAI,EAAEM,IAAI,CAAC;IAC9B,CAAC,EAAE,EAAE,CAAC;EACR;EAEA,OAAOC,MAAM,CAACC,IAAI,CAACP,IAAI,CAAC,CAACG,MAAM,CAAC,UAAUC,GAAG,EAAEI,GAAG,EAAE;IAClD,OAAOJ,GAAG,IAAIJ,IAAI,CAACQ,GAAG,CAAC,GAAGV,GAAG,CAACC,IAAI,EAAES,GAAG,CAAC,GAAG,EAAE,CAAC;EAChD,CAAC,EAAE,EAAE,CAAC;AACR;AAEA,OAAO,SAASC,SAASA,CAACV,IAAI,EAAE;EAC9B,OAAO,UAAUW,EAAE,EAAEV,IAAI,EAAE;IACzB,IAAIU,EAAE,IAAI,OAAOA,EAAE,KAAK,QAAQ,EAAE;MAChCV,IAAI,GAAGU,EAAE;MACTA,EAAE,GAAG,EAAE;IACT;IAEAA,EAAE,GAAGA,EAAE,GAAGX,IAAI,GAAG,IAAI,GAAGW,EAAE,GAAGX,IAAI;IACjC,OAAO,EAAE,GAAGW,EAAE,GAAGZ,GAAG,CAACY,EAAE,EAAEV,IAAI,CAAC;EAChC,CAAC;AACH"},"metadata":{},"sourceType":"module","externalDependencies":[]}