搜索文档
通过指定 uid 选择节点。通常用于选择事件源的对应节点。
uid
uid 是节点的编号。每个节点拥有一个动态分配的独特 uid。uid 可通过触发的事件获取。
selectUniqueID(uniqueId: string | number): NodesRef;
待选择节点的 uid。
代表该查询结果的 NodesRef 对象实例。
NodesRef
给点击事件的源节点添加背景颜色:
const onTap = useCallback((event: ReactLynx.ITouchEvent) => { lynx .createSelectorQuery() .selectUniqueID(event.target.uid) .setNativeProps({ 'background-color': 'red', }) .exec(); }, []);
LCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.