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

[t-side-bar] 示例代码中获取 t-navbar 组件的节点数据异常 #3250

Closed
Wu-Yao opened this issue Nov 2, 2024 · 3 comments · Fixed by #3251
Closed

[t-side-bar] 示例代码中获取 t-navbar 组件的节点数据异常 #3250

Wu-Yao opened this issue Nov 2, 2024 · 3 comments · Fixed by #3251
Labels
demo 示例

Comments

@Wu-Yao
Copy link

Wu-Yao commented Nov 2, 2024

tdesign-miniprogram 版本

SideBar 侧边栏 组件组件的宽高为0

重现链接

No response

重现步骤

image

期望结果

No response

实际结果

No response

基础库版本

No response

补充说明

No response

Copy link
Contributor

github-actions bot commented Nov 2, 2024

👋 @Wu-Yao,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@Wu-Yao
Copy link
Author

Wu-Yao commented Nov 2, 2024

image

@betavs
Copy link
Collaborator

betavs commented Nov 2, 2024

<view class="custom-navbar">
  <t-navbar class="demo-navbar" title="TDesign" leftArrow />
</view>
// 方案一
wx.createSelectorQuery()
  .select('.custom-navbar')
  .boundingClientRect((rect) => {
    console.log(rect);
  })
  .exec();

// 方案二
wx.createSelectorQuery()
  .in(this.selectComponent('.demo-navbar'))
  .select('.t-navbar')
  .boundingClientRect((rect) => {
    console.log(rect);
  })
  .exec();

@betavs betavs changed the title [组件名称] 描述问题的标题 [t-side-bar] 示例代码中获取 t-navbar 组件的节点数据异常 Nov 2, 2024
@betavs betavs added the demo 示例 label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo 示例
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants