We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
现在虽然getGUID()是稳定的,在整个代码一点不变的情况下生成的对应的DOM的id也是稳定的。但是一但在前面加一个控件之类的,后面的所有控件对应的DOM的id都会变化,直接导致很多依赖id的自动化脚本要重写。
getGUID()
需要一个更稳定的,不依赖于getGUID的算法。
getGUID
The text was updated successfully, but these errors were encountered:
d59988a
解决方案:
ViewContext
default
viewContext.id
这个方案生成的DOM id与viewContext相关,因此需要ViewContext在设置后就不得变化,不然会有很多获取子DOM的方法失效,这个问题会很严重,所以干脆在标准上让viewContext属性在render之后只读好了
viewContext
Sorry, something went wrong.
现在通过缓存把初始时的viewContext.id挂在了domIDPrefix属性下,允许ViewContext的变化了。
domIDPrefix
不过最好还是别推荐去变ViewContext,这个东西的设定本身不是为了变来变去而产生的。
otakustay
No branches or pull requests
现在虽然
getGUID()
是稳定的,在整个代码一点不变的情况下生成的对应的DOM的id也是稳定的。但是一但在前面加一个控件之类的,后面的所有控件对应的DOM的id都会变化,直接导致很多依赖id的自动化脚本要重写。需要一个更稳定的,不依赖于
getGUID
的算法。The text was updated successfully, but these errors were encountered: