New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
二维码生成好像有点问题 #2
Comments
你没有测试数据数据,不以title显示,那条形码显示什么内容?undefined?默认显示标题是为了绑定字段缺省能固定显示一个内容。即有些打印需要一个固定的条码,无需动态字段传入,测试数据相当于mock数据,用于测试效果。发自我的 iPad在 2023年8月27日,15:49,JayShen ***@***.***> 写道:
以title为数据生成了
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
有绑定字段的时候,预览会去获取printData[field]生成条码,拿不到数据会显示空白,你要确保有数据。或者你的数据不符合条码格式支持的格式,比如中文字符,或者条码格式要求9位数字,传入数据不符合对于编码要求。这是条码库和编码所要求的。发自我的 iPhone在 2023年8月27日,15:59,JayShen ***@***.***> 写道:
您好,我填入测试数据后仍然也会以title为准,而且有时候回空,所以才删除其他项保留title
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
你可以考虑下面的【sn:xxxxx】单独用一个text元素显示,条码元素仅用作条码,text元素是可以显示title+field内容的,条码元素的title无法实现你的需求,变通一下,隐藏条码title,自己加一个text显示即可。发自我的 iPhone在 2023年8月27日,17:40,JayShen ***@***.***> 写道:
有绑定字段的时候,预览会去获取printData[field]生成条码,拿不到数据会显示空白,你要确保有数据。或者你的数据不符合条码格式支持的格式,比如中文字符,或者条码格式要求9位数字,传入数据不符合对于编码要求。这是条码库和编码所要求的。发自我的 iPhone在 2023年8月27日,15:59,JayShen @.> 写道: 您好,我填入测试数据后仍然也会以title为准,而且有时候回空,所以才删除其他项保留title —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.>
是的,首先谢谢您的回复,我尝试了field确实可以更新数据,但是我还需要动态title,我的需求是打印条形码并在下面展示出【SN码:xxxxxx】,所以我采取了hiprintTemplate.update 重传入整个json的方式来改变title和条形码数据生成,但是控制台总是报更新错误,大概是什么问题导致的呢? 如果不使用update改成每次new hiprint.PrintTemplate却不会报错
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
是的我目前采用的就是这个方案,谢谢 |
以title为数据生成了
The text was updated successfully, but these errors were encountered: