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

PAGFile的replaceText必现无法成功设置为更新后的text #2508

Open
Yang-Libing opened this issue Sep 29, 2024 · 0 comments
Open

PAGFile的replaceText必现无法成功设置为更新后的text #2508

Yang-Libing opened this issue Sep 29, 2024 · 0 comments
Assignees

Comments

@Yang-Libing
Copy link

通过调用PAGFile的replaceText实现文本替代的功能,发现replaceText之后,该pagFile的textData文本还是替代之前的值

【版本信息】

鸿蒙4.4.4版本(应该各个鸿蒙版本都一直存在这个问题)

【平台信息】

鸿蒙平台

【预期的表现】

// 其中pagTextData的text为“text replacement test”
pagFile.replaceText(0, pagTextData)
let n = inst.numTexts() // n为2
let t0 = inst.getTextData(0)?.text // 为“文本图层2”
let t1 = inst.getTextData(1)?.text // 为“文本图层1”

【实际的情况】

image

其中pagFile在调用replaceText之前,值为“文本图层2”,但调用replaceText之后,值还是“文本图层2”,即没有发生任何变化.
这个问题应该是必现的,辛苦看看.

【Demo及附件】

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