Skip to content
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

Open
JayShen1943 opened this issue Aug 27, 2023 · 6 comments
Open

二维码生成好像有点问题 #2

JayShen1943 opened this issue Aug 27, 2023 · 6 comments

Comments

@JayShen1943
Copy link

image
以title为数据生成了

@Xavier9896
Copy link

Xavier9896 commented Aug 27, 2023 via email

@JayShen1943
Copy link
Author

您好,我填入测试数据后仍然也会以title为准,而且有时候回空,所以才删除其他项保留title
image

image

@Xavier9896
Copy link

Xavier9896 commented Aug 27, 2023 via email

@JayShen1943
Copy link
Author

有绑定字段的时候,预览会去获取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却不会报错
image
image

@Xavier9896
Copy link

Xavier9896 commented Aug 27, 2023 via email

@JayShen1943
Copy link
Author

你可以考虑下面的【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: @.>

是的我目前采用的就是这个方案,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants