目前我已经使用mpdf库将html转换为pdf,但它不支持我的语言(高棉语)我尝试使用utf-8但它不起作用任何人有想法请告诉我它代理原因:)< / p>
答案 0 :(得分:0)
尝试在创建对象时使用该模式
//appECommerce.js
import eCommerceLogic from './lib/eCommerceLogic.js'
//eCommerceLogic.js
import name from './eCommerceJSExportTests.js';
module.exports = {
productnamesOnclick: function(){
$("#AJAXproductnames").on("click",function(){
getProductnameElements()
})
},
productNamesGetter: function(){
async function getProductnameElements(){
let productNameElements = document.getElementsByClassName('customProductCardName')
console.log("result is ", productNameElements)
let test = await name.commonAJAXCall()
console.log(test)
}
}
}
//eCommerceJSExportTests.js
module.exports = {
commonAJAXCall: function() {
//return "helloExport"
return $.get('https://jsonplaceholder.typicode.com/todos/1', {
}).then((response) => {
response = JSON.stringify(response)
console.log(response)
console.log("AJAX happened")
return response
})
}
}
如果您确定自己的html是utf-8