xh-htmlword 1.1.9 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/dist/xh.js +1 -1
- package/dist/xh.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/xh.js
CHANGED
@@ -10303,7 +10303,7 @@ const $C = Array.isArray, AQ = (r, e, A) => new Promise((t, n) => {
|
|
10303
10303
|
${g.outerHTML}
|
10304
10304
|
</body>
|
10305
10305
|
</html>`, p = eQ(U, a), v = Ua.asBlob(p, n);
|
10306
|
-
va(v, `${e}.docx`), t && t();
|
10306
|
+
va(v, `${e}.docx`), t && t(v);
|
10307
10307
|
});
|
10308
10308
|
};
|
10309
10309
|
function eQ(r, e) {
|
package/dist/xh.umd.cjs
CHANGED
@@ -104,4 +104,4 @@ Content-Location: `+((a=i.contentLocation)==null?"":a)+`
|
|
104
104
|
<body>
|
105
105
|
${g.outerHTML}
|
106
106
|
</body>
|
107
|
-
</html>`,p=tQ(U,a),v=Ua.asBlob(p,n);va(v,`${e}.docx`),t&&t()})};function tQ(r,e){return r=r.replace(/break-before: page/g,"page-break-before: always"),e&&[...rQ(e)].forEach(A=>{if(r.includes(ha(A.selectorText))){let t=new RegExp(`class="${ha(A.selectorText)}"`,"g");r=r.replace(t,`style="${A.style.cssText}"`)}}),r}function ha(r){let e=r.match(/\.(\w+)/);if(e)return e[1];console.log("没有找到匹配的部分")}function rQ(r){return[...document.styleSheets].reverse().find(({cssRules:t})=>[...t].find(n=>n.selectorText.includes(r))).cssRules}const nQ=()=>{const r=new Date,e=r.getFullYear(),A=("0"+(r.getMonth()+1)).slice(-2),t=("0"+r.getDate()).slice(-2);return`${e}${A}${t}`};return eQ});
|
107
|
+
</html>`,p=tQ(U,a),v=Ua.asBlob(p,n);va(v,`${e}.docx`),t&&t(v)})};function tQ(r,e){return r=r.replace(/break-before: page/g,"page-break-before: always"),e&&[...rQ(e)].forEach(A=>{if(r.includes(ha(A.selectorText))){let t=new RegExp(`class="${ha(A.selectorText)}"`,"g");r=r.replace(t,`style="${A.style.cssText}"`)}}),r}function ha(r){let e=r.match(/\.(\w+)/);if(e)return e[1];console.log("没有找到匹配的部分")}function rQ(r){return[...document.styleSheets].reverse().find(({cssRules:t})=>[...t].find(n=>n.selectorText.includes(r))).cssRules}const nQ=()=>{const r=new Date,e=r.getFullYear(),A=("0"+(r.getMonth()+1)).slice(-2),t=("0"+r.getDate()).slice(-2);return`${e}${A}${t}`};return eQ});
|